dmx.compressor.utils.io

Functions

approximation_function_constructor(loader, node)

approximation_function_representer(dumper, val)

compute_md5(file_name)

dmx_module_instance_constructor(loader, node)

dmx_module_instance_representer(dumper, val)

format_constructor(loader, node)

format_representer(dumper, val)

get_dumper()

get_loader()

kwargs_to_string(**kwargs)

Converts kwargs dictionary to a comma-separated string of key=value pairs.

load_config_file([config_file])

save_config_file(config[, config_file])

save_state_dict_and_return_url(module, ...)

sparseness_constructor(loader, node)

sparseness_representer(dumper, val)

string_to_kwargs(kwargs_string)

Parses a string of keyword arguments into a dictionary.

dmx.compressor.utils.io.approximation_function_constructor(loader: SafeLoader, node: ScalarNode) str
dmx.compressor.utils.io.approximation_function_representer(dumper: SafeDumper, val: Format) ScalarNode
dmx.compressor.utils.io.compute_md5(file_name)
dmx.compressor.utils.io.dmx_module_instance_constructor(loader: SafeLoader, node: ScalarNode) str
dmx.compressor.utils.io.dmx_module_instance_representer(dumper: SafeDumper, val: Type[DmxModule]) ScalarNode
dmx.compressor.utils.io.format_constructor(loader: SafeLoader, node: ScalarNode) str
dmx.compressor.utils.io.format_representer(dumper: SafeDumper, val: Format) ScalarNode
dmx.compressor.utils.io.get_dumper()
dmx.compressor.utils.io.get_loader()
dmx.compressor.utils.io.kwargs_to_string(**kwargs)

Converts kwargs dictionary to a comma-separated string of key=value pairs.

dmx.compressor.utils.io.load_config_file(config_file='configs/dmx.yaml')
dmx.compressor.utils.io.save_config_file(config, config_file='configs/dmx.yaml')
dmx.compressor.utils.io.save_state_dict_and_return_url(module: Module, parent_dir: str) str
dmx.compressor.utils.io.sparseness_constructor(loader: SafeLoader, node: ScalarNode) str
dmx.compressor.utils.io.sparseness_representer(dumper: SafeDumper, val: Format) ScalarNode
dmx.compressor.utils.io.string_to_kwargs(kwargs_string)

Parses a string of keyword arguments into a dictionary.

Parameters:

kwargs_string – A string of keyword arguments in the format “key1=value1, key2=value2, …”.

Returns:

A dictionary containing the parsed keyword arguments.