mirror of
https://github.com/clearml/clearml
synced 2025-02-07 21:33:25 +00:00
Try to make sure tensorboard is available when using torch
This commit is contained in:
parent
affd6050f6
commit
66b251a62b
@ -134,6 +134,17 @@ class ScriptRequirements(object):
|
|||||||
modules.add('azure_storage_blob', 'trains.storage', 0)
|
modules.add('azure_storage_blob', 'trains.storage', 0)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
# if we have torch and it supports tensorboard, we should add that as well
|
||||||
|
# (because it will not be detected automatically)
|
||||||
|
if 'torch' in modules and 'tensorboard' not in modules:
|
||||||
|
# noinspection PyBroadException
|
||||||
|
try:
|
||||||
|
# see if this version of torch support tensorboard
|
||||||
|
import torch.utils.tensorboard
|
||||||
|
import tensorboard
|
||||||
|
modules.add('tensorboard', 'torch', 0)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
return modules, try_imports, local_mods
|
return modules, try_imports, local_mods
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user