kr-colab / locator

deep learning prediction of geographic location from individual genome sequences
Other
46 stars 18 forks source link

What versions of Tensorflow and Keras is locator tested with? #40

Closed davidecarlson closed 4 months ago

davidecarlson commented 4 months ago

Hi All,

I tried running locator with the latest versions of Tensorflow (2.16.1) and Keras (3.3.3) on a Linux machine, but when I try to run the example, I see the following error:

reading VCF
[read_vcf] 11527 rows in 0.53s; chunk in 0.53s (21840 rows/s)
[read_vcf] all done (21837 rows/s)
/gpfs/software/locator/scripts/locator.py:161: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  if not all([sample_data['sampleID2'][x]==samples[x] for x in range(len(samples))]): #check that all sample names are present
loaded (11527, 500, 2) genotypes

filtering SNPs
running on 5830 genotypes after filtering

Traceback (most recent call last):
  File "/gpfs/software/locator/scripts/locator.py", line 382, in <module>
    checkpointer,earlystop,reducelr=load_callbacks("FULL")
                                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs/software/locator/scripts/locator.py", line 251, in load_callbacks
    checkpointer=tf.keras.callbacks.ModelCheckpoint(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ModelCheckpoint.__init__() got an unexpected keyword argument 'period'

I suspect that I need an older version of TF, Keras, or both.

Can you tell me what versions you all have tested this with?

In case it's useful, here is my pip list:

Package                  Version
------------------------ ----------
absl-py                  2.1.0
apricot-select           0.6.1
asciitree                0.3.3
astunparse               1.6.3
bokeh                    3.4.1
Brotli                   1.1.0
cached-property          1.5.2
certifi                  2024.2.2
charset-normalizer       3.3.2
click                    8.1.7
cloudpickle              3.0.0
colorama                 0.4.6
contourpy                1.2.1
cycler                   0.12.1
cytoolz                  0.12.3
dask                     2024.5.2
dask-expr                1.1.2
distributed              2024.5.2
fasteners                0.17.3
filelock                 3.14.0
flatbuffers              24.3.25
fonttools                4.53.0
fsspec                   2024.6.0
gast                     0.5.4
gmpy2                    2.1.5
google-pasta             0.2.0
grpcio                   1.64.0
h5py                     3.11.0
idna                     3.7
importlib_metadata       7.1.0
Jinja2                   3.1.4
joblib                   1.4.2
keras                    3.3.3
kiwisolver               1.4.5
libclang                 18.1.1
llvmlite                 0.42.0
locket                   1.0.0
lz4                      4.3.3
Markdown                 3.6
markdown-it-py           3.0.0
MarkupSafe               2.1.5
matplotlib               3.8.4
mdurl                    0.1.2
ml-dtypes                0.3.2
mpmath                   1.3.0
msgpack                  1.0.8
munkres                  1.1.4
namex                    0.0.8
networkx                 3.3
nose                     1.3.7
numba                    0.59.1
numcodecs                0.12.1
numexpr                  2.10.0
numpy                    1.26.4
nvidia-cublas-cu12       12.3.4.1
nvidia-cuda-cupti-cu12   12.3.101
nvidia-cuda-nvcc-cu12    12.3.107
nvidia-cuda-nvrtc-cu12   12.3.107
nvidia-cuda-runtime-cu12 12.3.101
nvidia-cudnn-cu12        8.9.7.29
nvidia-cufft-cu12        11.0.12.1
nvidia-curand-cu12       10.3.4.107
nvidia-cusolver-cu12     11.5.4.101
nvidia-cusparse-cu12     12.2.0.103
nvidia-nccl-cu12         2.19.3
nvidia-nvjitlink-cu12    12.3.101
opt-einsum               3.3.0
optree                   0.11.0
packaging                24.0
pandas                   2.2.2
partd                    1.4.2
patsy                    0.5.6
pillow                   10.3.0
pip                      24.0
pomegranate              1.0.0
protobuf                 4.25.3
psutil                   5.9.8
pyarrow                  16.1.0
pyarrow-hotfix           0.6
Pygments                 2.18.0
pyparsing                3.1.2
PySocks                  1.7.1
python-dateutil          2.9.0
pytz                     2024.1
PyYAML                   6.0.1
requests                 2.32.2
rich                     13.7.1
scikit-allel             1.3.8
scikit-learn             1.5.0
scipy                    1.13.1
seaborn                  0.13.2
setuptools               70.0.0
six                      1.16.0
sortedcontainers         2.4.0
statsmodels              0.14.2
sympy                    1.12
tblib                    3.0.0
tensorboard              2.16.2
tensorboard-data-server  0.7.2
tensorflow               2.16.1
termcolor                2.4.0
threadpoolctl            3.5.0
toolz                    0.12.1
torch                    2.3.0
tornado                  6.4
tqdm                     4.66.4
typing_extensions        4.12.1
tzdata                   2024.1
urllib3                  2.2.1
Werkzeug                 3.0.3
wheel                    0.43.0
wrapt                    1.16.0
xyzservices              2024.4.0
zarr                     2.18.2
zict                     3.0.0
zipp                     3.17.0

Thanks!

Dave

davidecarlson commented 4 months ago

Actually, I see in the release notes that TF 2.3.1 is supported. I was able to downgrade to that version and get locator to run the test data set.

Apologies for missing this. Thanks! Dave

andrewkern commented 4 months ago

glad you got this figured out!