Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ After downloading the weights, you can follow `scripts/featurize.py` to load the
## Train model from scratch:
You can use the guacamol dataset (links at the [bottom](#data))
```shell script
python molbert/apps/smiles.py \
molbert_smiles \
--train_file data/guacamol_baselines/guacamol_v1_train.smiles \
--valid_file data/guacamol_baselines/guacamol_v1_valid.smiles \
--max_seq_length 128 \
Expand All @@ -52,7 +52,7 @@ After you have trained a model, and you would like to finetune on a certain trai

For classification you can set can set the mode to `classification` and the `output_size` to 2.
```shell script
python molbert/apps/finetune.py \
molbert_finetune \
--train_file path/to/train.csv \
--valid_file path/to/valid.csv \
--test_file path/to/test.csv \
Expand All @@ -63,7 +63,7 @@ python molbert/apps/finetune.py \
```
For regression set the mode to `regression` and the `output_size` to 1.
```shell script
python molbert/apps/finetune.py \
molbert_finetune \
--train_file path/to/train.csv \
--valid_file path/to/valid.csv \
--test_file path/to/test.csv \
Expand Down
6 changes: 5 additions & 1 deletion molbert/apps/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,9 @@ def parse_args(self, args) -> Namespace:
return parsed_args


def main():
FinetuneSmilesMolbertApp().run()


if __name__ == '__main__':
trainer = FinetuneSmilesMolbertApp().run()
main()
6 changes: 5 additions & 1 deletion molbert/apps/smiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,9 @@ def add_parser_arguments(parser: ArgumentParser) -> ArgumentParser:
return parser


if __name__ == '__main__':
def main():
SmilesMolbertApp().run()


if __name__ == '__main__':
main()
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,10 @@
'Programming Language :: Python :: 3',
'Operating System :: OS Independent',
),
entry_points={
'console_scripts': [
'molbert_smiles = molbert.apps.smiles:main',
'molbert_finetune = molbert.apps.finetune:main',
],
},
)