cli.logic.utils package


cli.logic.utils.config module

Logic for the ‘configs’ command.

cli.logic.utils.config.cli_config_default(config_name: str, save: bool | None = False, print_output: bool | None = False, output_path: str | None = None)

Save or print default configuration file.

Parameters:
  • config_name (str) – The name of the configuration file.

  • save (bool) – Whether to save the configuration file. Defaults to False.

  • print_output (bool) – Whether to print the configuration file. Defaults to False.

  • output_path (str) – The path to save the configuration file. Defaults to None.

Raises:

click.ClickException – If no configuration file name is provided.

cli.logic.utils.config.cli_configs()

List available configuration files using Click for command line interface, grouped by title and description.

cli.logic.utils.model module

CLI command functions related to models.

cli.logic.utils.model.cli_available_weights(model_name: str)

List available weights for a model.

cli.logic.utils.model.cli_download_weights(model_name: str, dataset_name: str, filename: str, save_path: str)

Download weights for a model and dataset.

cli.logic.utils.model.cli_model_layers(model_name: str, add_normalization: bool = False)

List layers of a model.

Parameters:
  • model_name (str) – The name of the model.

  • add_normalization (bool) – Whether to add normalization layers.

Raises:

ValueError – If the model name is not provided.

cli.logic.utils.model.cli_models(model_type: str)

List available models.

cli.logic.utils.normalization_params module

This module represents the normalization parameters of the supported datasets. Users can either use the default normalization parameters or provide their own.

cli.logic.utils.normalization_params.cli_normalization_params(dataset_name: str | None = None) None

Print the normalization parameters for a specified dataset.

Parameters:

dataset_name (Optional[str]) – The name of the dataset. If the dataset is not supported, an error is raised. If no dataset is provided, all available datasets are listed

Note

The normalization parameters are the mean and standard deviation values for each channel of the dataset. dataset_name is case-sensitive i.e. “CIFAR-10” is different from “cifar-10”.