mirror of
https://github.com/clearml/clearml
synced 2025-02-01 09:36:49 +00:00
Fix Conda also lists the CudaToolkit version installed (for the agent to reproduce)
This commit is contained in:
parent
2e050cf913
commit
144832d001
@ -135,6 +135,10 @@ class ScriptRequirements(object):
|
|||||||
conda_packages_json = json.loads(conda_packages_json)
|
conda_packages_json = json.loads(conda_packages_json)
|
||||||
reqs_lower = {k.lower(): (k, v) for k, v in reqs.items()}
|
reqs_lower = {k.lower(): (k, v) for k, v in reqs.items()}
|
||||||
for r in conda_packages_json:
|
for r in conda_packages_json:
|
||||||
|
# the exception is cudatoolkit which we want to log anyhow
|
||||||
|
if r.get('name') == 'cudatoolkit' and r.get('version'):
|
||||||
|
conda_requirements += '{0} {1} {2}\n'.format(r.get('name'), '==', r.get('version'))
|
||||||
|
continue
|
||||||
# check if this is a pypi package, if it is, leave it outside
|
# check if this is a pypi package, if it is, leave it outside
|
||||||
if not r.get('channel') or r.get('channel') == 'pypi':
|
if not r.get('channel') or r.get('channel') == 'pypi':
|
||||||
continue
|
continue
|
||||||
@ -200,6 +204,7 @@ class ScriptRequirements(object):
|
|||||||
for k in sorted(forced_packages.keys()):
|
for k in sorted(forced_packages.keys()):
|
||||||
requirements_txt += ScriptRequirements._make_req_line(k, forced_packages.get(k))
|
requirements_txt += ScriptRequirements._make_req_line(k, forced_packages.get(k))
|
||||||
|
|
||||||
|
requirements_txt_packages_only = requirements_txt
|
||||||
if detailed:
|
if detailed:
|
||||||
requirements_txt_packages_only = \
|
requirements_txt_packages_only = \
|
||||||
requirements_txt + '\n# Skipping detailed import analysis, it is too large\n'
|
requirements_txt + '\n# Skipping detailed import analysis, it is too large\n'
|
||||||
@ -524,6 +529,8 @@ class ScriptInfo(object):
|
|||||||
or len(sys.argv) < 3 or not sys.argv[2].endswith('.json'):
|
or len(sys.argv) < 3 or not sys.argv[2].endswith('.json'):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
server_info = None
|
||||||
|
|
||||||
# we can safely assume that we can import the notebook package here
|
# we can safely assume that we can import the notebook package here
|
||||||
# noinspection PyBroadException
|
# noinspection PyBroadException
|
||||||
try:
|
try:
|
||||||
@ -687,7 +694,7 @@ class ScriptInfo(object):
|
|||||||
# noinspection PyBroadException
|
# noinspection PyBroadException
|
||||||
try:
|
try:
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import hydra
|
import hydra # noqa
|
||||||
return Path(hydra.utils.get_original_cwd()).absolute()
|
return Path(hydra.utils.get_original_cwd()).absolute()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user