itwinai.cliο
- itwinai.cli.generate_gpu_data_plots(log_dir: str = 'scalability-metrics/gpu-energy-data', pattern: str = '.*\\.csv$', plot_dir: str = 'plots/', do_backup: bool = False, backup_dir: str = 'backup-scalability-metrics/', experiment_name: str | None = None, run_name: str | None = None) None[source]ο
Generate GPU energy and utilization plots showing the expenditure for each combination of strategy and number of GPUs in Watt hours and total computing percentage. Backs up the data used to create the plot if
backup_diris not None- Parameters:
log_dir β The directory where the csv logs are stored. Defaults to
utilization_logs.pattern β A regex pattern to recognize the file names in the βlog_dirβ folder. Defaults to
dataframe_(?:\w+)_(?:\d+)\.csv$. Set it to βNoneβ to make it None. In this case, it will match all files in the given folder.plot_dir β The directory where the resulting plots should be saved. Defaults to
plots/.do_backup β Whether to backup the data used for making the plot or not.
backup_dir β The path to where the data used to produce the plot should be saved.
experiment_name β The name of the experiment to be used when creating a backup of the data used for the plot.
run_name β The name of the run to be used when creating a backup of the data used for the plot.
- itwinai.cli.generate_communication_plot(log_dir: str = 'scalability-metrics/communication-data', pattern: str = '(.+)_(\\d+)_(\\d+)\\.csv$', output_file: str = 'plots/communication_plot.png', do_backup: bool = False, backup_dir: str = 'backup-scalability-metrics/', experiment_name: str | None = None, run_name: str | None = None) None[source]ο
Generate stacked plot showing computation vs. communication fraction. Stores it to output_file.
- Parameters:
log_dir β The directory where the csv logs are stored. Defaults to
profiling_logs.pattern β A regex pattern to recognize the file names in the βlog_dirβ folder. Defaults to
profile_(\w+)_(\d+)_(\d+)\.csv$. Set it to βNoneβ to make it None. In this case, it will match all files in the given folder.output_file β The path to where the resulting plot should be saved. Defaults to
plots/comm_plot.png.do_backup β Whether to backup the data used for making the plot or not.
backup_dir β The path to where the data used to produce the plot should be saved.
experiment_name β The name of the experiment to be used when creating a backup of the data used for the plot.
run_name β The name of the run to be used when creating a backup of the data used for the plot.
- itwinai.cli.generate_scalability_plot(pattern: str = 'None', log_dir: str = 'scalability-metrics/epoch-time', do_backup: bool = False, backup_dir: str = 'backup-scalability-metrics/', experiment_name: str | None = None, run_name: str | None = None) None[source]ο
Creates two scalability plots from measured wall-clock times of an experiment run and saves them to file. Uses pattern to filter out files if given, otherwise it will try to use all files it finds in the given log directory. Will store all the data that was used as a backup file if do_backup is provided.
- itwinai.cli.sanity_check(torch: ~typing.Annotated[bool | None, <typer.models.OptionInfo object at 0x7fbdfa109ea0>] = False, tensorflow: ~typing.Annotated[bool | None, <typer.models.OptionInfo object at 0x7fbdfa1097b0>] = False, all: ~typing.Annotated[bool | None, <typer.models.OptionInfo object at 0x7fbdfa109900>] = False, optional_deps: ~typing.List[str] = <typer.models.OptionInfo object>)[source]ο
Run sanity checks on the installation of itwinai and its dependencies by trying to import itwinai modules. By default, only itwinai core modules (neither torch, nor tensorflow) are tested.
- itwinai.cli.exec_pipeline(config: ~pathlib.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7fbdfa10a0e0>], pipe_key: ~typing.Annotated[str, <typer.models.OptionInfo object at 0x7fbdfa10a170>] = 'pipeline', steps: ~typing.Annotated[str | None, <typer.models.OptionInfo object at 0x7fbdfa10a200>] | None = None, print_config: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7fbdfa10a290>] = False, overrides_list: ~typing.Annotated[~typing.List[str] | None, <typer.models.OptionInfo object at 0x7fbdfa10a320>] | None = None)[source]ο
Execute a pipeline from configuration file. Allows dynamic override of fields.
- itwinai.cli.mlflow_ui(path: str = <typer.models.OptionInfo object>, port: int = <typer.models.OptionInfo object>)[source]ο
Visualize Mlflow logs.