You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-94Lines changed: 25 additions & 94 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,25 +7,41 @@ Graph-based models for molecular property prediction and ontology classification
7
7
8
8
## Installation
9
9
10
-
Some dependencies, especially `torch-` libraries, may not install automatically. In case you are experiencing problems, please install them manually **with versions compatible with your installed PyTorch version**.
10
+
To install this repository, download it and run
11
+
12
+
```bash
13
+
pip install .
14
+
```
15
+
16
+
The dependencies `torch`, `torch_geometric` and `torch-sparse` cannot be installed automatically.
_Note for developers_: If you want to install the package in editable mode, use the following command instead:
34
+
35
+
```bash
36
+
pip install -e .
37
+
```
23
38
24
39
## Recommended Folder Structure
25
40
26
41
ChEB-AI Graph is not a standalone library. Instead, it provides additional models and datasets for [`python-chebai`](https://github.com/ChEB-AI/python-chebai).
42
+
The training relies on config files that are located either in `python-chebai` or in this repository.
27
43
28
-
Therefore, for training we recommend to clone both repositories into a common parent directory. For instance, your project can look like this:
44
+
Therefore, for training, we recommend to clone both repositories into a common parent directory. For instance, your project can look like this:
29
45
30
46
```
31
47
my_projects/
@@ -41,99 +57,14 @@ my_projects/
41
57
42
58
## Training & Pretraining
43
59
44
-
### ⚠️ Important Setup Instructions
45
-
46
-
Before running any training scripts, ensure your environment is correctly configured:
47
-
48
-
***Either**:
49
-
50
-
Install the `python-chebai` and `python-chebai-graph` repositories as packages in your environment. To do this, navigate to the root directory of each repository and run:
51
-
```bash
52
-
pip install .
53
-
```
54
-
55
-
***OR**
56
-
57
-
Manually set the `PYTHONPATH` environment variable if working across multiple directories (`python-chebai` or `python-chebai-graph`):
58
-
59
-
If your **current working directory** is `python-chebai`, set:
60
+
### Ontology Prediction
60
61
61
-
```bash
62
-
export PYTHONPATH=path/to/python-chebai-graph
63
-
```
64
-
65
-
or **vice versa**.
66
62
67
-
> 🔎 See the [PYTHONPATH Explained](#-pythonpath-explained) section below for more details.
68
-
69
-
70
-
### 🧠 Pretraining (Atom/Bond Masking on PubChem)
71
-
72
-
```bash
73
-
python -m chebai fit --model=../python-chebai-graph/configs/model/gnn_resgated_pretrain.yml --data=../python-chebai-graph/configs/data/pubchem_graph.yml --trainer=configs/training/pretraining_trainer.yml
This command trains a Residual Gated Graph Convolutional Network on the ChEBI50 dataset (see [wiki](https://github.com/ChEB-AI/python-chebai/wiki/Data-Management)).
63
+
This example command trains a Residual Gated Graph Convolutional Network on the ChEBI50 dataset (see [wiki](https://github.com/ChEB-AI/python-chebai/wiki/Data-Management)).
80
64
The dataset has a customizable list of properties for atoms, bonds and molecules that are added to the graph.
81
-
The list can be found in the `configs/data/chebi50_graph_properties.yml` file.
65
+
The list can be found in the `configs/data/chebi50_graph_properties.yml` file.
`PYTHONPATH` is an environment variable that tells Python where to search formodules that aren't installed via `pip` or notin your current working directory.
...and you're running the code from `python-chebai`, Python won't know where to find `chebai_graph` (from another repo like `python-chebai-graph/`) unless you add it to `PYTHONPATH`.
0 commit comments