From b79b011d5e7fd9e13ff376c80b495232a8de87de Mon Sep 17 00:00:00 2001 From: Shreyas Bapat Date: Wed, 3 Apr 2019 22:31:22 +0530 Subject: [PATCH 1/2] Some more fixes --- demo/__init__.py | 0 docs/source/examples/basic_trainer.py | 6 +++--- docs/source/examples/example_model.py | 2 +- docs/source/examples/fully_featured_trainer.py | 9 ++++----- 4 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 demo/__init__.py diff --git a/demo/__init__.py b/demo/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/source/examples/basic_trainer.py b/docs/source/examples/basic_trainer.py index 95a47dd606..8e33674d60 100644 --- a/docs/source/examples/basic_trainer.py +++ b/docs/source/examples/basic_trainer.py @@ -2,9 +2,9 @@ import os import sys from test_tube import HyperOptArgumentParser, Experiment -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.models.trainer import Trainer +from pytorch-lightning.utils.arg_parse import add_default_args +from pytorch-lightning.utils.pt_callbacks import EarlyStopping, ModelCheckpoint from demo.example_model import ExampleModel diff --git a/docs/source/examples/example_model.py b/docs/source/examples/example_model.py index f7197a484a..16d5a47579 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 f971f28300..2412a1d0ed 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) @@ -27,7 +27,7 @@ AVAILABLE_MODELS = { """ Allows training by using command line arguments -Run by: +Run by: # TYPE YOUR RUN COMMAND HERE """ @@ -199,4 +199,3 @@ if __name__ == '__main__': nb_trials=hyperparams.nb_hopt_trials, nb_workers=len(gpu_ids) ) - From 4809de876568b56f33f6ab6b48591ad9d2e9ef05 Mon Sep 17 00:00:00 2001 From: Shreyas Bapat Date: Wed, 3 Apr 2019 22:47:55 +0530 Subject: [PATCH 2/2] Fix pip install too --- MANIFEST.in | 9 +++++++++ pyproject.toml | 5 +++++ setup.cfg | 21 +++++++++++++++++++++ setup.py | 1 - 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 MANIFEST.in create mode 100644 pyproject.toml create mode 100644 setup.cfg diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000000..53c1b22055 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,9 @@ +graft docs + +include COPYING +include AUTHORS + +recursive-include src/einsteinpy/tests *.py *.html + +prune docs/source/examples/.ipynb_checkpoints +global-exclude *.py[cod] __pycache__ *.so *.dylib diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..ee7778129d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[build-system] +requires = [ + "setuptools", + "wheel", +] diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000..c7616dab25 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,21 @@ +[tool:pytest] +norecursedirs = + .git + dist + build +python_files = + test_*.py +doctest_plus = disabled +addopts = --strict +markers = + slow + remote_data + filterwarnings + +[pycodestyle] +ignore = E731,W504 +max-line-length = 120 + +[flake8] +ignore = E731,W504,F401,F841 +max-line-length = 120 diff --git a/setup.py b/setup.py index 2a6e421b91..5d6cbf0048 100755 --- a/setup.py +++ b/setup.py @@ -40,7 +40,6 @@ setup( }, packages=find_packages("src"), package_dir={"": "src"}, - entry_points={"console_scripts": ["pytorch-lightning=pytorch-lightning.cli:main"]}, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Education",