Пример #1
0
    import info
    import setup_tools

# https://packaging.python.org/guides/single-sourcing-package-version/
# http://blog.ionelmc.ro/2014/05/25/python-packaging/
_PATH_ROOT = os.path.dirname(__file__)
_PATH_REQUIRE = os.path.join(_PATH_ROOT, 'requirements')

# https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras
# Define package extras. These are only installed if you specify them.
# From remote, use like `pip install pytorch-lightning[dev, docs]`
# From local copy of repo, use like `pip install ".[dev, docs]"`
extras = {
    # 'docs': load_requirements(file_name='docs.txt'),
    'examples':
    setup_tools._load_requirements(path_dir=_PATH_REQUIRE,
                                   file_name='examples.txt'),
    'loggers':
    setup_tools._load_requirements(path_dir=_PATH_REQUIRE,
                                   file_name='loggers.txt'),
    'extra':
    setup_tools._load_requirements(path_dir=_PATH_REQUIRE,
                                   file_name='extra.txt'),
    'test':
    setup_tools._load_requirements(path_dir=_PATH_REQUIRE,
                                   file_name='test.txt')
}
extras['dev'] = extras['extra'] + extras['loggers'] + extras['test']
extras['all'] = extras['dev'] + extras['examples']  # + extras['docs']

# These packages shall be installed only on GPU machines
PACKAGES_GPU_ONLY = ['horovod']
Пример #2
0
# https://packaging.python.org/guides/single-sourcing-package-version/
# http://blog.ionelmc.ro/2014/05/25/python-packaging/
PATH_ROOT = os.path.dirname(__file__)
builtins.__LIGHTNING_SETUP__ = True

import pytorch_lightning  # noqa: E402
from pytorch_lightning.setup_tools import _load_readme_description, _load_requirements  # noqa: E402

# https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras
# Define package extras. These are only installed if you specify them.
# From remote, use like `pip install pytorch-lightning[dev, docs]`
# From local copy of repo, use like `pip install ".[dev, docs]"`
extras = {
    # 'docs': load_requirements(file_name='docs.txt'),
    'examples':
    _load_requirements(path_dir=os.path.join(PATH_ROOT, 'requirements'),
                       file_name='examples.txt'),
    'loggers':
    _load_requirements(path_dir=os.path.join(PATH_ROOT, 'requirements'),
                       file_name='loggers.txt'),
    'extra':
    _load_requirements(path_dir=os.path.join(PATH_ROOT, 'requirements'),
                       file_name='extra.txt'),
    'test':
    _load_requirements(path_dir=os.path.join(PATH_ROOT, 'requirements'),
                       file_name='test.txt')
}
extras['dev'] = extras['extra'] + extras['loggers'] + extras['test']
extras['all'] = extras['dev'] + extras['examples']  # + extras['docs']

# These packages shall be installed only on GPU machines
PACKAGES_GPU_ONLY = ['horovod']