Add models cleanup to training script
This commit is contained in:
parent
9109be5776
commit
03bd6ad9d8
@ -251,7 +251,11 @@ def main():
|
|||||||
batch_size=batch_size, train=False, num_workers=3),
|
batch_size=batch_size, train=False, num_workers=3),
|
||||||
ckpt_path=ckpt_path)
|
ckpt_path=ckpt_path)
|
||||||
|
|
||||||
# TODO: Clean up non-best models to save space on wandb
|
# Clean up models that do not have best/latest tags, to save space on wandb
|
||||||
|
for artifact in wandb.Api().run(run.path).logged_artifacts():
|
||||||
|
if artifact.type == "model" and not artifact.aliases:
|
||||||
|
logging.info(f"Deleting artifact {artifact.name}")
|
||||||
|
artifact.delete()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user