diff --git a/tests/acceleration/test_acceleration_framework.py b/tests/acceleration/test_acceleration_framework.py index b6acf7eb3..d25554fe6 100644 --- a/tests/acceleration/test_acceleration_framework.py +++ b/tests/acceleration/test_acceleration_framework.py @@ -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 diff --git a/tests/data/__init__.py b/tests/artifacts/testdata/__init__.py similarity index 100% rename from tests/data/__init__.py rename to tests/artifacts/testdata/__init__.py diff --git a/tests/data/empty_data.json b/tests/artifacts/testdata/empty_data.json similarity index 100% rename from tests/data/empty_data.json rename to tests/artifacts/testdata/empty_data.json diff --git a/tests/data/malformatted_data.json b/tests/artifacts/testdata/malformatted_data.json similarity index 100% rename from tests/data/malformatted_data.json rename to tests/artifacts/testdata/malformatted_data.json diff --git a/tests/data/trainercontroller/__init__.py b/tests/artifacts/testdata/trainercontroller/__init__.py similarity index 100% rename from tests/data/trainercontroller/__init__.py rename to tests/artifacts/testdata/trainercontroller/__init__.py diff --git a/tests/data/trainercontroller/epoch-level-eval-loss-patience.yaml b/tests/artifacts/testdata/trainercontroller/epoch-level-eval-loss-patience.yaml similarity index 100% rename from tests/data/trainercontroller/epoch-level-eval-loss-patience.yaml rename to tests/artifacts/testdata/trainercontroller/epoch-level-eval-loss-patience.yaml diff --git a/tests/data/trainercontroller/epoch-level-eval-loss.yaml b/tests/artifacts/testdata/trainercontroller/epoch-level-eval-loss.yaml similarity index 100% rename from tests/data/trainercontroller/epoch-level-eval-loss.yaml rename to tests/artifacts/testdata/trainercontroller/epoch-level-eval-loss.yaml diff --git a/tests/data/trainercontroller/epoch-level-training-loss.yaml b/tests/artifacts/testdata/trainercontroller/epoch-level-training-loss.yaml similarity index 100% rename from tests/data/trainercontroller/epoch-level-training-loss.yaml rename to tests/artifacts/testdata/trainercontroller/epoch-level-training-loss.yaml diff --git a/tests/data/trainercontroller/exposed_metrics.yaml b/tests/artifacts/testdata/trainercontroller/exposed_metrics.yaml similarity index 100% rename from tests/data/trainercontroller/exposed_metrics.yaml rename to tests/artifacts/testdata/trainercontroller/exposed_metrics.yaml diff --git a/tests/data/trainercontroller/incorrect_source_event_exposed_metrics.yaml b/tests/artifacts/testdata/trainercontroller/incorrect_source_event_exposed_metrics.yaml similarity index 100% rename from tests/data/trainercontroller/incorrect_source_event_exposed_metrics.yaml rename to tests/artifacts/testdata/trainercontroller/incorrect_source_event_exposed_metrics.yaml diff --git a/tests/data/trainercontroller/log_controller.yaml b/tests/artifacts/testdata/trainercontroller/log_controller.yaml similarity index 100% rename from tests/data/trainercontroller/log_controller.yaml rename to tests/artifacts/testdata/trainercontroller/log_controller.yaml diff --git a/tests/data/trainercontroller/loss_custom_metric.yaml b/tests/artifacts/testdata/trainercontroller/loss_custom_metric.yaml similarity index 100% rename from tests/data/trainercontroller/loss_custom_metric.yaml rename to tests/artifacts/testdata/trainercontroller/loss_custom_metric.yaml diff --git a/tests/data/trainercontroller/loss_custom_operation.yaml b/tests/artifacts/testdata/trainercontroller/loss_custom_operation.yaml similarity index 100% rename from tests/data/trainercontroller/loss_custom_operation.yaml rename to tests/artifacts/testdata/trainercontroller/loss_custom_operation.yaml diff --git a/tests/data/trainercontroller/loss_custom_operation_invalid_action.yaml b/tests/artifacts/testdata/trainercontroller/loss_custom_operation_invalid_action.yaml similarity index 100% rename from tests/data/trainercontroller/loss_custom_operation_invalid_action.yaml rename to tests/artifacts/testdata/trainercontroller/loss_custom_operation_invalid_action.yaml diff --git a/tests/data/trainercontroller/loss_invalid_metric.yaml b/tests/artifacts/testdata/trainercontroller/loss_invalid_metric.yaml similarity index 100% rename from tests/data/trainercontroller/loss_invalid_metric.yaml rename to tests/artifacts/testdata/trainercontroller/loss_invalid_metric.yaml diff --git a/tests/data/trainercontroller/loss_invalid_operation.yaml b/tests/artifacts/testdata/trainercontroller/loss_invalid_operation.yaml similarity index 100% rename from tests/data/trainercontroller/loss_invalid_operation.yaml rename to tests/artifacts/testdata/trainercontroller/loss_invalid_operation.yaml diff --git a/tests/data/trainercontroller/loss_invalid_operation_action.yaml b/tests/artifacts/testdata/trainercontroller/loss_invalid_operation_action.yaml similarity index 100% rename from tests/data/trainercontroller/loss_invalid_operation_action.yaml rename to tests/artifacts/testdata/trainercontroller/loss_invalid_operation_action.yaml diff --git a/tests/data/trainercontroller/loss_invalid_trigger.yaml b/tests/artifacts/testdata/trainercontroller/loss_invalid_trigger.yaml similarity index 100% rename from tests/data/trainercontroller/loss_invalid_trigger.yaml rename to tests/artifacts/testdata/trainercontroller/loss_invalid_trigger.yaml diff --git a/tests/data/trainercontroller/loss_on_threshold.yaml b/tests/artifacts/testdata/trainercontroller/loss_on_threshold.yaml similarity index 100% rename from tests/data/trainercontroller/loss_on_threshold.yaml rename to tests/artifacts/testdata/trainercontroller/loss_on_threshold.yaml diff --git a/tests/data/trainercontroller/loss_on_threshold_with_trainer_state.yaml b/tests/artifacts/testdata/trainercontroller/loss_on_threshold_with_trainer_state.yaml similarity index 100% rename from tests/data/trainercontroller/loss_on_threshold_with_trainer_state.yaml rename to tests/artifacts/testdata/trainercontroller/loss_on_threshold_with_trainer_state.yaml diff --git a/tests/data/trainercontroller/loss_unavailable_metric.yaml b/tests/artifacts/testdata/trainercontroller/loss_unavailable_metric.yaml similarity index 100% rename from tests/data/trainercontroller/loss_unavailable_metric.yaml rename to tests/artifacts/testdata/trainercontroller/loss_unavailable_metric.yaml diff --git a/tests/data/trainercontroller/loss_with_invalid_type_rule.yaml b/tests/artifacts/testdata/trainercontroller/loss_with_invalid_type_rule.yaml similarity index 100% rename from tests/data/trainercontroller/loss_with_invalid_type_rule.yaml rename to tests/artifacts/testdata/trainercontroller/loss_with_invalid_type_rule.yaml diff --git a/tests/data/trainercontroller/loss_with_malicious_input_rule.yaml b/tests/artifacts/testdata/trainercontroller/loss_with_malicious_input_rule.yaml similarity index 100% rename from tests/data/trainercontroller/loss_with_malicious_input_rule.yaml rename to tests/artifacts/testdata/trainercontroller/loss_with_malicious_input_rule.yaml diff --git a/tests/data/trainercontroller/loss_with_malicious_os_rule.yaml b/tests/artifacts/testdata/trainercontroller/loss_with_malicious_os_rule.yaml similarity index 100% rename from tests/data/trainercontroller/loss_with_malicious_os_rule.yaml rename to tests/artifacts/testdata/trainercontroller/loss_with_malicious_os_rule.yaml diff --git a/tests/data/trainercontroller/non-decreasing-training-loss.yaml b/tests/artifacts/testdata/trainercontroller/non-decreasing-training-loss.yaml similarity index 100% rename from tests/data/trainercontroller/non-decreasing-training-loss.yaml rename to tests/artifacts/testdata/trainercontroller/non-decreasing-training-loss.yaml diff --git a/tests/data/trainercontroller/on-save.yaml b/tests/artifacts/testdata/trainercontroller/on-save.yaml similarity index 100% rename from tests/data/trainercontroller/on-save.yaml rename to tests/artifacts/testdata/trainercontroller/on-save.yaml diff --git a/tests/data/trainercontroller/thresholded-training-loss.yaml b/tests/artifacts/testdata/trainercontroller/thresholded-training-loss.yaml similarity index 100% rename from tests/data/trainercontroller/thresholded-training-loss.yaml rename to tests/artifacts/testdata/trainercontroller/thresholded-training-loss.yaml diff --git a/tests/data/twitter_complaints_input_output.json b/tests/artifacts/testdata/twitter_complaints_input_output.json similarity index 100% rename from tests/data/twitter_complaints_input_output.json rename to tests/artifacts/testdata/twitter_complaints_input_output.json diff --git a/tests/data/twitter_complaints_input_output.jsonl b/tests/artifacts/testdata/twitter_complaints_input_output.jsonl similarity index 100% rename from tests/data/twitter_complaints_input_output.jsonl rename to tests/artifacts/testdata/twitter_complaints_input_output.jsonl diff --git a/tests/data/twitter_complaints_small.json b/tests/artifacts/testdata/twitter_complaints_small.json similarity index 100% rename from tests/data/twitter_complaints_small.json rename to tests/artifacts/testdata/twitter_complaints_small.json diff --git a/tests/data/twitter_complaints_small.jsonl b/tests/artifacts/testdata/twitter_complaints_small.jsonl similarity index 100% rename from tests/data/twitter_complaints_small.jsonl rename to tests/artifacts/testdata/twitter_complaints_small.jsonl diff --git a/tests/data/twitter_complaints_tokenized_with_maykeye_tinyllama_v0.json b/tests/artifacts/testdata/twitter_complaints_tokenized_with_maykeye_tinyllama_v0.json similarity index 100% rename from tests/data/twitter_complaints_tokenized_with_maykeye_tinyllama_v0.json rename to tests/artifacts/testdata/twitter_complaints_tokenized_with_maykeye_tinyllama_v0.json diff --git a/tests/data/twitter_complaints_tokenized_with_maykeye_tinyllama_v0.jsonl b/tests/artifacts/testdata/twitter_complaints_tokenized_with_maykeye_tinyllama_v0.jsonl similarity index 100% rename from tests/data/twitter_complaints_tokenized_with_maykeye_tinyllama_v0.jsonl rename to tests/artifacts/testdata/twitter_complaints_tokenized_with_maykeye_tinyllama_v0.jsonl diff --git a/tests/build/test_launch_script.py b/tests/build/test_launch_script.py index e2c37950b..e331a5e9b 100644 --- a/tests/build/test_launch_script.py +++ b/tests/build/test_launch_script.py @@ -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, diff --git a/tests/test_sft_trainer.py b/tests/test_sft_trainer.py index a800ed6f6..0a4ab3d14 100644 --- a/tests/test_sft_trainer.py +++ b/tests/test_sft_trainer.py @@ -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, diff --git a/tests/trainercontroller/test_tuning_trainercontroller.py b/tests/trainercontroller/test_tuning_trainercontroller.py index ba1a05808..2326e8e8c 100644 --- a/tests/trainercontroller/test_tuning_trainercontroller.py +++ b/tests/trainercontroller/test_tuning_trainercontroller.py @@ -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 diff --git a/tests/utils/test_data_utils.py b/tests/utils/test_data_utils.py index f89736657..e56a708b5 100644 --- a/tests/utils/test_data_utils.py +++ b/tests/utils/test_data_utils.py @@ -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 diff --git a/tests/utils/test_preprocessing_utils.py b/tests/utils/test_preprocessing_utils.py index 2fbbc38ff..cd67a78bb 100644 --- a/tests/utils/test_preprocessing_utils.py +++ b/tests/utils/test_preprocessing_utils.py @@ -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, diff --git a/tests/utils/test_tokenizer_data_utils.py b/tests/utils/test_tokenizer_data_utils.py index 1afd34d4d..e24c90099 100644 --- a/tests/utils/test_tokenizer_data_utils.py +++ b/tests/utils/test_tokenizer_data_utils.py @@ -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