From eecc4d8aaeb87792d8725b01bae5e9187f201042 Mon Sep 17 00:00:00 2001 From: Elad Venezian Date: Sun, 17 Mar 2024 13:44:32 +0200 Subject: [PATCH] Use only env vars instead of setting --- .github/workflows/catalog_preparation_consistency.yml | 1 + utils/prepare_all_artifacts.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/catalog_preparation_consistency.yml b/.github/workflows/catalog_preparation_consistency.yml index f983088ce9..df9927920b 100644 --- a/.github/workflows/catalog_preparation_consistency.yml +++ b/.github/workflows/catalog_preparation_consistency.yml @@ -23,5 +23,6 @@ jobs: - run: pip install -r requirements/base.rqr - run: pip install -r requirements/tests.rqr + - run: export PYTHONPATH="$(pwd)/src:$PYTHONPATH" - name: Run Tests run: python utils/prepare_all_artifacts.py \ No newline at end of file diff --git a/utils/prepare_all_artifacts.py b/utils/prepare_all_artifacts.py index 80b640381a..bc78202d93 100644 --- a/utils/prepare_all_artifacts.py +++ b/utils/prepare_all_artifacts.py @@ -3,7 +3,6 @@ import importlib.util import os import shutil -from src.unitxt.settings_utils import get_settings def import_module_from_file(file_path): @@ -36,8 +35,7 @@ def prepare_all_artifacts_in_catalog_for_type(artifact_type): def prepare_all_catalog_artifacts(): - settings = get_settings() - settings.use_only_local_catalogs = True + os.environ["UNITXT_USE_ONLY_LOCAL_CATALOGS"] = "True" os.environ["UNITXT_TEST_CARD_DISABLE"] = "True" os.environ["UNITXT_TEST_METRIC_DISABLE"] = "True" print("*" * 100)