|
1 | 1 | # `graphium-train` |
2 | 2 |
|
3 | | -To support advanced configuration, Graphium uses [`hydra`](https://hydra.cc/) to manage and write config files. A limitation of `hydra`, is that it is designed to function as the main entrypoint for a CLI application and does not easily support subcommands. For that reason, we introduced the `graphium-train` command in addition to the [`graphium`](./graphium.md) command. |
| 3 | +To support advanced configuration, Graphium uses [`hydra`](https://hydra.cc/) to manage and write config files. A limitation of `hydra`, is that it is designed to function as the main entrypoint for a CLI application and does not easily support subcommands. For that reason, we introduced the `graphium-train` command in addition to the [`graphium`](./graphium.md) command. |
4 | 4 |
|
5 | 5 | !!! info "Curious about the configs?" |
6 | 6 | If you would like to learn more about the configs, please visit the docs [here](https://github.com/datamol-io/graphium/tree/main/expts/hydra-configs). |
7 | 7 |
|
8 | 8 | This page documents `graphium-train`. |
9 | 9 |
|
10 | 10 | ## Running an experiment |
11 | | -To run an experiment go to the `expts/hydra-configs` folder for all available configurations. For example, to benchmark a GCN on the ToyMix dataset run |
| 11 | +We have setup Graphium with `hydra` for managing config files. To run an experiment go to the `expts/` folder. For example, to benchmark a GCN on the ToyMix dataset run |
12 | 12 | ```bash |
13 | | -graphium-train dataset=toymix model=gcn |
| 13 | +graphium-train architecture=toymix tasks=toymix training=toymix model=gcn |
14 | 14 | ``` |
15 | 15 | To change parameters specific to this experiment like switching from `fp16` to `fp32` precision, you can either override them directly in the CLI via |
16 | 16 | ```bash |
17 | | -graphium-train dataset=toymix model=gcn trainer.trainer.precision=32 |
| 17 | +graphium-train architecture=toymix tasks=toymix training=toymix model=gcn trainer.trainer.precision=32 |
18 | 18 | ``` |
19 | | -or change them permamently in the dedicated experiment config under `expts/hydra-configs/toymix_gcn.yaml`. |
| 19 | +or change them permanently in the dedicated experiment config under `expts/hydra-configs/toymix_gcn.yaml`. |
20 | 20 | Integrating `hydra` also allows you to quickly switch between accelerators. E.g., running |
21 | 21 | ```bash |
22 | | -graphium-train dataset=toymix model=gcn accelerator=gpu |
| 22 | +graphium-train architecture=toymix tasks=toymix training=toymix model=gcn accelerator=gpu |
23 | 23 | ``` |
24 | 24 | automatically selects the correct configs to run the experiment on GPU. |
25 | | -Finally, you can also run a fine-tuning loop: |
| 25 | +Finally, you can also run a fine-tuning loop: |
26 | 26 | ```bash |
27 | 27 | graphium-train +finetuning=admet |
28 | 28 | ``` |
@@ -50,5 +50,5 @@ graphium-train [...] datamodule.args.processed_graph_data_path=[path_to_cached_d |
50 | 50 | ??? note "Config vs. Override" |
51 | 51 | As with any configuration, note that `datamodule.args.processed_graph_data_path` can also be specified in the configs at `expts/hydra_configs/`. |
52 | 52 |
|
53 | | -??? note "Featurization" |
| 53 | +??? note "Featurization" |
54 | 54 | Every time the configs of `datamodule.args.featurization` change, you will need to run a new data preparation, which will automatically be saved in a separate directory that uses a hash unique to the configs. |
0 commit comments