Upload folder using huggingface_hub
Browse files- __pycache__/app.cpython-39.pyc +0 -0
- app.py +7 -3
- pytorch-image-models/timm/data/__pycache__/transforms_factory.cpython-39.pyc +0 -0
- pytorch-image-models/timm/models/__pycache__/_pretrained.cpython-39.pyc +0 -0
- pytorch-image-models/timm/models/__pycache__/coat.cpython-39.pyc +0 -0
- pytorch-image-models/timm/models/__pycache__/tnt.cpython-39.pyc +0 -0
- pytorch-image-models/timm/models/__pycache__/vision_transformer.cpython-39.pyc +0 -0
__pycache__/app.cpython-39.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-39.pyc and b/__pycache__/app.cpython-39.pyc differ
|
|
|
app.py
CHANGED
|
@@ -26,10 +26,14 @@ def start_train():
|
|
| 26 |
API.create_repo(repo_id=f"{experiment_name}", repo_type="dataset",)
|
| 27 |
os.system(f"echo 'Created results output repository {experiment_name}'")
|
| 28 |
except:
|
|
|
|
| 29 |
pass
|
| 30 |
# Mark that training is happening so any refresh of the Space doesn't start training again.
|
| 31 |
space_variables = API.get_space_variables(repo_id=experiment_name)
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
| 33 |
os.system("echo 'Beginning processing.'")
|
| 34 |
API.add_space_variable(repo_id=experiment_name, key='STATUS', value='COMPUTING')
|
| 35 |
# Handles CUDA OOM errors.
|
|
@@ -44,6 +48,6 @@ def start_train():
|
|
| 44 |
os.system("echo 'trying to upload...'")
|
| 45 |
API.upload_folder(folder_path="/app", repo_id=f"{experiment_name}", repo_type="dataset",)
|
| 46 |
# API.pause_space(experiment_name)
|
|
|
|
| 47 |
else:
|
| 48 |
-
os.system("Already training model.")
|
| 49 |
-
return {"Completed": "!"}
|
|
|
|
| 26 |
API.create_repo(repo_id=f"{experiment_name}", repo_type="dataset",)
|
| 27 |
os.system(f"echo 'Created results output repository {experiment_name}'")
|
| 28 |
except:
|
| 29 |
+
os.system("echo 'Already there; skipping.'")
|
| 30 |
pass
|
| 31 |
# Mark that training is happening so any refresh of the Space doesn't start training again.
|
| 32 |
space_variables = API.get_space_variables(repo_id=experiment_name)
|
| 33 |
+
os.system("echo 'Here are the space variables'")
|
| 34 |
+
for key, value in space_variables.items():
|
| 35 |
+
os.system(f"echo '{key}: {value}'")
|
| 36 |
+
if 'STATUS' not in space_variables or space_variables['STATUS'].value != 'COMPUTING':
|
| 37 |
os.system("echo 'Beginning processing.'")
|
| 38 |
API.add_space_variable(repo_id=experiment_name, key='STATUS', value='COMPUTING')
|
| 39 |
# Handles CUDA OOM errors.
|
|
|
|
| 48 |
os.system("echo 'trying to upload...'")
|
| 49 |
API.upload_folder(folder_path="/app", repo_id=f"{experiment_name}", repo_type="dataset",)
|
| 50 |
# API.pause_space(experiment_name)
|
| 51 |
+
return {"Completed": "!"}
|
| 52 |
else:
|
| 53 |
+
os.system("echo 'Already training model.'")
|
|
|
pytorch-image-models/timm/data/__pycache__/transforms_factory.cpython-39.pyc
CHANGED
|
Binary files a/pytorch-image-models/timm/data/__pycache__/transforms_factory.cpython-39.pyc and b/pytorch-image-models/timm/data/__pycache__/transforms_factory.cpython-39.pyc differ
|
|
|
pytorch-image-models/timm/models/__pycache__/_pretrained.cpython-39.pyc
CHANGED
|
Binary files a/pytorch-image-models/timm/models/__pycache__/_pretrained.cpython-39.pyc and b/pytorch-image-models/timm/models/__pycache__/_pretrained.cpython-39.pyc differ
|
|
|
pytorch-image-models/timm/models/__pycache__/coat.cpython-39.pyc
CHANGED
|
Binary files a/pytorch-image-models/timm/models/__pycache__/coat.cpython-39.pyc and b/pytorch-image-models/timm/models/__pycache__/coat.cpython-39.pyc differ
|
|
|
pytorch-image-models/timm/models/__pycache__/tnt.cpython-39.pyc
CHANGED
|
Binary files a/pytorch-image-models/timm/models/__pycache__/tnt.cpython-39.pyc and b/pytorch-image-models/timm/models/__pycache__/tnt.cpython-39.pyc differ
|
|
|
pytorch-image-models/timm/models/__pycache__/vision_transformer.cpython-39.pyc
CHANGED
|
Binary files a/pytorch-image-models/timm/models/__pycache__/vision_transformer.cpython-39.pyc and b/pytorch-image-models/timm/models/__pycache__/vision_transformer.cpython-39.pyc differ
|
|
|