improve artifacts file
This commit is contained in:
1 parent
30329abc28
commit
a9439b5c61
1 file changed
+9
-6
@@ -3,12 +3,14 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
def upload_artifact():
|
def upload_artifact():
|
||||||
WANDB_PROJECT = "hackathon_template_test"
|
FOLDER_TO_UPLOAD_PATH = "../data/skyhacks"
|
||||||
WANDB_TEAM = "kino"
|
|
||||||
FILES_TO_UPLOAD_PATH = "../data/skyhacks"
|
|
||||||
ARTIFACT_NAME = "skyhacks-dataset"
|
ARTIFACT_NAME = "skyhacks-dataset"
|
||||||
TYPE = "dataset" # type can be anything but we recommend sticking to "dataset" / "model" / "result"
|
TYPE = "dataset" # type can be anything but we recommend sticking to "dataset" / "model" / "result"
|
||||||
|
|
||||||
|
WANDB_PROJECT = "hackathon_template_test"
|
||||||
|
WANDB_TEAM = "kino"
|
||||||
|
|
||||||
# Set project which will own the artifact
|
# Set project which will own the artifact
|
||||||
os.mkdir("../logs") if not os.path.exists("../logs") else None
|
os.mkdir("../logs") if not os.path.exists("../logs") else None
|
||||||
run = wandb.init(
|
run = wandb.init(
|
||||||
@@ -24,7 +26,8 @@ def upload_artifact():
|
|||||||
name=ARTIFACT_NAME,
|
name=ARTIFACT_NAME,
|
||||||
type=TYPE
|
type=TYPE
|
||||||
)
|
)
|
||||||
artifact.add_dir(FILES_TO_UPLOAD_PATH)
|
artifact.add_dir(FOLDER_TO_UPLOAD_PATH)
|
||||||
|
# artifact.add_file(MODEL_PATH)
|
||||||
|
|
||||||
# Upload artifact
|
# Upload artifact
|
||||||
run.log_artifact(artifact, aliases=["latest"])
|
run.log_artifact(artifact, aliases=["latest"])
|
||||||
@@ -45,5 +48,5 @@ def download_artifact():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# upload_artifact()
|
upload_artifact()
|
||||||
download_artifact()
|
# download_artifact()
|
||||||
Reference in new issue
Block a user