Closed dawsonri closed 3 years ago
Fixed! The problem, at least for me, was that I didn't have enough space in my home directory for all the model files. I created a .isochrones directory in a storage area, reinstalled, created a symbolic link called .isochrones in my home directory, and things seem to be working.
Great, glad this all worked out. Let me know if you have any other problems!
Emily and I ran into a few issues, mostly related to eep0, when running pytest on tests.py
Summary: ================================================================= short test summary info ================================================================= FAILED tests.py::test_mist_basic - ValueError: eep0 gives nan for all initial guesses! (1.0, 9.5, -0.2) FAILED tests.py::test_closest_eep - NotImplementedError FAILED tests.py::test_spec - ValueError: eep0 gives nan for all initial guesses! (1.0, 9.6, 0.1) FAILED tests.py::test_tracks - tarfile.ReadError: file could not be opened successfully ========================================================= 4 failed, 3 passed, 1 warning in 30.45s =========================================================
With more details below. I didn't run into these issues when installing isochrones on my laptop, so I think it may be related to the architecture or environment of the cluster we're using. We tried to put as many packages into the Conda environment as possible in the Conda create step (everything except emcee, corner, astroquery, and isochrones) and used version 1.0 of pandas. If you happen to see anything below that might point to what's wrong, we'd appreciate it!
color-coded.pdf
============================= test session starts ============================== platform linux -- Python 3.6.11, pytest-6.1.0, py-1.9.0, pluggy-0.13.1 rootdir: /storage/work/r/rxd44/.conda/envs/isonew/lib/python3.6/site-packages/isochrones/tests plugins: flaky-3.7.0 collected 7 items
tests.py FFFF... [100%]
=================================== FAILURES =================================== ___ test_mist_basic ____
self = <isochrones.mist.isochrone.MIST_Isochrone object at 0x7f7ae4487f60> mass = 1.0, age = 9.5, feh = -0.2, eep0 = 600, resid_tol = 0.02 method = 'nelder-mead', return_object = False, return_nan = False, kwargs = {} eeps_to_try = []
../models.py:560: IndexError
During handling of the above exception, another exception occurred:
bands = 'JHK'
tests.py:14:
tests.py:92: in _basic_ic_checks eep = ic.get_eep(1.0, age, feh, accurate=True) ../models.py:509: in get_eep return self.get_eep_accurate(mass, age, feh, **kwargs)
self = <isochrones.mist.isochrone.MIST_Isochrone object at 0x7f7ae4487f60> mass = 1.0, age = 9.5, feh = -0.2, eep0 = 600, resid_tol = 0.02 method = 'nelder-mead', return_object = False, return_nan = False, kwargs = {} eeps_to_try = []
../models.py:565: ValueError _ test_closesteep
ic = <isochrones.mist.isochrone.MIST_Isochrone object at 0x7f7ae117f828> n = 10000, resid_tol = 0.02
tests.py:81: AssertionError
During handling of the above exception, another exception occurred:
n = 10000
tests.py:24:
tests.py:85: in _check_closest_eep ic.get_eep(ic.minmass + 0.01, 9.0, feh, debug=True)
self = <isochrones.mist.isochrone.MIST_Isochrone object at 0x7f7ae117f828> mass = 0.11, age = 9.0, feh = -3.5, accurate = False, kwargs = {'debug': True} grid = <isochrones.mist.models.MISTIsochroneGrid object at 0x7f7ae117feb8>
../models.py:524: NotImplementedError __ test_spec ___
self = <isochrones.mist.isochrone.MIST_Isochrone object at 0x7f7ae3600ac8> mass = 1.0, age = 9.6, feh = 0.1, eep0 = 600, resid_tol = 0.02 method = 'nelder-mead', return_object = False, return_nan = False, kwargs = {} eeps_to_try = []
../models.py:560: IndexError
During handling of the above exception, another exception occurred:
bands = 'JHK'
tests.py:29:
tests.py:124: in _check_spec eep = ic.get_eep(1.0, 9.6, 0.1, accurate=True) ../models.py:509: in get_eep return self.get_eep_accurate(mass, age, feh, **kwargs)
self = <isochrones.mist.isochrone.MIST_Isochrone object at 0x7f7ae3600ac8> mass = 1.0, age = 9.6, feh = 0.1, eep0 = 600, resid_tol = 0.02 method = 'nelder-mead', return_object = False, return_nan = False, kwargs = {} eeps_to_try = []
../models.py:565: ValueError _ test_tracks __
self = <isochrones.mist.models.MISTEvolutionTrackGrid object at 0x7f7ae1c17048> orig = False
../grid.py:107:
path_or_buf = '/storage/home/rxd44/.isochrones/mist/tracks/mist_v1.2_vvcrit0.4.h5' key = 'df', mode = 'r', errors = 'strict', where = None, start = None stop = None, columns = None, iterator = False, chunksize = None, kwargs = {} exists = False
../../pandas/io/pytables.py:395: FileNotFoundError
During handling of the above exception, another exception occurred:
bands = 'JHK'
tests.py:34:
tests.py:130: in _basic_ic_checks_tracks eep = ic.get_eep(mass, 9.6, feh, accurate=True) ../models.py:509: in get_eep return self.get_eep_accurate(mass, age, feh, **kwargs) ../models.py:558: in get_eep_accurate while np.isnan(self.mass_age_resid(eep0, mass, age, feh)): ../models.py:686: in mass_age_resid age_interp = self.interp_value([mass, eep, feh], ["age"]) ../models.py:400: in interp_value return self.model_grid.interp(pars, props) ../grid.py:136: in interp self._interp = DFInterpolator(self.df, filename=filename, is_full=self.is_full) ../mist/models.py:398: in df self._df = self.read_hdf() ../grid.py:109: in read_hdf df = self.write_hdf(orig=orig) ../grid.py:113: in write_hdf df = self.get_df(orig=orig) ../models.py:114: in get_df df = self.df_all() ../mist/models.py:392: in df_all df = pd.concat([self.df_all_feh_interpolated(feh) for feh in self.fehs]) ../mist/models.py:392: in
df = pd.concat([self.df_all_feh_interpolated(feh) for feh in self.fehs])
../mist/models.py:326: in df_all_feh_interpolated
df = self.df_all_feh(feh)
../mist/models.py:310: in df_all_feh
df = pd.concat([self.to_df(f) for f in self.get_feh_filenames(feh)])
../mist/models.py:294: in get_feh_filenames
self.extract_tarball(feh=feh)
../grid.py:95: in extract_tarball
with tarfile.open(tarball) as tar:
cls = <class 'tarfile.TarFile'> name = '/storage/home/rxd44/.isochrones/mist/tracks/MIST_v1.2_feh_m4.00_afe_p0.0_vvcrit0.4_EEPS.txz' mode = 'r', fileobj = None, bufsize = 10240, kwargs = {} not_compressed = <function TarFile.open..not_compressed at 0x7f7ae1478488>
comptype = 'tar'
func = <bound method TarFile.taropen of <class 'tarfile.TarFile'>>
/storage/home/rxd44/.conda/envs/isonew/lib/python3.6/tarfile.py:1576: ReadError =============================== warnings summary =============================== tests.py::test_mist_basic /storage/home/rxd44/.conda/envs/isonew/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject return f(*args, **kwds)
-- Docs: https://docs.pytest.org/en/stable/warnings.html =========================== short test summary info ============================ FAILED tests.py::test_mist_basic - ValueError: eep0 gives nan for all initial... FAILED tests.py::test_closest_eep - NotImplementedError FAILED tests.py::test_spec - ValueError: eep0 gives nan for all initial guess... FAILED tests.py::test_tracks - tarfile.ReadError: file could not be opened su... ==================== 4 failed, 3 passed, 1 warning in 6.18s ====================