mloq.commands.requirements#

Mloq requirements command implementation.

Module Contents#

Classes#

RequirementsCMD

Implement the functionality of the requirements Command.

Attributes#

REQUIREMENTS_PATH

requirements

data_science_req

data_viz_req

pytorch_req

tensorflow_req

lint_req

test_req

dogfood_req

docs_req

REQUIREMENTS_FILES

REQUIREMENT_CHOICES

mloq.commands.requirements.REQUIREMENTS_PATH#
mloq.commands.requirements.requirements#
mloq.commands.requirements.data_science_req#
mloq.commands.requirements.data_viz_req#
mloq.commands.requirements.pytorch_req#
mloq.commands.requirements.tensorflow_req#
mloq.commands.requirements.lint_req#
mloq.commands.requirements.test_req#
mloq.commands.requirements.dogfood_req#
mloq.commands.requirements.docs_req#
mloq.commands.requirements.REQUIREMENTS_FILES#
mloq.commands.requirements.REQUIREMENT_CHOICES = ['data-science', 'data-viz', 'torch', 'tensorflow', 'none', 'dogfood', 'None']#
class mloq.commands.requirements.RequirementsCMD(record, interactive=False)[source]#

Bases: mloq.command.Command

Implement the functionality of the requirements Command.

Parameters
cmd_name = requirements#
files#
disable#
requirements#
REQUIREMENTS_ALIASES#
__del__()[source]#

Remove the temporary directory when the instance is deleted.

Return type

None

classmethod get_aliased_requirements_file(option)[source]#

Get requirement file from aliased name.

Parameters

option (str) –

Return type

mloq.files.File

classmethod read_requirements_file(option)[source]#

Return the content of the target requirements file form an aliased name.

Parameters

option (str) –

Return type

str

classmethod compose_requirements(options)[source]#

Return the content requirements.txt file with pinned dependencies.

The returned string contains the combined dependencies for the different options sorted alphabetically.

Parameters

options (Iterable[str]) – Iterable containing the aliased names of the target dependencies for the project.

Returns

str containing the pinned versions of all the selected requirements.

Return type

str

interactive_config()[source]#

Generate the configuration of the project interactively.

Return type

omegaconf.DictConfig

static requirements_is_empty(options)[source]#

Return True if no requirements are specified for the project.

Parameters

options (Union[List[str], str]) –

Return type

bool

record_files()[source]#

Register the files that will be generated by mloq.

Return type

None