diff --git a/policyengine_core/simulations/simulation.py b/policyengine_core/simulations/simulation.py index 23fbe59e..9965735c 100644 --- a/policyengine_core/simulations/simulation.py +++ b/policyengine_core/simulations/simulation.py @@ -159,7 +159,9 @@ def __init__( else: version = None dataset = download_huggingface_dataset( - owner + "/" + repo, filename, version + repo=f"{owner}/{repo}", + repo_filename=filename, + version=version, ) datasets_by_name = { dataset.name: dataset for dataset in self.datasets diff --git a/tests/core/tools/test_hugging_face.py b/tests/core/tools/test_hugging_face.py index 90f8cae9..16c92f29 100644 --- a/tests/core/tools/test_hugging_face.py +++ b/tests/core/tools/test_hugging_face.py @@ -9,7 +9,7 @@ ) -class TestHfDownload: +class TestHuggingFaceDownload: def test_download_public_repo(self): """Test downloading from a public repo""" test_repo = "test_repo" @@ -91,7 +91,6 @@ def test_download_private_repo_no_token(self): download_huggingface_dataset(test_repo, test_filename, test_version) mock_download.assert_not_called() - class TestGetOrPromptHfToken: def test_get_token_from_environment(self): """Test retrieving token when it exists in environment variables"""