Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prettify molecular optimization section in README.md #37

Merged
merged 1 commit into from
Jul 29, 2024
Merged
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
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ Instructions coming soon...
### Fine-tuning
Instructions coming soon...

### Molecular optimization
In order to run the optimization algorithm, define the Oracle as a class, that is responsible for calculating the Oracle fuction for given molecules.
### Molecular Optimization 🎯
Running the Optimization Algorithm requires two steps:

```python
# Oracle implementation scheme
**Step 1.** Define the Oracle, which is responsible to evaluate the oracle score for the given molecules. Below is presented the Oracle implementation scheme.

```python
class ExampleOracle:
def __init__(self, ...):
# maximum number of oracle calls to make
Expand All @@ -75,14 +75,14 @@ class ExampleOracle:
"""
Specify the stopping condition for the optimization process.
"""
...
return stopping_condition
```

Define configuration and hyperparameters used for the optimization process in a yaml file.
**Step 2**. Define the hyperparameters for the optimization algorithm (such as the pool size, number of similar molecules to have in the prompts, sampling temperature, etc.) in a *.yaml* file.

```yaml
# yaml config scheme

# model_hparams.yaml
checkpoint_path: /path/to/model_dir
tokenizer_path: /path/to/tokenizer_dir

Expand All @@ -97,7 +97,7 @@ rej_sample_config:
... fine tuning hyperparameters ...
```

Putting everything toghether and running the optimization process.
Calling the **optimize** function.

```python
from chemlactica.mol_opt.optimization import optimize
Expand All @@ -119,7 +119,7 @@ optimize(
)
```

[example_run.py]() illustrates a full working example of an optimization run. For more complex examples refer to the [ChemlacticaTestSuit]() repository [mol_opt/run.py]() and [retmol/run_qed.py]() files.
Refer to [example_run.py](https://github.com/YerevaNN/ChemLactica/blob/main/chemlactica/mol_opt/example_run.py) for a full working example of an optimization run. For more complex examples refer to the [ChemlacticaTestSuit]() repository [mol_opt]() and [retmol]() directories.

## Tests
The test for running the a small sized model with the same
Expand Down
Loading