|
19 | 19 | [](https://github.com/datamol-io/graphium/actions/workflows/code-check.yml) |
20 | 20 | [](https://github.com/datamol-io/graphium/actions/workflows/doc.yml) |
21 | 21 | [](https://codecov.io/gh/datamol-io/graphium) |
| 22 | +[](https://hydra.cc/) |
22 | 23 |
|
23 | 24 | A deep learning library focused on graph representation learning for real-world chemical tasks. |
24 | 25 |
|
@@ -78,6 +79,27 @@ To learn how to train a model, we invite you to look at the documentation, or th |
78 | 79 |
|
79 | 80 | If you are not familiar with [PyTorch](https://pytorch.org/docs) or [PyTorch-Lightning](https://pytorch-lightning.readthedocs.io/en/latest/), we highly recommend going through their tutorial first. |
80 | 81 |
|
| 82 | +## Running an experiment |
| 83 | +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 |
| 84 | +```bash |
| 85 | +python main_run_multitask.py dataset=toymix model=gcn |
| 86 | +``` |
| 87 | +To change parameters specific to this experiment like switching from `fp16` to `fp32` precision, you can either override them directly in the CLI via |
| 88 | +```bash |
| 89 | +python main_run_multitask.py dataset=toymix model=gcn trainer.trainer.precision=32 |
| 90 | +``` |
| 91 | +or change them permamently in the dedicated experiment config under `expts/hydra-configs/toymix_gcn.yaml`. |
| 92 | +Integrating `hydra` also allows you to quickly switch between accelerators. E.g., running |
| 93 | +```bash |
| 94 | +python main_run_multitask.py dataset=toymix model=gcn accelerator=gpu |
| 95 | +``` |
| 96 | +automatically selects the correct configs to run the experiment on GPU. |
| 97 | +To use a config file you built from scratch you can run |
| 98 | +```bash |
| 99 | +python main_run_multitask.py --config-path [PATH] --config-name [CONFIG] |
| 100 | +``` |
| 101 | +Thanks to the modular nature of `hydra` you can reuse many of our config settings for your own experiments with Graphium. |
| 102 | + |
81 | 103 | ## License |
82 | 104 |
|
83 | 105 | Under the Apache-2.0 license. See [LICENSE](LICENSE). |
|
0 commit comments