Skip to content

torchRL version compatibility: Failed to import torchrl C++ binaries #63

@MarioAsti8

Description

@MarioAsti8

After installing ACEGEN and its dependencies, I tried to run scripts/reinforce/reinforce.py. I had an error that seems to be related to torchRL version and compatibility with other dependencies. I tried both the instructions given in the README file and creating my conda environment through the provided .yml file, only changing the cuda version (mine is 11.8), with the same result in both cases. Below is the full error:

python scripts/reinforce/reinforce.py --config-name config_denovo
/home/mario/miniconda3/envs/acegen/lib/python3.10/site-packages/torchrl/data/replay_buffers/samplers.py:37: UserWarning: Failed to import torchrl C++ binaries. Some modules (eg, prioritized replay buffers) may not work with your installation. You seem to be using the nightly version of TorchRL. If this is a local install, there might be an issue with the local installation. Here are some tips to debug this:

  • make sure ninja and cmake were installed
  • make sure you ran python setup.py clean && python setup.py develop and that no error was raised
  • make sure the version of PyTorch you are using matches the one that was present in your virtual env during setup.
    warnings.warn(EXTENSION_WARNING)
    WARNING:molscore.scoring_functions:OpenEye functions: currently unavailable due to the following: No module named 'openeye'
    WARNING:moleval.metrics.posecheck:PoseCheck metrics: currently unavailable due to the following: No module named 'prolif'
    Error executing job with overrides: []
    Traceback (most recent call last):
    File "/home/mario/software/acegen-open/scripts/reinforce/reinforce.py", line 62, in main
    run_task(cfg, run_reinforce, file)
    File "/home/mario/miniconda3/envs/acegen/lib/python3.10/site-packages/acegen/script_helpers.py", line 88, in run_task
    algorithm(cfg, task)
    File "/home/mario/software/acegen-open/scripts/reinforce/reinforce.py", line 129, in run_reinforce
    sampler=PrioritizedSampler(storage.max_size, alpha=1.0, beta=1.0),
    File "/home/mario/miniconda3/envs/acegen/lib/python3.10/site-packages/torchrl/data/replay_buffers/samplers.py", line 384, in init
    self._init()
    File "/home/mario/miniconda3/envs/acegen/lib/python3.10/site-packages/torchrl/data/replay_buffers/samplers.py", line 418, in _init
    self._sum_tree = SumSegmentTreeFp32(self._max_capacity)
    NameError: name 'SumSegmentTreeFp32' is not defined

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions