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

hardcoded paths in training validation_step #12

Closed
linminhtoo opened this issue Jul 27, 2022 · 1 comment
Closed

hardcoded paths in training validation_step #12

linminhtoo opened this issue Jul 27, 2022 · 1 comment

Comments

@linminhtoo
Copy link

linminhtoo commented Jul 27, 2022

hello wenhao & rocio,

the unittests are great and gives a great overview of how different modules should be run. however, I saw that in these lines, the path to the building block embeddings are hardcoded to the path on the HPC cluster.

if out_feat == 'gin':
bb_emb_gin = np.load('/pool001/whgao/data/synth_net/st_hb/enamine_us_emb_gin.npy')
kdtree = BallTree(bb_emb_gin, metric='euclidean')
elif out_feat == 'fp_4096':
bb_emb_fp_4096 = np.load('/pool001/whgao/data/synth_net/st_hb/enamine_us_emb_fp_4096.npy')
kdtree = BallTree(bb_emb_fp_4096, metric='euclidean')
elif out_feat == 'fp_256':
bb_emb_fp_256 = np.load('/pool001/whgao/data/synth_net/st_hb/enamine_us_emb_fp_256.npy')
kdtree = BallTree(bb_emb_fp_256, metric=cosine_distance)
elif out_feat == 'rdkit2d':
bb_emb_rdkit2d = np.load('/pool001/whgao/data/synth_net/st_hb/enamine_us_emb_rdkit2d.npy')
kdtree = BallTree(bb_emb_rdkit2d, metric='euclidean')

so, I am unable to make pytest pass, specifically:

FAILED tests/test_Training.py::TestTraining::test_reactant1_network - UnboundLocalError: local variable 'kdtree' referenced before assignment
FAILED tests/test_Training.py::TestTraining::test_reactant2_network - UnboundLocalError: local variable 'kdtree' referenced before assignment

at least for the unittest, what should the correct path be? and would it be possible to make these paths user-passable arguments?


path_to_data = f'/pool001/whgao/data/synth_net/st_{args.rxn_template}/st_{args.data}.json.gz'

there's a similar hardcoding in this line, so I suppose we'll have to generate the .json.gz ourselves

@rociomer
Copy link
Collaborator

We have addressed this and other issues in the new version of SynNet (thanks to @chrulm!). Closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants