qanat.cli_commands package

Submodules

qanat.cli_commands.dataset module

qanat.cli_commands.dataset.command_add_from_file(dataset_file: str, confirm: bool = True)[source]

Add dataset from yaml file

Parameters:
  • dataset_file (str) – path to the yaml file

  • confirm (bool) – ask for confirmation before adding the dataset

qanat.cli_commands.dataset.command_add_prompt()[source]

Add dataset from prompt

qanat.cli_commands.dataset.command_delete(dataset_name: str)[source]

Delete dataset from database

qanat.cli_commands.dataset.command_list()[source]

List all datasets in the database

qanat.cli_commands.dataset.command_update(dataset_name: str, confirm: bool = True)[source]

Update dataset information

Parameters:
  • dataset_name (str) – name of the dataset

  • confirm (bool) – ask for confirmation before updating the dataset

qanat.cli_commands.experiment module

qanat.cli_commands.experiment.action_update_prompt(Session: Session, experiment_name: str)[source]

Update an action from prompt

Parameters:
  • Session (sqlalchemy.orm.session.Session) – SQLAlchemy session

  • experiment_name (str) – Name of the experiment

qanat.cli_commands.experiment.command_action(experiment_name: str, action_name: str, run_id: int, ctx: Context = None, group_no: int = None)[source]

Execute action on a run of an experiment.

Parameters:
  • experiment_name – Name of the experiment

  • type – str

  • action_name – Name of the action

  • type – str

  • run_id – ID of the run

  • type – int

  • ctx – Click context

  • type – click.Context

  • group_no – Group number

  • type – int

qanat.cli_commands.experiment.command_add_prompt()[source]

Add experiment from prompt

qanat.cli_commands.experiment.command_add_yaml()[source]

Add experiment from yaml

qanat.cli_commands.experiment.command_delete(experiment_name: str)[source]

Remove experiment.

Parameters:

experiment_name (str) – Name of the experiment

qanat.cli_commands.experiment.command_list()[source]

Show a list of all the experiments available

qanat.cli_commands.experiment.command_new_experiment_from_yaml(yaml_file: str)[source]

Add new experiment to the database from a yaml file.

Parameters:
  • yaml_file – Path to the yaml file

  • type – str

qanat.cli_commands.experiment.command_status(experiment_name: str, live: bool = False)[source]

Show information about an experiment.

Parameters:
  • experiment_name (str) – Name of the experiment

  • live (bool) – If True, the command will be executed in live mode

qanat.cli_commands.experiment.command_update(experiment_name: str)[source]

Update an existing experiment.

Parameters:

experiment_name (str) – Name of the experiment

qanat.cli_commands.experiment.fetch_status_runs(sessionmaker: sessionmaker, experiment_name: str, animation: bool = False) List[RunOfAnExperiment][source]

Fetch the status of the runs of an experiment.

Parameters:
  • sessionmaker (sqlalchemy.orm.sessionmaker) – Sessionmaker of the database

  • experiment_name (str) – Name of the experiment

  • animation (bool) – If True, the command will be show a spinner animation while fetching the status of the runs

Returns:

List of runs

Return type:

List[RunOfAnExperiment]

qanat.cli_commands.experiment.generate_grid_runs(sessionmaker: sessionmaker, runs: List[RunOfAnExperiment]) Table[source]

Generate rich grid of runs to render in the console.

Parameters:
  • sessionmaker (sqlalchemy.orm.sessionmaker) – Sessionmaker of the database

  • runs (List[RunOfAnExperiment]) – List of runs

Returns:

Table of runs

Return type:

Table

qanat.cli_commands.experiment.parse_update_choices(Session: Session, to_update: list, dataset_names: list, datasets_in_db: list, tags: list, experiment: Experiment) list[source]

Parse the update choices

Parameters:
  • Session (sqlalchemy.orm.session.Session) – SQLAlchemy session

  • to_update (list) – List of items to update

  • dataset_names (list) – List of dataset names

  • datasets_in_db (list) – List of datasets in database

  • tags (list) – List of tags

  • experiment (qanat.core.database.Experiment) – Experiment to update

qanat.cli_commands.init module

qanat.cli_commands.init.init_qanat(path, yes=False)[source]

Initialize the Qanat repertory.

Parameters:
  • path (str) – The path to the Qanat repertory.

  • yes (bool) – If True, the command will not ask for confirmation.

qanat.cli_commands.status module

qanat.cli_commands.status.command_status()[source]

Status command

Module contents