Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Commit

Permalink
Fix evaluation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Emily A Grasmeder committed Dec 7, 2017
1 parent df5c921 commit 2cd9ff9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deployment/pipeline-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"ref": "DefaultSchedule"
},
"imageId": "ami-1a962263",
"instanceType": "r4.2xlarge",
"instanceType": "r4.16xlarge",
"name": "DefaultResource1",
"id": "datalab-machine",
"type": "Ec2Resource",
Expand All @@ -45,4 +45,4 @@
}
],
"parameters": []
}
}
3 changes: 2 additions & 1 deletion deployment/run_pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ sudo yum -y install python36 python36-virtualenv python36-pip
sudo python36 -m pip install boto3
sudo python36 -m pip install pandas
sudo python36 -m pip install s3fs
sudo python36 -m pip install numpy
# sudo python36 -m pip install numpy
sudo python36 -m pip install joblib
sudo python36 -m pip install sklearn
sudo python36 -m pip install scipy
sudo python36 -m pip install tables
# sudo python36 -m pip install jupyter

mkdir -p src && cd src
aws s3 cp s3://twde-datalab/src.tar.gz .
Expand Down
2 changes: 1 addition & 1 deletion src/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def nwrmsle(predictions, targets, weights):
if type(predictions) == list:
predictions = [np.nan if x < 0 else x for x in predictions]
predictions = np.array([np.nan if x < 0 else x for x in predictions])
elif type(predictions) == pd.Series:
predictions[predictions < 0] = np.nan
targets[targets < 0] = np.nan
Expand Down

0 comments on commit 2cd9ff9

Please sign in to comment.