-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from datmo/0.0.2-pypi
0.0.2 pypi changes and upload
- Loading branch information
Showing
9 changed files
with
141 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.2-dev | ||
0.0.3-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from sklearn import datasets | ||
from sklearn.linear_model import LogisticRegression | ||
from sklearn.model_selection import train_test_split | ||
import datmo # extra line | ||
|
||
# Run `$ datmo init` in your terminal to instantiate a Datmo project | ||
|
||
config = { "solver": "newton-cg" } # extra line | ||
iris_dataset = datasets.load_iris() | ||
X, y = iris_dataset.data, iris_dataset.target | ||
X_train, X_test, y_train, y_test = train_test_split(X, y) | ||
model = LogisticRegression(**config).fit(X_train, y_train) | ||
|
||
train_acc = model.score(X_train, y_train) | ||
test_acc = model.score(X_test, y_test) | ||
|
||
print(train_acc) | ||
print(test_acc) | ||
|
||
stats = { "train_accuracy": train_acc, "test_accuracy": test_acc } # extra line | ||
datmo.snapshot.create(message="my first snapshot", config=config, stats=stats) # extra line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# --- TEMPORARY --- | ||
# This script will create a datmo-enabled repository called `iris_sklearn` | ||
# This script will create a datmo-enabled repository in the current directory | ||
# run the initial script to create a snapshot and will list out the snapshots | ||
# by calling the `datmo snapshot ls` command | ||
|
||
# Create directory for the datmo-enabled repo to live | ||
mkdir iris_sklearn | ||
|
||
cd iris_sklearn | ||
|
||
# Create a datmo-enabled repo | ||
datmo init --name="iris data with sklearn models" --description="use iris data along with sklearn models" | ||
|
||
# Copy the relevant scripts into the repo | ||
cp ../iris_sklearn.py . | ||
cp ../iris_sklearn.ipynb . | ||
|
||
# Run the script to create a snapshot | ||
python iris_sklearn.py | ||
python snapshot_create_iris_sklearn.py | ||
|
||
# Run the datmo command to list all snapshots | ||
datmo snapshot ls |
1 change: 1 addition & 0 deletions
1
examples/jupyter_notebook/snapshot_create_iris_sklearn/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM datmo/xgboost:cpu |
Oops, something went wrong.