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

Expected shape error in AlphaFold step, advanced notebook #23

Closed
SKleinfelter opened this issue Aug 18, 2021 · 5 comments
Closed

Expected shape error in AlphaFold step, advanced notebook #23

SKleinfelter opened this issue Aug 18, 2021 · 5 comments

Comments

@SKleinfelter
Copy link

Go this error twice today on AlphaFold step with different input sequences - can you help?
Advanced notebook, input was a protein plus peptide (formatted as AAAAAAA:BBBBBB), genetic search succeeded.
Thanks for any help!

Running model_1_ptm_seed_0: 0%
0/5 [elapsed: 10:06 remaining: ?]

IndexError Traceback (most recent call last)
in ()
188
189 prediction_result, (r, t) = cf.to(model_runner.predict(processed_feature_dict, random_seed=seed),"cpu")
--> 190 outs[key] = parse_results(prediction_result, processed_feature_dict)
191
192 # report

3 frames
/usr/local/lib/python3.7/dist-packages/jax/_src/numpy/lax_numpy.py in _expand_bool_indices(idx, shape)
5400 expected_shape = shape[len(out): len(out) + _ndim(i)]
5401 if i_shape != expected_shape:
-> 5402 raise IndexError("boolean index did not match shape of indexed array in index "
5403 f"{dim_number}: got {i_shape}, expected {expected_shape}")
5404 out.extend(np.where(i))

IndexError: boolean index did not match shape of indexed array in index 2: got (63,), expected (64,)

@sokrypton
Copy link
Owner

The error should now be fixed! Can you refresh and try again on the same example?

@phylars
Copy link

phylars commented Aug 18, 2021

Hi. I got exactly the same error as well. By the time I check this issue report, this problem is NOT fixed yet. I repeated so many times with different setting, the same problem always occur like above:

Running model_1_ptm_seed_0: 0%
0/5 [elapsed: 12:50 remaining: ?]

IndexError Traceback (most recent call last)
in ()
188
189 prediction_result, (r, t) = cf.to(model_runner.predict(processed_feature_dict, random_seed=seed),"cpu")
--> 190 outs[key] = parse_results(prediction_result, processed_feature_dict)
191
192 # report

3 frames
/usr/local/lib/python3.7/dist-packages/jax/_src/numpy/lax_numpy.py in _expand_bool_indices(idx, shape)
5400 expected_shape = shape[len(out): len(out) + _ndim(i)]
5401 if i_shape != expected_shape:
-> 5402 raise IndexError("boolean index did not match shape of indexed array in index "
5403 f"{dim_number}: got {i_shape}, expected {expected_shape}")
5404 out.extend(np.where(i))

IndexError: boolean index did not match shape of indexed array in index 2: got (63,), expected (64,)

@sokrypton
Copy link
Owner

@phylars can you refresh the notebook and try again? I wonder if you didn't get the latest notebook yet.

Can you send me the sequence you used (you can email me at so@fas.harvard.edu if it's private) I can try on my side.

@phylars
Copy link

phylars commented Aug 18, 2021

@sokrypton Thank you. I just reopened a new one. It works now.

@sokrypton
Copy link
Owner

Yay! Thanks for the report.

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

3 participants