Skip to content

Commit

Permalink
Hotfixes for .smpl loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
tymorrow committed Nov 22, 2021
1 parent 1452a5d commit 5578acb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
5 changes: 4 additions & 1 deletion riid/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ def save_seeds(ss: SampleSet, file_name: str, detector: str = None,
def read_hdf(file_name: str) -> SampleSet:
""" Reads sampleset class from hdf binary format."""
spectra = pd.read_hdf(file_name, "spectra")
collection_information = pd.read_hdf(file_name, "collection_information")
try:
collection_information = pd.read_hdf(file_name, "collection_information")
except:
collection_information = pd.read_hdf(file_name, "info")
sources = pd.read_hdf(file_name, "sources")
sources.columns = [i.split("___")[0] for i in sources.columns]
features = pd.read_hdf(file_name, "features")
Expand Down
16 changes: 4 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,25 @@
# Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software.
"""Simple setup script for installing the core package.
"""
import platform
import sys

from os import path
from setuptools import find_packages, setup

python_version_min = (3, 7, 0)
python_version_max = (3, 7, 11)
required_python_version_str = '.'.join(map(str, python_version_min[:2]))
if python_version_min < sys.version_info > python_version_max:
print("You are using Python {}. Python =={} is required.".format(platform.python_version(),
required_python_version_str))
sys.exit(-1)

p = path.abspath(path.dirname(__file__))
with open(path.join(p, './README.md')) as f:
README = f.read()

setup(
name="riid",
version="1.0.0",
version="1.0.1",
description="Machine learning-based models and utilities for radioisotope identification",
long_description=README,
long_description_content_type='text/markdown',
author="Tyler Morrow,Nathan Price",
author_email="tmorro@sandia.gov,njprice@sandia.gov",
url="https://github.com/sandialabs/PyRIID",
packages=find_packages(),
python_requires=">=3.7, <3.8",
install_requires=[
"tensorflow==2.0.0",
"tensorflow-model-optimization==0.1.3",
Expand All @@ -39,7 +30,8 @@
"scikit-learn==0.22",
"tables==3.6.1",
"tqdm",
"seaborn==0.10.1"
"seaborn==0.10.1",
"h5py<3.0.0",
],
# PyPI package information.
classifiers=[
Expand Down

0 comments on commit 5578acb

Please sign in to comment.