Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions deepspeed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@
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

Expand Down
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

import torch
from deepspeed import __version__ as ds_version
from setuptools import setup, find_packages
from torch.utils.cpp_extension import CUDAExtension, BuildExtension

Expand All @@ -29,7 +30,7 @@
}))

setup(name='deepspeed',
version='0.1',
version=ds_version,
description='DeepSpeed library',
author='DeepSpeed Team',
author_email='deepspeed@microsoft.com',
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down