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
30d29116
Unverified
Commit
30d29116
authored
Oct 21, 2020
by
chicm-ms
Committed by
GitHub
Oct 21, 2020
Browse files
Fix mac pipeline (#2986)
parent
add7ca66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
azure-pipelines.yml
azure-pipelines.yml
+4
-4
deployment/deployment-pipelines.yml
deployment/deployment-pipelines.yml
+2
-6
tools/nni_annotation/test_annotation.py
tools/nni_annotation/test_annotation.py
+3
-1
No files found.
azure-pipelines.yml
View file @
30d29116
...
@@ -101,14 +101,14 @@ jobs:
...
@@ -101,14 +101,14 @@ jobs:
displayName
:
'
Simple
test'
displayName
:
'
Simple
test'
-
job
:
'
macos_latest_python3
7
'
-
job
:
'
macos_latest_python3
8
'
pool
:
pool
:
vmImage
:
'
macOS-latest'
vmImage
:
'
macOS-latest'
steps
:
steps
:
-
script
:
|
-
script
:
|
export PYTHON3
7
_BIN_DIR=/usr/local/Cellar/python@3.
7
/`ls /usr/local/Cellar/python@3.
7
`/bin
export PYTHON3
8
_BIN_DIR=/usr/local/Cellar/python@3.
8
/`ls /usr/local/Cellar/python@3.
8
`/bin
echo "##vso[task.setvariable variable=PATH]${PYTHON3
7
_BIN_DIR}:${HOME}/Library/Python/3.
7
/bin:${PATH}"
echo "##vso[task.setvariable variable=PATH]${PYTHON3
8
_BIN_DIR}:${HOME}/Library/Python/3.
8
/bin:${PATH}"
python3 -m pip install --upgrade pip setuptools
python3 -m pip install --upgrade pip setuptools
displayName
:
'
Install
python
tools'
displayName
:
'
Install
python
tools'
-
script
:
|
-
script
:
|
...
@@ -119,7 +119,7 @@ jobs:
...
@@ -119,7 +119,7 @@ jobs:
set -e
set -e
# pytorch Mac binary does not support CUDA, default is cpu version
# pytorch Mac binary does not support CUDA, default is cpu version
python3 -m pip install torchvision==0.6.0 torch==1.5.0 --user
python3 -m pip install torchvision==0.6.0 torch==1.5.0 --user
python3 -m pip install tensorflow==
1.15
.2 --user
python3 -m pip install tensorflow==
2
.2 --user
brew install swig@3
brew install swig@3
rm -f /usr/local/bin/swig
rm -f /usr/local/bin/swig
ln -s /usr/local/opt/swig\@3/bin/swig /usr/local/bin/swig
ln -s /usr/local/opt/swig\@3/bin/swig /usr/local/bin/swig
...
...
deployment/deployment-pipelines.yml
View file @
30d29116
...
@@ -113,10 +113,6 @@ jobs:
...
@@ -113,10 +113,6 @@ jobs:
condition
:
succeeded()
condition
:
succeeded()
pool
:
pool
:
vmImage
:
'
macOS-10.15'
vmImage
:
'
macOS-10.15'
strategy
:
matrix
:
Python36
:
PYTHON_VERSION
:
'
3.6'
steps
:
steps
:
-
script
:
|
-
script
:
|
python3 -m pip install --upgrade pip setuptools --user
python3 -m pip install --upgrade pip setuptools --user
...
@@ -134,10 +130,10 @@ jobs:
...
@@ -134,10 +130,10 @@ jobs:
# NNI build scripts (Makefile) uses branch tag as package version number
# NNI build scripts (Makefile) uses branch tag as package version number
git tag $(build_version)
git tag $(build_version)
echo 'building prerelease package...'
echo 'building prerelease package...'
PATH=$HOME/Library/Python/3.
7
/bin:$PATH make version_ts=true build
PATH=$HOME/Library/Python/3.
8
/bin:$PATH make version_ts=true build
else
else
echo 'building release package...'
echo 'building release package...'
PATH=$HOME/Library/Python/3.
7
/bin:$PATH make build
PATH=$HOME/Library/Python/3.
8
/bin:$PATH make build
fi
fi
condition
:
eq( variables['upload_package'], 'true')
condition
:
eq( variables['upload_package'], 'true')
displayName
:
'
build
nni
bdsit_wheel'
displayName
:
'
build
nni
bdsit_wheel'
...
...
tools/nni_annotation/test_annotation.py
View file @
30d29116
...
@@ -5,12 +5,13 @@
...
@@ -5,12 +5,13 @@
from
.__init__
import
*
from
.__init__
import
*
import
sys
import
ast
import
ast
import
json
import
json
import
os
import
os
import
shutil
import
shutil
import
tempfile
import
tempfile
from
unittest
import
TestCase
,
main
from
unittest
import
TestCase
,
main
,
skipIf
class
AnnotationTestCase
(
TestCase
):
class
AnnotationTestCase
(
TestCase
):
...
@@ -26,6 +27,7 @@ class AnnotationTestCase(TestCase):
...
@@ -26,6 +27,7 @@ class AnnotationTestCase(TestCase):
with
open
(
'testcase/searchspace.json'
)
as
f
:
with
open
(
'testcase/searchspace.json'
)
as
f
:
self
.
assertEqual
(
search_space
,
json
.
load
(
f
))
self
.
assertEqual
(
search_space
,
json
.
load
(
f
))
@
skipIf
(
sys
.
version_info
.
major
==
3
and
sys
.
version_info
.
minor
>
7
,
"skip for python3.8 temporarily"
)
def
test_code_generator
(
self
):
def
test_code_generator
(
self
):
code_dir
=
expand_annotations
(
'testcase/usercode'
,
'_generated/usercode'
,
nas_mode
=
'classic_mode'
)
code_dir
=
expand_annotations
(
'testcase/usercode'
,
'_generated/usercode'
,
nas_mode
=
'classic_mode'
)
self
.
assertEqual
(
code_dir
,
'_generated/usercode'
)
self
.
assertEqual
(
code_dir
,
'_generated/usercode'
)
...
...
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