diff --git a/.github/workflows/rwkv-x-exp-lane1.yml b/.github/workflows/rwkv-x-exp-lane1.yml index 5c94977d..5b531336 100644 --- a/.github/workflows/rwkv-x-exp-lane1.yml +++ b/.github/workflows/rwkv-x-exp-lane1.yml @@ -51,7 +51,8 @@ jobs: run: | cd ./notebook/github-runner python3 ./hf-download.py "experiment/rwkv-x-exp/${{github.event.inputs.notebookFile}}" "${{github.event.inputs.huggingFaceRepo}}" - ls -alh ../../model/ + cd ../../model/ && pwd + ls -alh ./ - name: Run the notebook, with harness run: | cd ./notebook/github-runner diff --git a/notebook/github-runner/hf-upload.py b/notebook/github-runner/hf-upload.py index 7ac76a61..1e10dc33 100644 --- a/notebook/github-runner/hf-upload.py +++ b/notebook/github-runner/hf-upload.py @@ -29,19 +29,6 @@ print(f"# Uploading to: {hf_url}") print(f"# ------------------------------------") -print("# Uploading the models ... ") - -# Upload the models -api.upload_folder( - folder_path=MODEL_DIR, - repo_id=REPO_URI, - path_in_repo=NOTEBOOK_SUBDIR, - repo_type="model", - multi_commits=True, - allow_patterns=["*.pth"], - commit_message=f"[GHA] {NOTEBOOK_FILE} result models" -) - print("# Uploading the notebooks ... ") # Upload the ipynb files @@ -55,6 +42,22 @@ commit_message=f"[GHA] {NOTEBOOK_FILE} result notebooks" ) +# Upload the models +print("# Uploading the models ... ") +try: + api.upload_folder( + folder_path=MODEL_DIR, + repo_id=REPO_URI, + path_in_repo=NOTEBOOK_SUBDIR, + repo_type="model", + multi_commits=True, + allow_patterns=["*.pth"], + commit_message=f"[GHA] {NOTEBOOK_FILE} result models" + ) +except Exception as e: + print("# Skipping model upload due to error ... ") + print(e) + print(f"# ------------------------------------") print(f"# Uploaded to: {hf_url}") print(f"# ------------------------------------") \ No newline at end of file