Skip to content

Commit 5aaa35b

Browse files
authored
Merge pull request #28 from ChEB-AI/fix/new_pred_pipeline
New prediction pipeline
2 parents 90f8923 + 9f176d6 commit 5aaa35b

5 files changed

Lines changed: 28023 additions & 4 deletions

File tree

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,9 @@ dmypy.json
131131
react-app/build/
132132
react-app/node_modules/
133133

134-
.idea
134+
.idea
135+
136+
data/
137+
backend/data/
138+
.vscode/
139+
backend/config.json

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ and change the path for each setting according to your setup.
3030
The ensemble can take any models that are implemented in [python-chebifier](https://github.com/ChEB-AI/python-chebifier). See the repository for example configurations. Common arguments for a model are:
3131
* `type`: one of the available [MODEL_TYPES](https://github.com/ChEB-AI/python-chebifier/blob/dev/chebifier/model_registry.py), e.g. `electra`,
3232
* `batch_size`: Number of molecules that are passed to the model at once,
33-
* `target_labels_path`: List of ChEBI classes (the `classes.txt` file that comes as part of a [ChEB-AI](https://github.com/ChEB-AI/python-chebai) dataset)
3433
* `classwise_weights_path` (optional): Weights that should be assigned to each class (i.e., trust scores calculated on a validation set with [this script](https://github.com/ChEB-AI/python-chebai/blob/dev/chebai/result/generate_class_properties.py)
3534

3635

backend/api/chemclass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class PredictionDetailApiHandler(Resource):
169169

170170
def post(self):
171171
parser = reqparse.RequestParser()
172-
parser.add_argument("type", type=str)
172+
parser.add_argument("type", type=str, required=False, default="type") # can be used to specify different types of requests in the future
173173
parser.add_argument("smiles", type=str)
174174
parser.add_argument("selectedModels", type=dict)
175175

backend/config.template.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"type": "chebifier type (e.g. electra)",
77
"ckpt_path": "path/to/checkpoint.ckpt",
88
"batch_size": 32,
9-
"target_labels_path": "path/to/classes.txt",
109
"classwise_weights_path": "path/to/trust.json"
1110
}
1211
}

0 commit comments

Comments
 (0)