Skip to content

Add utility functions for writing HDF5 files#73

Open
sebapersson wants to merge 9 commits into
mainfrom
hdf5
Open

Add utility functions for writing HDF5 files#73
sebapersson wants to merge 9 commits into
mainfrom
hdf5

Conversation

@sebapersson
Copy link
Copy Markdown
Collaborator

Adds:

  • write_input_hdf5: write input arrays to PEtab-SciML HDF5 file
  • write_parameter_hdf5: write torch.NN.module to HDF5 file
  • add_array_files_to_yaml: helper to add array files to the problem yaml.

All functions have associated tests.

See also #11

@sebapersson sebapersson requested review from BSnelling and dilpath and removed request for BSnelling and dilpath May 14, 2026 07:23
@sebapersson
Copy link
Copy Markdown
Collaborator Author

I will update the PR to fit into the existing classes.

@sebapersson sebapersson requested review from BSnelling and dilpath May 14, 2026 13:12
@sebapersson
Copy link
Copy Markdown
Collaborator Author

I have now revised the PR to use the existing ArrayData class for exporting HDF5 files.

Copy link
Copy Markdown
Collaborator

@BSnelling BSnelling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Only minor comments.

Comment thread petab_sciml/standard/array_data.py Outdated
array = np.asarray(array)
except (TypeError, ValueError) as exc:
raise TypeError(
"Input array could not be converted to a \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quoting the type of the input array in the error could be useful.

Co-authored-by: BSnelling <branwen.snelling@crick.ac.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants