meg HF staff commited on
Commit
b12f36a
·
verified ·
1 Parent(s): f3aaf5d

Add files using upload-large-folder tool

Browse files
Files changed (2) hide show
  1. __pycache__/app.cpython-39.pyc +0 -0
  2. app.py +3 -3
__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
@@ -9,7 +9,7 @@ API = HfApi(token=TOKEN)
9
  wandb_api_key = os.environ.get('wandb_api_key')
10
  wandb.login(key=wandb_api_key)
11
 
12
- REPO_ID = f"datacomp/imagenet-1k-random-20.0-frac-1over2"
13
  app = FastAPI()
14
 
15
  @app.get("/")
@@ -27,11 +27,11 @@ def start_train():
27
  os.system(f"export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True")
28
  os.system("export CUDA_LAUNCH_BLOCKING=1")
29
  os.system("echo 'Okay, trying training.'")
30
- os.system(f"cd pytorch-image-models; ./train.sh 4 --dataset hfds/{REPO_ID} --log-wandb --experiment {REPO_ID} --model seresnet34 --sched cosine --epochs 150 --warmup-epochs 5 --lr 0.4 --reprob 0.5 --remode pixel --batch-size 256 --amp -j 4")
31
  os.system("echo ls")
32
  os.system("ls")
33
  os.system("echo 'trying to upload...'")
34
- API.upload_folder(folder_path="/app", repo_id=f"{REPO_ID}", repo_type="dataset",)
35
  # API.add_space_variable(repo_id=REPO_ID, key='STATUS', value='NOT_COMPUTING')
36
  #API.pause_space(f"{REPO_ID}")
37
  return {"Completed": "!"}
 
9
  wandb_api_key = os.environ.get('wandb_api_key')
10
  wandb.login(key=wandb_api_key)
11
 
12
+ REPO_ID = f"imagenet-1k-random-20.0-frac-1over2"
13
  app = FastAPI()
14
 
15
  @app.get("/")
 
27
  os.system(f"export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True")
28
  os.system("export CUDA_LAUNCH_BLOCKING=1")
29
  os.system("echo 'Okay, trying training.'")
30
+ os.system(f"cd pytorch-image-models; ./train.sh 4 --dataset hfds/datacomp/{REPO_ID} --log-wandb --experiment {REPO_ID} --model seresnet34 --sched cosine --epochs 150 --warmup-epochs 5 --lr 0.4 --reprob 0.5 --remode pixel --batch-size 256 --amp -j 4")
31
  os.system("echo ls")
32
  os.system("ls")
33
  os.system("echo 'trying to upload...'")
34
+ API.upload_large_folder(folder_path="/app", repo_id=f"datacomp/{REPO_ID}", repo_type="dataset",)
35
  # API.add_space_variable(repo_id=REPO_ID, key='STATUS', value='NOT_COMPUTING')
36
  #API.pause_space(f"{REPO_ID}")
37
  return {"Completed": "!"}