From cbc627459a6b1718562bfb9c0930450c6d98b3a0 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Tue, 25 Jun 2019 17:56:01 -0400 Subject: [PATCH] adding framework level dp --- docs/__init__.py | 0 docs/source/__init__.py | 0 docs/source/examples/__init__.py | 1 + docs/source/examples/example_model.py | 2 +- docs/source/examples/fully_featured_trainer.py | 8 ++++---- 5 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 docs/__init__.py create mode 100644 docs/source/__init__.py create mode 100644 docs/source/examples/__init__.py diff --git a/docs/__init__.py b/docs/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/source/__init__.py b/docs/source/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/source/examples/__init__.py b/docs/source/examples/__init__.py new file mode 100644 index 0000000000..8ff1351fb9 --- /dev/null +++ b/docs/source/examples/__init__.py @@ -0,0 +1 @@ +from .example_model import ExampleModel \ No newline at end of file diff --git a/docs/source/examples/example_model.py b/docs/source/examples/example_model.py index 16d5a47579..f7197a484a 100644 --- a/docs/source/examples/example_model.py +++ b/docs/source/examples/example_model.py @@ -1,6 +1,6 @@ import torch.nn as nn import numpy as np -from pytorch-lightning.root_module.root_module import RootModule +from pytorch_lightning.root_module.root_module import RootModule from test_tube import HyperOptArgumentParser from torchvision.datasets import MNIST import torchvision.transforms as transforms diff --git a/docs/source/examples/fully_featured_trainer.py b/docs/source/examples/fully_featured_trainer.py index 2412a1d0ed..77b061b400 100644 --- a/docs/source/examples/fully_featured_trainer.py +++ b/docs/source/examples/fully_featured_trainer.py @@ -5,10 +5,10 @@ from time import sleep import torch from test_tube import HyperOptArgumentParser, Experiment, SlurmCluster -from pytorch-lightning.models.trainer import Trainer -from pytorch-lightning.utils.arg_parse import add_default_args +from pytorch_lightning.models.trainer import Trainer +from pytorch_lightning.utils.arg_parse import add_default_args -from pytorch-lightning.utils.pt_callbacks import EarlyStopping, ModelCheckpoint +from pytorch_lightning.utils.pt_callbacks import EarlyStopping, ModelCheckpoint SEED = 2334 torch.manual_seed(SEED) @@ -17,7 +17,7 @@ np.random.seed(SEED) # --------------------- # DEFINE MODEL HERE # --------------------- -from example_model import ExampleModel +from docs.source.examples.example_model import ExampleModel # --------------------- AVAILABLE_MODELS = {