Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Missing grid_info and grid_info explanation in docs/tutorial_deeplearning.rst #185

Open
DarioMarzella opened this issue Jul 15, 2020 · 8 comments
Assignees

Comments

@DarioMarzella
Copy link
Member

Describe the bug
In docs/tutorial_deeplearning.rst, line 28, where generating the 'data_set', grid_info is not specified.

Actual Results or Error Info
Traceback (most recent call last): File "dl_try.py", line 51, in <module> dict_filter={'IRMSD':'<4. or >10.'}) File "/home/dariomarzella/deeprank/deeprank/learn/DataSet.py", line 202, in __init__ self.process_dataset() File "/home/dariomarzella/deeprank/deeprank/learn/DataSet.py", line 277, in process_dataset self.get_grid_shape() File "/home/dariomarzella/deeprank/deeprank/learn/DataSet.py", line 813, in get_grid_shape f'Impossible to determine sparse grid shape.\n' ValueError: Impossible to determine sparse grid shape. If you are not loading a pretrained model, specify grid_shape or grid_info

Additional Context
I have added the grid_info to the code block as it is in "test/test_learn.py" line 45 in commit #0ce8fd8 to branch doc_DM, but we may need a proper explanation of this feature in the tutorial.

@demainchen
Copy link

mee too! i also trap myself in this problem and no idea to resolve this problem so far

@DarioMarzella DarioMarzella self-assigned this Jun 17, 2021
@DarioMarzella
Copy link
Member Author

DarioMarzella commented Jun 17, 2021

mee too! i also trap myself in this problem and no idea to resolve this problem so far

Hello demainchen, thanks for posting here your issue!
Could I ask you exactly where did you have this problem, so that I can reproduce it exactly? While running the tutorial present in the documentation (https://deeprank.readthedocs.io/en/latest/tutorial3_learning.html ) or while running a different script you made?

In the meantime, you can check the documentation for the DataSet class. There you can find a short explanation of what grid_info and grid_shape are.
I also just noticed there is a bug in how that docstring is reported, I will check it out and fix it asap.

@demainchen
Copy link

demainchen commented Jun 17, 2021 via email

@DarioMarzella
Copy link
Member Author

Hello, it's a pleasure to help!
Unfortunately, I cannot see your attachment, could you please double check you added it to your message, or re-attach it?
I think the issue can be solved by simply giving the correct arguments to the grid_info, but I will be able to tell you once I see the code.

@demainchen
Copy link

demainchen commented Jun 18, 2021 via email

@DarioMarzella
Copy link
Member Author

DarioMarzella commented Jun 18, 2021

Don't worry, it's a pleasure :)
No, not really... can you just attach the google colab file?

In the meantime, I am trying to reproduce the bug on my side.

@demainchen
Copy link

demainchen commented Jun 18, 2021 via email

@DarioMarzella
Copy link
Member Author

DarioMarzella commented Jun 18, 2021

Do not worry about the reply time, we are all busy and it can always take some time to reply.

Although I am not sure why the grid_shape=[30,30,30] is not working, I think you can solve it with grid_info.
Previously in your code, you defined the dictionary grid_info with number of points, resolution and atom type.
You should be able to use that same dictionary to build your dataset, so instead of grid_shape=[30,30,30], use grid_info=grid_info.

EDIT: I noted my modification probably don't show up in your notebook. If you still have the grid_shape=[30,30,30] please change it to grid_info=grid_info before running it.

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

No branches or pull requests

2 participants