Skip to content

Commit

Permalink
Merge branch 'main' into init_round_4
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker authored Dec 20, 2024
2 parents 75496a8 + 6fae2a8 commit f639bba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"av==9.2.0", # Latest version of PyAV (10.0.0) has issues with audio stream.
"beautifulsoup4",
"blobfile",
"codecarbon==1.2.0",
"codecarbon>=2.8.1",
"cookiecutter==1.7.3",
"dataclasses",
"datasets!=2.5.0",
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/dependency_versions_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"av": "av==9.2.0",
"beautifulsoup4": "beautifulsoup4",
"blobfile": "blobfile",
"codecarbon": "codecarbon==1.2.0",
"codecarbon": "codecarbon>=2.8.1",
"cookiecutter": "cookiecutter==1.7.3",
"dataclasses": "dataclasses",
"datasets": "datasets!=2.5.0",
Expand Down
11 changes: 7 additions & 4 deletions utils/tests_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,9 +995,7 @@ def _print_list(l) -> str:


def infer_tests_to_run(
output_file: str,
diff_with_last_commit: bool = False,
filter_models: bool = False,
output_file: str, diff_with_last_commit: bool = False, filter_models: bool = False, test_all: bool = False
):
"""
The main function called by the test fetcher. Determines the tests to run from the diff.
Expand All @@ -1018,7 +1016,11 @@ def infer_tests_to_run(
Whether or not to filter the tests to core models only, when a file modified results in a lot of model
tests.
"""
modified_files = get_modified_python_files(diff_with_last_commit=diff_with_last_commit)
if not test_all:
modified_files = get_modified_python_files(diff_with_last_commit=diff_with_last_commit)
else:
modified_files = [str(k) for k in PATH_TO_TESTS.glob("*/*") if str(k).endswith(".py") and "test_" in str(k)]
print("\n### test_all is TRUE, FETCHING ALL FILES###\n")
print(f"\n### MODIFIED FILES ###\n{_print_list(modified_files)}")

# Create the map that will give us all impacted modules.
Expand Down Expand Up @@ -1230,5 +1232,6 @@ def create_test_list_from_filter(full_test_list, out_path):
args.output_file,
diff_with_last_commit=diff_with_last_commit,
filter_models=False,
test_all=commit_flags["test_all"],
)
filter_tests(args.output_file, ["repo_utils"])

0 comments on commit f639bba

Please sign in to comment.