timothydmorton / isochrones

Pythonic stellar model grid access; easy MCMC fitting of stellar properties
http://isochrones.readthedocs.org
MIT License
117 stars 63 forks source link

Issue with nosetest #138

Open quadrychance opened 3 years ago

quadrychance commented 3 years ago

Hi Tim,

As far as I can tell, the install process went fine. When I try to run nosetest, it fails. The two likely culprits seem to be: WARNING: CPU random generator seem to be failing, disable hardware random number generation WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff

and

ValueError: Specified a delimiter with both sep and delim_whitespace=True; you can only specify one.

I'm not sure if the first thing is an issue as far as getting the test to run, but I'm getting a divide by zero warning because of it. This seems to be a microcode issue with AMD Ryzen processors (and Destiny 2 apparently). RDRAND always returns -1 on Zen 2 processors. I think this is supposed to be fixed in a BIOS update, but I'd like to avoid that if possible.

The second issue seems pretty straightforward. I'm currently on pandas 1.1.1 and can just rollback in this conda environment if necessary, although I don't know what version that change was made in.

dfm commented 3 years ago

It looks to me like that first issue isn't going to be an isochrones problem and I'd say that solving it is above my pay grade, but I think that we can probably solve the delimiter issue without too much trouble. Can you post more of the ValueError traceback? What line of the code is it being triggered from?

dfm commented 3 years ago

I can reproduce this error with the current version of pandas on Linux: https://travis-ci.com/github/dfm/isochrones/builds/184434873

It looks like the mac build is fine, but that's not true. Instead there must be some dependency issues that are causing conda to install quite an old version of pandas on mac (1.0.5).

I think the real issue is actually the following:

Traceback (most recent call last):
  File "/home/travis/miniconda/lib/python3.8/site-packages/isochrones-2.1-py3.8.egg/isochrones/grid.py", line 107, in read_hdf
    df = pd.read_hdf(h5file, path)
  File "/home/travis/miniconda/lib/python3.8/site-packages/pandas/io/pytables.py", line 387, in read_hdf
    raise FileNotFoundError(f"File {path_or_buf} does not exist")
FileNotFoundError: File /home/travis/.isochrones/mist/mist_v1.2_vvcrit0.4_full_isos.h5 does not exist

@timothydmorton: thoughts?

dfm commented 3 years ago

@quadrychance: I'll keep looking into fixing this, but for now, can you try downgrading pandas to <1.1 and see if that works?

timothydmorton commented 3 years ago

@quadrychance try also the following.

Clone master isochrones from github, make a new environment locally like this:

conda create -n isochrones python
conda activate isochrones
conda install -c conda-forge numpy numba cython pytables pandas
conda install -c conda-forge multinest pymultinest
conda install -c conda-forge pytest codecov
pip install flaky

Then install isochrones with

pip install -e .  # or python setup.py install 

Then run

mist-intialize.py
pytest -v  # from within the isochrones directory

This mimics exactly what happens with Travis (and what I've just tested locally). If this doesn't work for you please update! And if it does, we should figure out why we need this specific incantation.

timothydmorton commented 3 years ago

updates on #139