Comments (11)
Hi @Kerro-junior. Unfortunately I can't reproduce this problem. Can you pleas try to run pytest --nogpu
? This might give us some additional clues about the problem.
It takes hours in the 'solving' process when running conda env create -f devtools/conda-envs/gninatorch.yaml`
It is known that conda
can be very slow in solving an environment. I'd strongly recommend to use mamba instead. For me it took less than two minutes to create the environment with mamba env create -f devtools/conda-envs/gninatorch.yaml
.
I have created this environment and install all the libraries manually.
How did you install the libraries manually? With conda
? There are known incompatibilities with libmolgrid
and openbabel
(see gnina/libmolgrid#62), therefore you should be careful about how you install those.
PS: I took the freedom to re-format your issue. Please use code blocks and inline code blocks to make things a bit more readable than plain text.
from gnina-torch.
For your questions, I manually installed the libraries by the consequence you provided in yml file with conda.(but libmolgrid with pip).
I try use $pytest --nogpu
but it also leads to Segmentation fault (core dumped)
$ ls
build CODE_OF_CONDUCT.md docs gninatorch LICENSE __pycache__ README.md setup.cfg tests
CITATION.cff devtools examples gninatorch.egg-info MANIFEST.in pytest.ini readthedocs.yml setup.py versioneer.py
$ pytest --nogpu
Segmentation fault (core dumped)
I will look into the incompatibilities between libmolgrid and openbabel later, and tried use mamba to create environment.
from gnina-torch.
sorry to bother you, but I still cannot use mamba to install the gnina-torch, actually I do not know why I can't install mamba in conda, it always solving the imcompatibility
.
do you have any idea of the reason of
$ pytest --nogpu
Segmentation fault (core dumped)
from gnina-torch.
Unfortunately I can't reproduce the problem on my end, therefore it is a bit difficult to know what's going on.
do you have any idea
Since nothing is printed before the segmentation fault (not even the initial pytest
stuff), I'd suspect the failure is happening within conftest.py
. This would suggest there might be some issues with your molgrid
installation.
it always solving the imcompatibility
As mentioned above, conda is notoriously slow in these situations. In my experience, this was happening when you try to install new things in an already bloated environment (an environment with many different packages, or the base
environment if used for everything). But I haven't seen this issue since I switched to mamba
.
why I can't install mamba in conda
If you look at the mamba
installation instructions, you will see that installing mamba
with conda
is not recommended. Therefore, I'd suggest to try a fresh install from Mambaforge.
from gnina-torch.
Thanks for your advice, I have successfully installed mambaforge into my base environment, and I have successfully used mamba to create gninatorch environment( I notive this env uses python3.11), then use python -m pip install .
successfully installed gninatorch package.
BUT, the pytest still has troubles:
......
Building wheels for collected packages: gninatorch
Building wheel for gninatorch (setup.py) ... done
Created wheel for gninatorch: filename=gninatorch-0.0.2+3.ge46cb51-py3-none-any.whl size=37053758 sha256=76adaede79bdab7484c927344773e4a6612ce7ae60fe89e4da09f792cadaf349
Stored in directory: /tmp/pip-ephem-wheel-cache-p64x6wx4/wheels/af/ee/f2/cba9368ce892555bc0147841fd0a14502c3d17893e4b99760d
Successfully built gninatorch
Installing collected packages: pyquaternion, molgrid, gninatorch
Attempting uninstall: gninatorch
Found existing installation: gninatorch 0.0.2+3.ge46cb51
Can't uninstall 'gninatorch'. No files were found to uninstall.
Successfully installed gninatorch-0.0.2+3.ge46cb51 molgrid-0.5.3 pyquaternion-0.9.9
(gninatorch) [/home/user/gnina-torch]$ pytest --cov=gninatorch
-bash: /data2/rjli/bin/pytest: /data2/rjli/anaconda3/bin/python3.10: bad interpreter: No such file or directory
Then I check some basic information about python:
(gninatorch) [/home/user/gnina-torch]$ python
Python 3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
then I tried base environment to do pytest, still error
(gninatorch) [/home/user/gnina-torch]$ mamba activate base
(base) [/home/user/gnina-torch]$ pytest --cov=gninatorch
-bash: /data2/rjli/bin/pytest: /data2/rjli/anaconda3/bin/python3.10: bad interpreter: No such file or directory
from gnina-torch.
/data2/rjli/anaconda3/bin/python3.10
There is clearly something off with your configuration, since it is picking up Python not from the environment.
- Have you re-started your shell after installing
mamba
? Try to re-start the shell and re-activate thegina-torch
environment. - Was
pytest
correctly installed in your environment? Try to usepython -m pytest --cov=gninatorch
to make sure.
I have successfully installed mambaforge into my base environment
As mentioned previously, this is not recommended by the mamba
community, so it might also be part of the problem.
from gnina-torch.
Thanks, I have re-active the gninatorch
environment, and it finally reports the test information:
$ python -m pytest --cov=gninatorch
ImportError while loading conftest '/data2/rjli/gnina-torch/tests/conftest.py'.
tests/conftest.py:3: in <module>
import molgrid
../anaconda3/lib/python3.11/site-packages/molgrid/__init__.py:1: in <module>
from .molgrid import *
E SystemError: type Boost.Python.enum has the Py_TPFLAGS_HAVE_GC flag but has no traverse function
Sorry to bother you, but I have no idea how to handle this libmolgrid import error...
from gnina-torch.
Can you please try to build an environment with Python 3.10 and see if something changes?
from gnina-torch.
I firstly use mamba update python=3.10
to change the gninatorch environment's python, then I run the pytest and got:
(gninatorch)$ python -m pytest --cov=gninatorch
version `GLIBCXX_3.4.30' not found (required by ~/mambaforge/envs/gninatorch/lib/python3.10/site-packages/torch/lib/libtorch_python.so)
Failed to import torch.
ImportError while loading conftest 'gnina-torch/tests/conftest.py'.
tests/conftest.py:5: in <module>
import torch
../mambaforge/envs/gninatorch/lib/python3.10/site-packages/torch/__init__.py:199: in <module>
from torch._C import * # noqa: F403
So I delete the specific gcc I defined in the ~/.bashrc, and run the pytest again:
$ python -m pytest --cov=gninatorch
ImportError while loading conftest '/home/user/gnina-torch/tests/conftest.py'.
tests/conftest.py:3: in <module>
import molgrid
../anaconda3/lib/python3.11/site-packages/molgrid/__init__.py:1: in <module>
from .molgrid import *
E SystemError: type Boost.Python.enum has the Py_TPFLAGS_HAVE_GC flag but has no traverse function
HOW STRANGE it is! the python of gninatorch turn into python3.11 again?I tried again 'mamba update python=3.10' to update python into 3.10 but failed.SO I remove the env and modify the .yaml
file in /devtools/conda-envs
as 'python=3.9' (I saw a mamba warning about molgrid require python3.9
specifically), and thenpython -m pip install .
Then I conda activate gninatorch
, the python is still 3.11, Later I realized I need to use 'mamba activate gninatorch
' to use the python3.9 installed in gninatorch. If I use 'conda activate gninatorch' the python will always point to /anaconda3/bin/python3.11
So finally after I installed the gninatorch with mamba, BUT it constantly report errors:
ImportError while loading conftest '/data2/rjli/gnina-torch/tests/conftest.py'.
tests/conftest.py:5: in <module>
import torch
../mambaforge/envs/gninatorch/lib/python3.9/site-packages/torch/__init__.py:199: in <module>
from torch._C import * # noqa: F403
E ImportError: /home/software/support/gcc/950/lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/user/mambaforge/envs/gninatorch/lib/python3.9/site-packages/torch/lib/libtorch_python.so)
from gnina-torch.
I learned that it's the problem of my gcc, FYI my gcc is assigned by adding source /home/software/ENV/support/gcc/gcc-9.5.0.env
, and when I run 'which gcc' it echos: /home/software/support/gcc/950/bin/gcc
I would be grateful if you can teach how to solve the problem ImportError: /home/software/support/gcc/950/lib64/libstdc++.so.6: version
GLIBCXX_3.4.30' not found`, casue I know little about these stuff...
from gnina-torch.
@Kerro-junior thanks for checking. Since this is a problem with how your setup is (mis-)configured, I can't help much. You will have to fix how things are setup on your end.
What I can suggest is to try to install a newer version of GCC from coda-forge
within your gninatorch
environment:
mamba install -c condo-forge gcc=12.1.0
from gnina-torch.
Related Issues (19)
- Allow file mapped GNINA typer
- Common weights initialisation
- Default arguments logging is confusing
- Names of some output files are hard-coded
- Learning rate scheduler is called twice on both train and test losses
- Timings
- Inconsistent CLI arguments for model specification
- Allow user to choose not to cache structures
- Are pretrained models available? HOT 8
- Add functionality to use GNINA pre-trained models
- Contents of configuration file
- Guidance on preparing data for training from structures
- Erroneous random translation
- Pytest error after install with mamba-forge HOT 2
- How can I use model trained by gnina-torch to perform dock in gnina?
- gnina-torch
- *** Error in `python': free(): invalid pointer: 0x00002aaaffba8c40 *** HOT 3
- Expose additional parameters
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gnina-torch.