Commit 50ae149f authored by Shaden Smith's avatar Shaden Smith Committed by GitHub
Browse files

Moving to major/minor/patch versioning. (#51)

parent e4c55390
......@@ -7,12 +7,20 @@ from deepspeed.pt.deepspeed_light import ADAM_OPTIMIZER, LAMB_OPTIMIZER
from deepspeed.pt.deepspeed_lr_schedules import add_tuning_arguments
try:
from deepspeed.version_info import git_hash, git_branch
from deepspeed.git_version_info import git_hash, git_branch
except ImportError:
git_hash = None
git_branch = None
__version__ = 0.1
# Export version information
__version_major__ = 0
__version_minor__ = 1
__version_patch__ = 0
__version__ = '.'.join(
map(str,
[__version_major__,
__version_minor__,
__version_patch__]))
__git_hash__ = git_hash
__git_branch__ = git_branch
......
......@@ -80,9 +80,9 @@ if [ "$ds_only" == "1" ] && [ "$tp_only" == "1" ]; then
fi
echo "Updating git hash/branch info"
echo "git_hash = '$(git rev-parse --short HEAD)'" > deepspeed/version_info.py
echo "git_branch = '$(git rev-parse --abbrev-ref HEAD)'" >> deepspeed/version_info.py
cat deepspeed/version_info.py
echo "git_hash = '$(git rev-parse --short HEAD)'" > deepspeed/git_version_info.py
echo "git_branch = '$(git rev-parse --abbrev-ref HEAD)'" >> deepspeed/git_version_info.py
cat deepspeed/git_version_info.py
install_apex='sudo -H pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" third_party/apex'
......
......@@ -9,6 +9,7 @@ The wheel will be located at: dist/*.whl
"""
import torch
from deepspeed import __version__ as ds_version
from setuptools import setup, find_packages
from torch.utils.cpp_extension import CUDAExtension, BuildExtension
......@@ -29,7 +30,7 @@ ext_modules.append(
}))
setup(name='deepspeed',
version='0.1',
version=ds_version,
description='DeepSpeed library',
author='DeepSpeed Team',
author_email='deepspeed@microsoft.com',
......
......@@ -17,6 +17,9 @@ def test_check_version():
assert hasattr(deepspeed, "__git_hash__")
assert hasattr(deepspeed, "__git_branch__")
assert hasattr(deepspeed, "__version__")
assert hasattr(deepspeed, "__version_major__")
assert hasattr(deepspeed, "__version_minor__")
assert hasattr(deepspeed, "__version_patch__")
def _run_batch_config(ds_config, train_batch=None, micro_batch=None, gas=None):
......
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