Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
063efd96
Unverified
Commit
063efd96
authored
May 19, 2020
by
liuzhe-lz
Committed by
GitHub
May 19, 2020
Browse files
Add Python SDK version string (#2418)
parent
d7456c16
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
0 deletions
+6
-0
Makefile
Makefile
+1
-0
deployment/pypi/Makefile
deployment/pypi/Makefile
+1
-0
deployment/pypi/install.ps1
deployment/pypi/install.ps1
+2
-0
src/sdk/pynni/nni/__init__.py
src/sdk/pynni/nni/__init__.py
+2
-0
No files found.
Makefile
View file @
063efd96
...
...
@@ -167,6 +167,7 @@ install-dependencies: $(NNI_NODE_TARBALL) $(NNI_YARN_TARBALL)
.PHONY
:
install-python-modules
install-python-modules
:
#
$(_INFO)
Installing Python SDK
$(_END)
sed
-ie
's/
$(NNI_VERSION_TEMPLATE)
/
$(NNI_VERSION_VALUE)
/'
src/sdk/pynni/nni/__init__.py
sed
-ie
's/
$(NNI_VERSION_TEMPLATE)
/
$(NNI_VERSION_VALUE)
/'
setup.py
&&
$(PIP_INSTALL)
$(PIP_MODE)
.
.PHONY
:
dev-install-python-modules
...
...
deployment/pypi/Makefile
View file @
063efd96
...
...
@@ -47,6 +47,7 @@ build:
cp
$(CWD)
../../src/nni_manager/package.json
$(CWD)
nni
sed
-ie
's/
$(NNI_VERSION_TEMPLATE)
/
$(NNI_VERSION_VALUE)
/'
$(CWD)
nni/package.json
cd
$(CWD)
nni
&&
$(NNI_YARN)
--prod
sed
-ie
's/
$(NNI_VERSION_TEMPLATE)
/
$(NNI_VERSION_VALUE)
/'
$(CWD)
../../src/sdk/pynni/nni/__init__.py
cd
$(CWD)
&&
sed
-ie
's/
$(NNI_VERSION_TEMPLATE)
/
$(NNI_VERSION_VALUE)
/'
setup.py
&&
python3 setup.py bdist_wheel
-p
$(WHEEL_SPEC)
cd
$(CWD)
...
...
deployment/pypi/install.ps1
View file @
063efd96
...
...
@@ -60,6 +60,8 @@ Copy-Item $CWD\..\..\src\nni_manager\package.json $CWD\nni
(
Get-Content
$CWD
\nni\package.json
)
.
replace
(
$NNI_VERSION_TEMPLATE
,
$NNI_VERSION_VALUE
)
|
Set-Content
$CWD
\nni\package.json
cd
$CWD
\nni
yarn
--prod
cd
$CWD
\..\..\src\sdk\pynni\nni
(
Get-Content
__init__.py
)
.
replace
(
$NNI_VERSION_TEMPLATE
,
$NNI_VERSION_VALUE
)
|
Set-Content
__init__.py
cd
$CWD
(
Get-Content
setup.py
)
.
replace
(
$NNI_VERSION_TEMPLATE
,
$NNI_VERSION_VALUE
)
|
Set-Content
setup.py
python
setup.py
bdist_wheel
-p
$WHEEL_SPEC
src/sdk/pynni/nni/__init__.py
View file @
063efd96
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
__version__
=
'999.0.0-developing'
from
.env_vars
import
dispatcher_env_vars
if
dispatcher_env_vars
.
SDK_PROCESS
!=
'dispatcher'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment