big refactoring
This commit is contained in:
1 parent
cfc298a2d2
commit
53e063ca7e
10 files changed
+41
-12
No files matched your search
@@ -47,6 +47,29 @@ def download_artifact():
|
||||
print("Files are being downloaded now...")
|
||||
|
||||
|
||||
def download_model_from_wandb_run():
|
||||
"""
|
||||
WARNING: This will overwrite your training_modules/models.py and training_modules/lightning_wrapper.py files!
|
||||
"""
|
||||
RUN_ID = "kino/hackathon_template_test/lx9voyom"
|
||||
MODEL_PATH = "last.ckpt"
|
||||
CODE_PATHS = [
|
||||
"code/training_modules/lightning_wrapper.py",
|
||||
"code/training_modules/models.py"
|
||||
]
|
||||
|
||||
api = wandb.Api()
|
||||
run = api.run(path=RUN_ID)
|
||||
|
||||
# download model
|
||||
run.file(MODEL_PATH).download(replace=True)
|
||||
|
||||
# download and replace your code
|
||||
for path in CODE_PATHS:
|
||||
run.file(path).download(root="../training_modules/", replace=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
upload_artifact()
|
||||
# download_artifact()
|
||||
# download_model_from_wandb_run()
|
||||
Reference in new issue
Block a user