io
check_input_paths(fn_input, fn_metadata, dir_data)
Formats the input filenames and directory for an experiment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fn_input |
str
|
The input data filename. |
required |
fn_metadata |
str
|
The metadata filename / suffix to append to |
required |
dir_data |
str
|
The directory that should contain both of the above. |
required |
Returns:
Type | Description |
---|---|
tuple[Path, str, str]
|
A tuple containing the correct directory path, input data filename and metadata filename (used for both in and out). |
Warns:
Type | Description |
---|---|
UserWarning
|
When the path to |
UserWarning
|
When the path to |
Source code in src/nhssynth/modules/dataloader/io.py
check_output_paths(fn_dataset, fn_typed, fn_transformed, fn_metatransformer, fn_constraint_graph, fn_sdv_metadata, dir_experiment)
Formats the output filenames for an experiment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fn_dataset |
str
|
The input data filename. |
required |
fn_typed |
str
|
The typed input data filename/suffix to append to |
required |
fn_transformed |
str
|
The transformed output data filename/suffix to append to |
required |
fn_metatransformer |
str
|
The metatransformer filename/suffix to append to |
required |
fn_constraint_graph |
str
|
The constraint graph filename/suffix to append to |
required |
fn_sdv_metadata |
str
|
The SDV metadata filename/suffix to append to |
required |
dir_experiment |
Path
|
The experiment directory to write the outputs to. |
required |
Returns:
Type | Description |
---|---|
tuple[str, str, str]
|
A tuple containing the formatted output filenames. |
Warns:
Type | Description |
---|---|
UserWarning
|
When any of the filenames include directory separators, as this is not supported and may not work as intended. |
Source code in src/nhssynth/modules/dataloader/io.py
write_data_outputs(metatransformer, fn_dataset, fn_metadata, dir_experiment, args)
Writes the transformed data and metatransformer to disk.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metatransformer |
MetaTransformer
|
The metatransformer used to transform the data into its model-ready state. |
required |
fn_dataset |
str
|
The base dataset filename. |
required |
fn_metadata |
str
|
The metadata filename. |
required |
dir_experiment |
Path
|
The experiment directory to write the outputs to. |
required |
args |
Namespace
|
The full set of parsed command line arguments. |
required |
Returns:
Type | Description |
---|---|
None
|
The filename of the dataset used. |