Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos-latest fails due to precision issue #1742

Open
abhisrkckl opened this issue Apr 24, 2024 · 4 comments
Open

macos-latest fails due to precision issue #1742

abhisrkckl opened this issue Apr 24, 2024 · 4 comments
Labels

Comments

@abhisrkckl
Copy link
Contributor

#1695 and #1741 are affected at least.

The error I'm seeing is

ImportError while loading conftest '/Users/runner/work/PINT/PINT/conftest.py'.
conftest.py:49: in
pint.utils.require_longdouble_precision()
.tox/py312-test/lib/python3.12/site-packages/pint/utils.py:156: in require_longdouble_precision
raise PINTPrecisionError(
E pint.utils.PINTPrecisionError: PINT needs higher precision floating point than you have available. PINT uses the numpy longdouble type to represent modified Julian days, and this machine does not have sufficient numerical precision to represent sub-microsecond times with np.longdouble. On an M1 Mac you will need to use a Rosetta environment, or on a Windows machine you will need to us a different Python interpreter. Some PINT operations can work with reduced precision, but you have requested one that cannot.

This has nothing to do with the PR contents.

@dlakaplan
Copy link
Contributor

OK, sounds like GitHub changed their macOS build environment. I think the newest OSs only are supported for M?, so this might make sense. Sounds like migration is happening now (github/roadmap#926).

I guess options would be:

  • pin the run to a version that is Intel (maybe macOS-12)
  • try to find a way to use something like rosetta on the macOS-latest runners (so far I don't see that in google results)
  • drop the macOS runner entirely

@abhisrkckl
Copy link
Contributor Author

Perhaps this is useful: https://github.com/grahampugh/Rosetta-2-install

@dlakaplan
Copy link
Contributor

#1745 implements one of the possibilities above, and seems to avoid the error. Not sure if that's the right answer but we could do it temporarily if needed.

@dlakaplan
Copy link
Contributor

I'm going to mark this as tabled: I don't think we have a general solution, but we have something that will allow CI to proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants