Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fixed reader loading test for hf-hub starting 0.14.0 #4607

Merged
merged 9 commits into from
May 2, 2023
6 changes: 1 addition & 5 deletions test/nodes/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,10 @@ def test_farm_reader_load_hf_local(tmp_path):

hf_model = "hf-internal-testing/tiny-random-RobertaForQuestionAnswering"
local_model_path = "locally_saved_hf"
cwd_path = os.getcwd()
local_model_path = _joinpath(cwd_path, local_model_path)

# TODO: change the /tmp to proper tmp_path and get rid of rmtree
# local_model_path = str(Path.joinpath(tmp_path, local_model_path))
local_model_path = str(Path.joinpath(tmp_path, local_model_path))
model_path = snapshot_download(repo_id=hf_model, revision="main", cache_dir=local_model_path)
_ = FARMReader(model_name_or_path=model_path, use_gpu=False, no_ans_boost=0, num_processes=0)
rmtree(local_model_path)


@pytest.mark.integration
Expand Down