Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jstzwj committed Jul 8, 2024
1 parent f5e792f commit b56d0b2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
cd ${{ github.workspace }}
pip install --upgrade pip
pip install -e .
pip install -r requirements
- name: Test Olah
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
cd ${{ github.workspace }}
pip install --upgrade pip
pip install -e .
pip install -r requirements
- name: Test Olah
run: |
Expand Down
12 changes: 11 additions & 1 deletion tests/simple_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@

from huggingface_hub import snapshot_download

def test_simple():
def test_dataset():
process = subprocess.Popen(['python', '-m', 'olah.server'])

os.environ['HF_ENDPOINT'] = 'http://localhost:8090'
snapshot_download(repo_id='Nerfgun3/bad_prompt', repo_type='dataset',
local_dir='./dataset_dir', max_workers=8)

# 终止子进程
process.terminate()

def test_model():
process = subprocess.Popen(['python', '-m', 'olah.server'])

os.environ['HF_ENDPOINT'] = 'http://localhost:8090'
snapshot_download(repo_id='prajjwal1/bert-tiny', repo_type='model',
local_dir='./model_dir', max_workers=8)

# 终止子进程
process.terminate()

0 comments on commit b56d0b2

Please sign in to comment.