Skip to content

Commit

Permalink
fix examples to work with required message argument of snapshot create
Browse files Browse the repository at this point in the history
  • Loading branch information
asampat3090 committed Apr 26, 2018
1 parent b1b4b32 commit 394f8d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions examples/iris_logistic_regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,19 @@
{
"ename": "AttributeError",
"evalue": "'module' object has no attribute 'snapshot'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-11-cab2e9246f30>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mstats\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m \u001b[0;34m\"train_accuracy\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtrain_acc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"test_accuracy\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtest_acc\u001b[0m \u001b[0;34m}\u001b[0m \u001b[0;31m# extra line\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mdatmo\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msnapshot\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mconfig\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mconfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstats\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstats\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# extra line\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mAttributeError\u001b[0m: 'module' object has no attribute 'snapshot'"
]
],
"output_type": "error"
}
],
"source": [
"stats = { \"train_accuracy\": train_acc, \"test_accuracy\": test_acc } # extra line\n",
"datmo.snapshot.create(config=config, stats=stats) # extra line"
"datmo.snapshot.create(message=\"my first snapshot\", \n",
" config=config, stats=stats) # extra line"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/iris_logistic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
print(test_acc)

stats = { "train_accuracy": train_acc, "test_accuracy": test_acc } # extra line
datmo.snapshot.create(config=config, stats=stats) # extra line
datmo.snapshot.create(message="my first snapshot", config=config, stats=stats) # extra line

0 comments on commit 394f8d7

Please sign in to comment.