Commit 43ff1d4f authored by zhuwenwen's avatar zhuwenwen
Browse files

modify dcu_version

parent dff277ab
...@@ -9,7 +9,7 @@ from .initialize import ( ...@@ -9,7 +9,7 @@ from .initialize import (
try: try:
# .version will be created by setup.py # .version will be created by setup.py
from .version import __version__ from .version import __version__, __dcu_version__
except ModuleNotFoundError: except ModuleNotFoundError:
# this will only happen if the user did not run `pip install` # this will only happen if the user did not run `pip install`
# and directly set PYTHONPATH to use Colossal-AI which is a bad practice # and directly set PYTHONPATH to use Colossal-AI which is a bad practice
......
...@@ -151,12 +151,9 @@ def get_version_add(sha: Optional[str] = None) -> str: ...@@ -151,12 +151,9 @@ def get_version_add(sha: Optional[str] = None) -> str:
# torch version # torch version
version += ".torch" + torch.__version__[:4] version += ".torch" + torch.__version__[:4]
lines=[]
with open(add_version_path, 'r',encoding='utf-8') as file:
lines = file.readlines()
lines[2] = "__dcu_version__ = '0.1.13+{}'\n".format(version)
with open(add_version_path, encoding="utf-8",mode="w") as file: with open(add_version_path, encoding="utf-8",mode="w") as file:
file.writelines(lines) file.write("__version__='0.1.13'\n")
file.write("__dcu_version__='0.1.13+{}'\n".format(version))
file.close() file.close()
......
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