Skip to content

Commit

Permalink
Move test datasets to tests/artifacts/testdata instead of tests/data (f…
Browse files Browse the repository at this point in the history
…oundation-model-stack#398)

Signed-off-by: Dushyant Behl <[email protected]>
  • Loading branch information
dushyantbehl authored Dec 3, 2024
1 parent 5c29940 commit 268ac80
Show file tree
Hide file tree
Showing 39 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tests/acceleration/test_acceleration_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
from tuning.utils.import_utils import is_fms_accelerate_available

# for some reason the CI will raise an import error if we try to import
# these from tests.data
# these from tests.artifacts.testdata
TWITTER_COMPLAINTS_JSON_FORMAT = os.path.join(
os.path.dirname(__file__), "../data/twitter_complaints_json.json"
os.path.dirname(__file__), "../artifacts/testdata/twitter_complaints_json.json"
)
TWITTER_COMPLAINTS_TOKENIZED = os.path.join(
os.path.dirname(__file__),
"../data/twitter_complaints_tokenized_with_maykeye_tinyllama_v0.json",
"../artifacts/testdata/twitter_complaints_tokenized_with_maykeye_tinyllama_v0.json",
)

# pylint: disable=import-error
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/build/test_launch_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# First Party
from build.accelerate_launch import main
from build.utils import serialize_args, get_highest_checkpoint
from tests.data import TWITTER_COMPLAINTS_DATA_JSONL
from tests.artifacts.testdata import TWITTER_COMPLAINTS_DATA_JSONL
from tuning.utils.error_logging import (
USER_ERROR_EXIT_CODE,
INTERNAL_ERROR_EXIT_CODE,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sft_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# First Party
from build.utils import serialize_args
from scripts.run_inference import TunedCausalLM
from tests.data import (
from tests.artifacts.testdata import (
EMPTY_DATA,
MALFORMATTED_DATA,
MODEL_NAME,
Expand Down
2 changes: 1 addition & 1 deletion tests/trainercontroller/test_tuning_trainercontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from tests.trainercontroller.custom_operation_invalid_action import (
CustomOperationInvalidAction,
)
import tests.data.trainercontroller as td
import tests.artifacts.testdata.trainercontroller as td

# Local
import tuning.config.configs as config
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import pytest

# First Party
from tests.data import TWITTER_COMPLAINTS_DATA_JSONL
from tests.artifacts.testdata import TWITTER_COMPLAINTS_DATA_JSONL

# Local
from tuning.utils import data_utils
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_preprocessing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest

# First Party
from tests.data import (
from tests.artifacts.testdata import (
MALFORMATTED_DATA,
MODEL_NAME,
TWITTER_COMPLAINTS_DATA_INPUT_OUTPUT_JSON,
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_tokenizer_data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from transformers import AutoModelForCausalLM, AutoTokenizer

# First Party
from tests.data import MODEL_NAME
from tests.artifacts.testdata import MODEL_NAME

# Local
# First party
Expand Down

0 comments on commit 268ac80

Please sign in to comment.