Commit 51239e9c authored by Yuxin Wu's avatar Yuxin Wu

fix versioning. add scripts to install.

parent e4b0bd9d
......@@ -38,13 +38,13 @@ Describe your training task with three components:
2. __DataFlow__. tensorpack allows and encourages complex data processing.
+ All data producer has an unified `generator` interface, allowing them to be composed to perform complex preprocessing.
+ All data producer has an unified interface, allowing them to be composed to perform complex preprocessing.
+ Use Python to easily handle any data format, yet still keep good performance thanks to multiprocess prefetch & TF Queue prefetch.
For example, InceptionV3 can run in the same speed as the official code which reads data by TF operators.
3. __Callbacks__, including everything you want to do apart from the training iterations, such as:
+ Change hyperparameters during training
+ Print some variables of interest
+ Print some tensors of interest
+ Run inference on a test dataset
+ Run some operations once a while
+ Send loss to your phone
......@@ -53,8 +53,6 @@ With the above components defined, tensorpack trainer will run the training iter
Multi-GPU training is off-the-shelf by simply switching the trainer.
You can also define your own trainer for non-standard training (e.g. GAN).
The components are designed to be independent. You can use Model or DataFlow in other projects as well.
## Dependencies:
+ Python 2 or 3
......
[metadata]
name = tensorpack
version = attr: tensorpack.__version__
author = TensorPack contributors
author-email = ppwwyyxxc@gmail.com
description = Neural Network Toolbox on TensorFlow
......@@ -11,7 +10,7 @@ license = Apache
[options]
zip_safe = False # dataset and __init__ use file
packages = find:
packages = find: # will call find_packages()
[wheel]
universal = 1
from setuptools import setup
import os
import shutil
# setup metainfo
CURRENT_DIR = os.path.dirname(__file__)
libinfo_py = os.path.join(CURRENT_DIR, 'tensorpack/libinfo.py')
libinfo = {'__file__': libinfo_py}
exec(compile(open(libinfo_py, "rb").read(), libinfo_py, 'exec'), libinfo, libinfo)
__version__ = libinfo['__version__']
# configure requirements
req = [
'numpy',
'six',
......@@ -21,11 +31,25 @@ extra_req = [
'tornado;python_version<"3.0"',
]
# TODO:
# setup_requires, scripts
# parse scripts
scripts = ['scripts/plot-point.py', 'scripts/dump-model-params.py']
scripts_to_install = []
for s in scripts:
dirname = os.path.dirname(s)
basename = os.path.basename(s)
if basename.endswith('.py'):
basename = basename[:-3]
newname = 'tpk-' + basename # install scripts with a prefix to avoid name confusion
# setup.py could be executed the second time in the same dir
if not os.path.isfile(newname):
shutil.move(s, newname)
scripts_to_install.append(newname)
setup(
version=__version__,
install_requires=req,
extras_require={
'all': extra_req
},
scripts=scripts_to_install
)
......@@ -2,7 +2,6 @@
# File: __init__.py
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
__version__ = '0.1'
from tensorpack.train import *
from tensorpack.models import *
......@@ -11,3 +10,4 @@ from tensorpack.tfutils import *
from tensorpack.callbacks import *
from tensorpack.dataflow import *
from tensorpack.predict import *
from tensorpack.libinfo import __version__
......@@ -2,6 +2,7 @@
max-line-length = 120
exclude = .git,
tensorpack/__init__.py,
setup.py,
snippet,
docs,
examples,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment