Skip to content

Commit b3199f0

Browse files
committed
accounting for pandas bug
1 parent 4d66435 commit b3199f0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

singularity/analysis/classify.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ def estimate_os(container=None,image_package=None,return_top=True):
128128
comparison = compare_packages(packages_set1=[image_package])['files.txt'].transpose()
129129

130130
comparison.columns = ['SCORE']
131-
most_similar = comparison['SCORE'].idxmax()
131+
try:
132+
most_similar = comparison['SCORE'].idxmax()
133+
except:
134+
most_similar = comparison['SCORE'].values.argmax()
135+
most_similar = comparison.index.tolist()[most_similar]
136+
132137
print("Most similar OS found to be ", most_similar)
133138
if return_top == True:
134139
return most_similar

singularity/build/scripts/singularity-prepare-instance.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sudo apt-get -y install git \
2525

2626
# Pip3 installs
2727
sudo pip3 install --upgrade pip &&
28-
sudo pip3 install pandas &&
28+
sudo pip3 install pandas==0.20.3 &&
2929
sudo pip3 install --upgrade google-api-python-client &&
3030
sudo pip3 install --upgrade google &&
3131
sudo pip3 install oauth2client==3.0.0

0 commit comments

Comments
 (0)