Constrain Python 3.12 dependency updates#59
Conversation
|
What are your thoughts on deprecating support for Espaloma as a charge model? It appears many of the Python 3.12 env problems are coming from incompatible NumPy/TensorFlow constraints associated with this charger. Specifically, current mbuild pulls gmso>=0.16, which requires numpy>=2, while espaloma_charge pulls dgl -> tensorflow-base=2.17, which requires numpy<2 on Python 3.12. mbuild + openff-toolkit itself seems to solve fine without that broader Espaloma stack. From my understanding, we want people using OpenFF NAGL/AshGC now anyway. Maybe the cleanest path is to remove espaloma_charge from the default/test envs, keep EspalomaCharger temporarily as deprecated/backward-compatible, and switch examples/docs toward NAGL. |
|
Note, this can be closed should a PR be opened to address #60 . These are the env files I used to get 3.12 working though for reference. |
Lower cap makes sense, but why the upper cap at 3.13? Which tests/deps fail without it?
Regrettable these are still needed (was hoping to ditch all upper version pins while rooting around during these updates), but I can confirm
That sounds like a reasonable path forward, as you pointed out in more detail in #60
I don't see any attachments, did you forget to include them? At any rate, apart from verifying that the shipped conda envs YAMLs install, I also want to try to follow a mock pip-install as detailed in this comment, as that will be most useful as a pre-check that a PyPI build will be installable. |
|
As a semi-related small test fix, I noticed the |
|
Thanks, that makes sense. I reran the validation with the newer mBuild context from Chris, and I think we now have a clearer path. On
Validation I ran on
|
Was able to confirm as well, looks like pinning mbuild>=1.0 along with the setuptools<82 re-pin seems to be enough to fix the mbuild import issues
That's the plan, though let's wait to close #59 until #58 is merged. I want to make sure I've resolved any pending concerns before closing anything.
The conda solver should be smart enough to figure 3.12 is the only workable version without the upper pin, as I've confirmed with the local pip-like install detailed #60 (which included openbabel) and in the updated env YAMLs, which now pass CI for 3.12 in #58 without the explicit pin. The main reason I'm concerned about it is to avoid a similar process to this update in a year and a half when Python 3.13 hits end-of-life. Ideally the deps mentioned have updated their compat before then, and the lack of upper pins means the install here *should* adapt accordingly if they have, though of course the devil is in the details. Returning to the present, if you can confirm that the updated envs solve and pass tests as the most recent CI indicates, then all that remains is for me to update docs and examples per #60 and the 3.12-compat release in #58 should be ready to roll out! |
|
I re-tested latest py312-updates at e90c526 in a fresh Python 3.12 env using your updated envs. Results:
So #58 looks good for Python 3.12 now. The mbuild>=1.0 change avoids the broken mbuild=0.16.4 path, setuptools<82 is respected, and removing espaloma_charge from the default env/install path does not break the suite. Thanks for your help with this! |
Great! I'll update docs and examples then and do a dummy release to see if pip install works from the TestPyPI server. If it does, I'll put out an official release which you ought to be able to install into any extant envs the clear up the <3.11 blockage; I'll poke later today when that's ready to install.
Of course, thanks for pointing out the spots to look, helped with debug! |
|
Alright @joelaforet , I've removed the references to Espaloma-charge in the tutorials in |
|
Closed with 1.1.0 release |
This is a small follow-up to PR #58 based on dependency solver debugging for Python 3.12.
Findings:
importlib.resources._commonusage inpkginspect.py; the existing PR fix usingModuleSpec.submodule_search_locationslooks correct.Changes here:
Validation run locally: