Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New experiment run command. #37

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sergey-serebryakov
Copy link
Contributor

Related Issues / Pull Requests

NA

Description

This commit adds new experiment run command that simplifies (to some extent) the process of running ML experiments. This command accepts only one argument - path to the experiment configuration file in YAML format. Previous mechanism to run experiments (experiment train and experiment search_hp) is still supported, but will likely be removed in future releases. For more details, run the following command:

python -m xtime.main experiment --help
  1. Create a template experiment configuration file by running
    python -m xtime.main experiment create --help
    python -m xtime.main experiment create EXPERIMENT_ID --file EXPERIMENT_DEFINITION_FILE 
    where EXPERIMENT_ID is the name of one of the supported experiments (train or search_hp) and EXPERIMENT_DEFINITION_FILE is the path to the YAML file that will be created.
  2. Edit that file. The source code of these two experiments provides detailed description of each parameters in this file, but many of them have the same semantics as current CLI API.
  3. Run experiment by executing the following command:
    python -m xtime.main experiment run --help
    python -m xtime.main experiment run EXPERIMENT_DEFINITION_FILE 

This file be serialized in experiment's artifact directory, so it can later be reproduced.

This commit also fixes several bugs:

  • In some cases, the code ignores the experiment name provided by users and uses the default experiment. This is fixed now.

This commit adds new dependencies / features:

  • New python dependency - OmegaConf library to interact with configurations of experiments.

What changes are proposed in this pull request?

  • New feature.
  • Bug fix.

Checklist:

  • My code follows the style guidelines of this project (PEP-8 with Google-style docstrings).
  • I have commented my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • If applicable, new and existing unit tests pass locally with my changes.

This commit adds new `experiment run` command that simplifies (to some extent) the process of running ML experiments. This command accepts only one argument - path to the experiment configuration file in YAML format.
Previous mechanism to run experiments (experiment `experiment train` and `experiment search_hp`) is still supported, but will likely be removed in future releases. For more details, run the following command:
```shell
python -m xtime.main experiment --help
```

1. Create a template experiment configuration file by running
   ```shell
   python -m xtime.main experiment create EXPERIMENT_TYPE EXPERIMENT_DEFINITION_FILE
   ```
   where EXPERIMENT_TYPE is the name of one of supported experiments (`train` or `search_hp`) and EXPERIMENT_DEFINITION_FILE is the path to the YAML file that will be created.
2. Edit that file. The source code of these two experiments provides detailed description of each parameters in this file, but many of them have the same semantics as current CLI API.
3. Run experiment by executing the following command:
   ```shell
   python -m xtime.main EXPERIMENT_DEFINITION_FILE
   ```

This file be serialized in experiment's artifact directory, so it can later be reproduced.

This commit also fixes several bugs:
- In some cases, the code ignores the experiment name provided by users and uses the `default` experiment. This is fixed now.

This commit adds new dependencies:
- New python dependency - `OmegaConf` library to interact with configurations of experiments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant