Refactor collections and fstrings (#7821)
* Update torch_utils.py * Additional code refactoring * tuples to sets * Cleanup
This commit is contained in:
1 parent
3356f2609c
commit
f00071416f
9 files changed
+58
-63
No files matched your search
@@ -22,7 +22,7 @@ try:
|
||||
import wandb
|
||||
|
||||
assert hasattr(wandb, '__version__') # verify package import not local dir
|
||||
if pkg.parse_version(wandb.__version__) >= pkg.parse_version('0.12.2') and RANK in [0, -1]:
|
||||
if pkg.parse_version(wandb.__version__) >= pkg.parse_version('0.12.2') and RANK in {0, -1}:
|
||||
try:
|
||||
wandb_login_success = wandb.login(timeout=30)
|
||||
except wandb.errors.UsageError: # known non-TTY terminal issue
|
||||
@@ -176,7 +176,7 @@ class Loggers():
|
||||
if not self.opt.evolve:
|
||||
wandb.log_artifact(str(best if best.exists() else last),
|
||||
type='model',
|
||||
name='run_' + self.wandb.wandb_run.id + '_model',
|
||||
name=f'run_{self.wandb.wandb_run.id}_model',
|
||||
aliases=['latest', 'best', 'stripped'])
|
||||
self.wandb.finish_run()
|
||||
|
||||
|
||||
Reference in new issue
Block a user