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
deepspeed
Commits
7dc209c6
Unverified
Commit
7dc209c6
authored
May 05, 2020
by
Jeff Rasley
Committed by
GitHub
May 05, 2020
Browse files
add basic post-install test (#209)
* add basic post-install test
parent
a90a32d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
basic_install_test.py
basic_install_test.py
+30
-0
install.sh
install.sh
+9
-4
No files found.
basic_install_test.py
0 → 100644
View file @
7dc209c6
import
torch
import
importlib
try
:
import
deepspeed
as
ds
print
(
"deepspeed successfully imported"
)
except
ImportError
as
err
:
raise
err
print
(
f
"torch version:
{
torch
.
__version__
}
"
)
print
(
f
"deepspeed info:
{
ds
.
__version__
}
,
{
ds
.
__git_hash__
}
,
{
ds
.
__git_branch__
}
"
)
try
:
apex_C
=
importlib
.
import_module
(
'apex_C'
)
print
(
"apex successfully installed"
)
except
Exception
as
err
:
raise
err
try
:
fused_lamb
=
importlib
.
import_module
(
'fused_lamb_cuda'
)
print
(
'deepspeed kernels successfully installed'
)
except
Exception
as
err
:
raise
err
try
:
from
apex.optimizers
import
FP16_Optimizer
print
(
"using old-style apex"
)
except
ImportError
:
print
(
"using new-style apex"
)
install.sh
View file @
7dc209c6
...
...
@@ -164,8 +164,12 @@ if [ "$local_only" == "1" ]; then
echo
"Installing deepspeed"
$PIP_SUDO
pip uninstall
-y
deepspeed
$PIP_SUDO
$PIP_INSTALL
dist/deepspeed
*
.whl
python
-c
'import deepspeed; print("deepspeed info:", deepspeed.__version__, deepspeed.__git_branch__, deepspeed.__git_hash__)'
python basic_install_test.py
if
[
$?
==
0
]
;
then
echo
"Installation is successful"
else
echo
"Installation failed"
fi
fi
else
local_path
=
`
pwd
`
...
...
@@ -193,9 +197,10 @@ else
echo
"Installing deepspeed"
pdsh
-w
$hosts
"
$PIP_SUDO
pip uninstall -y deepspeed"
pdcp
-w
$hosts
dist/deepspeed
*
.whl
$tmp_wheel_path
/
pdcp
-w
$hosts
basic_install_test.py
$tmp_wheel_path
/
pdsh
-w
$hosts
"
$PIP_SUDO
$PIP_INSTALL
$tmp_wheel_path
/deepspeed*.whl"
pdsh
-w
$hosts
"python
-c 'import deepspeed; print(
\"
deepspeed info:
\"
, deepspeed.__version__, deepspeed.__git_branch__, deepspeed.__git_hash__)'
"
pdsh
-w
$hosts
"python
$tmp_wheel_path
/basic_install_test.py
"
echo
"Installation is successful"
fi
pdsh
-w
$hosts
"if [ -d
$tmp_wheel_path
]; then rm
$tmp_wheel_path
/*.whl
$tmp_wheel_path
/requirements.txt; rmdir
$tmp_wheel_path
; fi"
pdsh
-w
$hosts
"if [ -d
$tmp_wheel_path
]; then rm
$tmp_wheel_path
/*.whl
$tmp_wheel_path
/basic_install_test.py
$tmp_wheel_path
/requirements.txt; rmdir
$tmp_wheel_path
; fi"
fi
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