h5flow.modules
- h5flow.modules.find_class(classname, directory)[source]
Search the specified directory for a file containing a python implementation with the specified class name
- Parameters
classname – class name to look for
directory – directory to search for
*.pyfiles describing the class
- Returns
classobject of matching desired class (if found), orNone(if not found)
- h5flow.modules.get_class(classname, path=None)[source]
Look in current directory,
./h5flow_modules/, andh5flow/modules/for the specified class. Raises aRuntimeErrorif class can’t be found in any of those directories. Optionally, a specific python path can be provided and the class will be loaded directly from that module (faster)- Parameters
classname – class name to search for
path – python path to module that class can be accessed from
- Returns
classobject of desired class
- class h5flow.modules.h5_flow_dataset_loop_generator.H5FlowDatasetLoopGenerator(**params)[source]
Bases:
H5FlowGeneratorDefault dataset looping generator
First copies input file to output file. Then slices up the dataset defined by
dset_nameintochunk_sizechunks, separated by MPI rank.For some example use cases, the default configuration declaration:
flow: source: <group name>/<dataset group name> stages: [...]
will auto chunk the dataset given by
<group name>/<dataset group name>. But the manual chunk size specification:flow: source: input stages: [...] input: classname: H5FlowDatasetLoopGenerator dset_name: <group name>/<dataset group name> params: chunk_size: <num_rows, opt>
will chunk the same dataset, but into chunks of
<num_rows>.- class_version = '0.0.0'
- init()[source]
Prepare output file to be written to, called once before initializing the flow stages.
- class h5flow.modules.h5_flow_test_stage.H5FlowTestStage(**params)[source]
Bases:
H5FlowStageA test stage that does nothing except load data from the
requireslist and print arguments passed along with method.Example config:
test: classname: H5FlowTestStage requires: - 'example/dataset'