FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-python/tests/common.py at main · NCHQ02/docker-python · GitHub
NCHQ02
/
docker-python
Public
forked from
Kaggle/docker-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docker-python
/
tests
/
common.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (14 loc) · 738 Bytes
Breadcrumbs
docker-python
/
tests
/
common.py
Copy path
File metadata and controls
17 lines (14 loc) · 738 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Common testing setup"""
import
os
import
unittest
import
subprocess
def
getAcceleratorName
():
try
:
deviceName
=
subprocess
.
check_output
([
'nvidia-smi'
,
'--query-gpu=name'
,
'--format=csv,noheader'
])
return
deviceName
.
decode
(
'utf-8'
).
strip
()
except
FileNotFoundError
:
return
(
"nvidia-smi not found."
)
gpu_test
=
unittest
.
skipIf
(
len
(
os
.
environ
.
get
(
'CUDA_VERSION'
,
''
))
==
0
,
'Not running GPU tests'
)
# b/342143152 P100s are slowly being unsupported in new release of popular ml tools such as RAPIDS.
p100_exempt
=
unittest
.
skipIf
(
getAcceleratorName
()
==
"Tesla P100-PCIE-16GB"
,
'Not running p100 exempt tests'
)
tpu_test
=
unittest
.
skipIf
(
len
(
os
.
environ
.
get
(
'ISTPUVM'
,
''
))
==
0
,
'Not running TPU tests'
)
Back
|
FazBrowse Home
|
New Git URL