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

data_root error while defining ExampleProvider #107

Open
drorhunvural opened this issue Feb 27, 2023 · 3 comments
Open

data_root error while defining ExampleProvider #107

drorhunvural opened this issue Feb 27, 2023 · 3 comments

Comments

@drorhunvural
Copy link

I have a gninatypes file. The path of this file is gninatype_dir

I have a sample.types file containing a single line. The contents of the file are as follows.

12.531857 1.317891e+01 3.390248e+01 5bqh_protein_nowat.gninatypes

My question is I get an error in batch =e_test_1.next_batch() part of a code block like below

ValueError: Could not read /content/5bqh_protein_nowat.gninatypes/5bqh_protein_nowat.gninatypes

The problem is that the path of the file changes from /content/5bqh_protein_nowat.gninatypes to /content/5bqh_protein_nowat.gninatypes/5bqh_protein_nowat.gninatypes and cannot find it.

Is there a mistake I made while creating the ExampleProvider?

gninatype_dir = '/content/5bqh_protein_nowat.gninatypes'
sample_types = '/content/sample.types'

e_test_1 = molgrid.ExampleProvider(data_root= gninatype_dir, stratify_min = 0, stratify_max = 5, stratify_step=1, labelpos=0, shuffle=False,stratify_receptor=False, balanced = False)
e_test_1.populate(sample_types)

for i in range(1):
        model_categorized.eval()
        batch =e_test_1.next_batch()
        ...
@dkoes
Copy link
Contributor

dkoes commented Feb 28, 2023

'/content/5bqh_protein_nowat.gninatypes' is not a directory. You should have
gninatype_dir = '/content/'

@drorhunvural
Copy link
Author

How does it find the 5bqh_protein_nowat.gninatypes file in /content. Is there a search function running in core molgrid that searches for the protein gninatypes in sample.types to find in /content?

@dkoes
Copy link
Contributor

dkoes commented Mar 1, 2023

You told it where the data was when you set the data_root parameter.

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