Skip to content

Commit

Permalink
Repairing the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bieniekmateusz committed May 26, 2024
1 parent cd54bfb commit 2a369cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fegrow/testing/test_chemspace.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import copy
import pathlib
import tempfile

Expand Down Expand Up @@ -284,7 +285,8 @@ def full_evaluation(scaffold,
*args,
**kwargs):
# return: mol, data
return None, {"score": 5}
mol = copy.deepcopy(scaffold)
return mol, {"score": 5}

chemspace.evaluate([0], full_evaluation=full_evaluation)

Expand Down Expand Up @@ -400,7 +402,7 @@ def test_al_full(RGroups, sars_scaffold_chunk_sdf, rec_7l10_final_path):

def oracle_look_up(scaffold, h, smiles, *args, **kwargs):
# mol, data
return None, {"score": oracle[oracle.Smiles == smiles].iloc[0].cnnaffinity}
return Chem.MolFromSmiles(smiles), {"score": oracle[oracle.Smiles == smiles].iloc[0].cnnaffinity}

# select random molecules
random_pics = chemspace.active_learning(n=3, first_random=True)
Expand Down

0 comments on commit 2a369cf

Please sign in to comment.