Skip to content

Commit 93fc53d

Browse files
committed
added issue_4169 file and other modified files
Signed-off-by: Jules Damji <[email protected]>
1 parent 1a2c03f commit 93fc53d

File tree

8 files changed

+18
-10
lines changed

8 files changed

+18
-10
lines changed

py/mlflow/apis/models/pytorch/autolog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from torch.nn import functional as F
66
from torch.utils.data import DataLoader
77
from torchvision import transforms
8-
from torchvision.datasets import MNIST
8+
from torchvision.datasets import FashionMNIST
99
from pytorch_lightning.metrics.functional import accuracy
1010

1111
import mlflow.pytorch
@@ -14,7 +14,7 @@
1414
# Here's the simplest most minimal example with just a training loop
1515
# (no validation, no testing). It illustrates how you can use MLflow
1616
# to auto log parameters, metrics, and models.
17-
# Explore the PyTorch MNIST example for an expansive example with all the
17+
# Explore the PyTorch FashionMNIST example for an expansive example with all the
1818
# lightening hooks as the next step.
1919

2020

@@ -57,7 +57,7 @@ def print_auto_logged_info(r):
5757
mnist_model = MNISTModel()
5858

5959
# Init DataLoader from MNIST Dataset
60-
train_ds = MNIST(os.getcwd(), train=True, download=True, transform=transforms.ToTensor())
60+
train_ds = FashionMNIST(os.getcwd(), train=True, download=True, transform=transforms.ToTensor())
6161
train_loader = DataLoader(train_ds, batch_size=32)
6262

6363
# Initialize a trainer
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import nltk
2+
import mlflow
3+
4+
if __name__ == '__main__':
5+
nltk.download('punkt')
6+
# Write all files in downloaded in the destination directory to root artifact_uri/
7+
with mlflow.start_run():
8+
mlflow.log_artifacts("/Users/julesdamji/nltk_data", artifact_path="nltk")

pytorch/numpy/autograd_nn.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"name": "python",
116116
"nbconvert_exporter": "python",
117117
"pygments_lexer": "ipython3",
118-
"version": "3.7.5"
118+
"version": "3.9.1"
119119
}
120120
},
121121
"nbformat": 4,

pytorch/numpy/custom_two_layer_nn.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
" # Zero gradients, perform a backward pass, and update the weights.\n",
111111
" optimizer.zero_grad()\n",
112112
" loss.backward()\n",
113-
" optimizer.set()"
113+
" optimizer.step()"
114114
]
115115
}
116116
],
@@ -130,7 +130,7 @@
130130
"name": "python",
131131
"nbconvert_exporter": "python",
132132
"pygments_lexer": "ipython3",
133-
"version": "3.7.5"
133+
"version": "3.9.1"
134134
}
135135
},
136136
"nbformat": 4,

pytorch/numpy/numpy_nn.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@
649649
"name": "python",
650650
"nbconvert_exporter": "python",
651651
"pygments_lexer": "ipython3",
652-
"version": "3.7.5"
652+
"version": "3.9.1"
653653
}
654654
},
655655
"nbformat": 4,

pytorch/numpy/tensor_nn.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
"name": "python",
144144
"nbconvert_exporter": "python",
145145
"pygments_lexer": "ipython3",
146-
"version": "3.7.5"
146+
"version": "3.9.1"
147147
}
148148
},
149149
"nbformat": 4,

pytorch/numpy/two_layer_nn.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"name": "python",
106106
"nbconvert_exporter": "python",
107107
"pygments_lexer": "ipython3",
108-
"version": "3.7.5"
108+
"version": "3.9.1"
109109
}
110110
},
111111
"nbformat": 4,

pytorch/tutorials/18_custom_dataset.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@
904904
"name": "python",
905905
"nbconvert_exporter": "python",
906906
"pygments_lexer": "ipython3",
907-
"version": "3.7.4"
907+
"version": "3.9.1"
908908
}
909909
},
910910
"nbformat": 4,

0 commit comments

Comments
 (0)