Giter VIP home page Giter VIP logo

rigid-flows's People

Contributors

invemichele avatar jonkhler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

invemichele

rigid-flows's Issues

Installation instructions

Hi!

I'm having some issues with the install - specifically I'm getting an error from the use of jax_dataclasses within flox (described lower down in this issue). Would it be possible to please provide more detailed setup instructions? I think this error would be resolved if I use the same versions of all libraries as what was used for the original code.

Below I summarise how I am currently setting up the repo, and the error I get:

Install

  1. Make venv with python 3.11
  2. Clone repo
git clone https://github.com/noegroup/rigid-flows.git
cd rigid-flows
  1. Install latest jax (cpu)
pip install --upgrade pip
pip install --upgrade "jax[cpu]"
  1. Install custom libraries not on pypi
git clone https://github.com/jonkhler/mlparams.git
pip install -e ./mlparams/
git clone https://github.com/noegroup/flox.git
pip install -e ./flox/

Side comment: I think it should be noted in the README that these libraries need to be installed like this. Currently these libraries are in the setup.py file so if a user naively tries to setup the repo by cloning it and running pip install -e . then this will not work.

  1. Install other required libraries
pip install genice2 pymbar GitPython tensorflow mdtraj openmm

The error

Then if I run python experiments/run.py I get the following error:

  File "/home/laurence/Documents/work/code/rigid-flows/experiments/run.py", line 13, in <module>
    from flox._src.flow.api import Transform
  File "/home/laurence/Documents/work/code/rigid-flows/flox/flox/__init__.py", line 21, in <module>
    from . import bulk, flow, geom, nn, util
  File "/home/laurence/Documents/work/code/rigid-flows/flox/flox/flow.py", line 1, in <module>
    from ._src.flow import *
  File "/home/laurence/Documents/work/code/rigid-flows/flox/flox/_src/flow/__init__.py", line 3, in <module>
    from .sampling import *
  File "/home/laurence/Documents/work/code/rigid-flows/flox/flox/_src/flow/sampling.py", line 30, in <module>
    @pytree_dataclass(frozen=True)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/laurence/miniconda3/envs/rigid_flows/lib/python3.11/site-packages/jax_dataclasses/_dataclasses.py", line 38, in wrap
    return _register_pytree_dataclass(dataclasses.dataclass(cls, **kwargs))
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/laurence/miniconda3/envs/rigid_flows/lib/python3.11/dataclasses.py", line 1230, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/home/laurence/miniconda3/envs/rigid_flows/lib/python3.11/dataclasses.py", line 1220, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/laurence/miniconda3/envs/rigid_flows/lib/python3.11/dataclasses.py", line 958, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/laurence/miniconda3/envs/rigid_flows/lib/python3.11/dataclasses.py", line 815, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'jaxlib.xla_extension.ArrayImpl'> for field ldj is not allowed: use default_factory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.