choderalab / espaloma

Extensible Surrogate Potential of Ab initio Learned and Optimized by Message-passing Algorithm 🍹https://arxiv.org/abs/2010.01196
https://docs.espaloma.org/en/latest/
MIT License
202 stars 23 forks source link

qcportal 0.50 is incompatible with espaloma #185

Open pavankum opened 9 months ago

pavankum commented 9 months ago

Hi,

The new version of qcportal 0.50 is incompatible with the current espaloma package, may have to pin down to 0.15.8 or other in that line. It throws this error:

Traceback (most recent call last):
  File "/espaloma/../../utils/espaloma_minimization.py", line 1, in <module>
    import espaloma as esp
  File "miniconda3/envs/espaloma/lib/python3.10/site-packages/espaloma/__init__.py", line 6, in <module>
    from . import metrics, units, data, app, graphs, mm, nn
  File "miniconda3/envs/espaloma/lib/python3.10/site-packages/espaloma/data/__init__.py", line 2, in <module>
    from . import dataset, md, normalize, utils, qcarchive_utils, md17_utils
  File "miniconda3/envs/espaloma/lib/python3.10/site-packages/espaloma/data/qcarchive_utils.py", line 105, in <module>
    def fetch_td_record(record: ptl.models.torsiondrive.TorsionDriveRecord):
AttributeError: module 'qcportal' has no attribute 'models'
jchodera commented 9 months ago

qcportal 0.50 was released 6 days ago and has API-breaking changes.

@mikemhenry : Can you help us update the espaloma conda package to pin to 0.15.8?

We'll have to update to the new qcportal 0.50 API for releases beyond espaloma 0.3 since the paper is imminent.

ijpulidos commented 9 months ago

I tried to look for a CHANGELOG (or similar) but I couldn't easily find one, do we know if there's documentation on what was changed? Just such that it's easier to know what to adapt on our end, if possible. I know the qcportal package is now being developed inside the qcfractal repo.

pavankum commented 9 months ago

@ijpulidos here is the new documentation, there are a ton of changes and new ways to access data, might be better to join the QCA call on Tuesdays for feedback from Ben and David.

jchodera commented 9 months ago

@chrisiacovella has been joining those calls---perhaps he would be in a good position to help fix this up?

mikemhenry commented 9 months ago

I can submit a repodata patch to add the pin since I think that will be faster than updating the API and then cutting a new release, but I do agree it would be better to update espaloma to work with the new qcportal.

mikemhenry commented 9 months ago

Looks like openff had the same issue https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/550

chrisiacovella commented 9 months ago

Pinning to the old version is probably the best immediate fix (as syntax has completely changed, for the better, in the newest version). I'm currently working on putting essentially the same routines into model forge, so I can create a PR updating the syntax, including the much more efficient ways to fetch the records that have been introduced in the new code.

mikemhenry commented 9 months ago

Patch here https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/555

mikemhenry commented 9 months ago

Also in the meantime, adding "qcportal<0.50.0a0" when installing espaloma will work.

mikemhenry commented 9 months ago

Also update the recipe as well https://github.com/conda-forge/espaloma-feedstock/pull/9 but that fix will not be retroactive like the repodata patch will be.