mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-03 16:53:44 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b7ddce980 |
@@ -78,6 +78,7 @@ jobs:
|
|||||||
- name: Get next recompiled dir number
|
- name: Get next recompiled dir number
|
||||||
id: create-recompiled-dir
|
id: create-recompiled-dir
|
||||||
env:
|
env:
|
||||||
|
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||||
HF_REPO: ${{ github.event.inputs.hf_repo }}
|
HF_REPO: ${{ github.event.inputs.hf_repo }}
|
||||||
run: |
|
run: |
|
||||||
pip install huggingface_hub
|
pip install huggingface_hub
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ jobs:
|
|||||||
- name: Upload model to HF
|
- name: Upload model to HF
|
||||||
if: ${{ inputs.target == 'small' || inputs.target == 'big' }}
|
if: ${{ inputs.target == 'small' || inputs.target == 'big' }}
|
||||||
env:
|
env:
|
||||||
HF_OIDC_RESOURCE: datasets/${{ env.HF_REPO }}
|
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||||
ARTIFACT_NAME: ${{ steps.artifact.outputs.artifact_name }}
|
ARTIFACT_NAME: ${{ steps.artifact.outputs.artifact_name }}
|
||||||
run: |
|
run: |
|
||||||
rm -f output/artifact_name.txt
|
rm -f output/artifact_name.txt
|
||||||
@@ -367,7 +367,7 @@ jobs:
|
|||||||
- name: Generate DM metadata and upload to HF
|
- name: Generate DM metadata and upload to HF
|
||||||
if: ${{ inputs.target == 'dm' }}
|
if: ${{ inputs.target == 'dm' }}
|
||||||
env:
|
env:
|
||||||
HF_OIDC_RESOURCE: datasets/${{ env.HF_REPO }}
|
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
export PYTHONPATH=$(pwd)
|
export PYTHONPATH=$(pwd)
|
||||||
python3 -c "
|
python3 -c "
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Validate hf_repo and JSON version
|
- name: Validate hf_repo and JSON version
|
||||||
env:
|
env:
|
||||||
HF_OIDC_RESOURCE: datasets/${{ inputs.hf_repo }}
|
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
if [ ! -f "$JSON_FILE" ]; then
|
if [ ! -f "$JSON_FILE" ]; then
|
||||||
echo "JSON file $JSON_FILE does not exist!"
|
echo "JSON file $JSON_FILE does not exist!"
|
||||||
@@ -155,13 +155,8 @@ jobs:
|
|||||||
python3 -c "
|
python3 -c "
|
||||||
import sys
|
import sys
|
||||||
from huggingface_hub import HfApi
|
from huggingface_hub import HfApi
|
||||||
try:
|
HfApi().repo_info(repo_id=sys.argv[1], repo_type='dataset')
|
||||||
api = HfApi()
|
print(f'Success: Repo {sys.argv[1]} exists.')
|
||||||
api.repo_info(repo_id=sys.argv[1], repo_type='dataset')
|
|
||||||
print(f'Success: Repo {sys.argv[1]} exists.')
|
|
||||||
except Exception as e:
|
|
||||||
print('HF validation failed:', e)
|
|
||||||
sys.exit(1)
|
|
||||||
" "${{ inputs.hf_repo }}"
|
" "${{ inputs.hf_repo }}"
|
||||||
|
|
||||||
- name: Download artifact name file
|
- name: Download artifact name file
|
||||||
@@ -192,7 +187,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload to Hugging Face
|
- name: Upload to Hugging Face
|
||||||
env:
|
env:
|
||||||
HF_OIDC_RESOURCE: datasets/${{ inputs.hf_repo }}
|
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||||
ARTIFACT_NAME: ${{ steps.read-artifact-name.outputs.artifact_name }}
|
ARTIFACT_NAME: ${{ steps.read-artifact-name.outputs.artifact_name }}
|
||||||
run: |
|
run: |
|
||||||
hf upload ${{ inputs.hf_repo }} \
|
hf upload ${{ inputs.hf_repo }} \
|
||||||
|
|||||||
Reference in New Issue
Block a user