Closed pdebuyl closed 5 months ago
Hi @pdebuyl, thanks for this report. I confirmed the same import error on the Binder just now.
Strange that our nightly build hasn't caught this. We'll take a look.
I've confirmed that the same error gets thrown on the Binder in any notebook that does
from pythia_datasets import DATASETS
The infrastructure team will need to take a look at modernizing the pythia_datasets package which hasn't seen a maintenance release since September 2021.
I'm not sure that there's anythng per se wrong with the pythia_datasets package. It looks to be more related to Python 3.12 and older versions of setuptools
(see, e.g. https://stackoverflow.com/questions/77364550/attributeerror-module-pkgutil-has-no-attribute-impimporter-did-you-mean).
Running the ENSO notebook on Binder just now, the version of setuptools
that is on this image is 65.4.1. The current version is 69.0.3. Manually updating this library in my interactive Binder instance resolved the pythia_datasets import error.
Nevertheless, this seems to expose a Binder-related infrastructure issue, in that existing environments may not be being refreshed.
Good point, thanks @ktyle.
I tried launching the Binder interactively from the links in Foundations after merging #443, expecting that a new image would be built with latest packages since there were new commits on the main branch, but this didn't seem to happen.
Does the Binder only build a new image when the environment file changes?
I'll take a look-see!
@brian-rose @pdebuyl I think this should be resolved now.
Yes, I confirmed that the imports are working on the Binder now, yay!
So my takeaway from this is that the Binder only builds a new image if the environment.yml
file changes, as in #444, but not for just any push to the main branch. I'm trying to figure out if this is a feature or a bug. It does mean that the environment the Binder is using gets stale relative to what we're testing in our nightly builds -- which always uses the latest package versions.
Based on the Binder docs, a new image should be built whenever a commit is pushed ... I'm not sure why that wasn't the case in #443.
Thanks all :-)
(PS: i was testing the notebook when following the Open Science 101 MOOC so this will probably make other people happy).
What happened:
When running the cell
from
core/xarray/enso-xarray.ipynb
, there is an error at import:What you expected to happen:
Successful import.
Minimal Complete Verifiable Example:
See above or follow https://foundations.projectpythia.org/core/xarray/enso-xarray.html (direct binder link https://binder.projectpythia.org/v2/gh/ProjectPythia/pythia-foundations/main?urlpath=lab/tree/core/xarray/enso-xarray.ipynb )
Anything else we need to know?:
Environment:
sys.version_info
)