{"language": "Python", "id": 17, "repo_owner": "huggingface", "repo_name": "accelerate", "head_branch": "AjayP13-patch-1", "workflow_name": "Quality Check", "workflow_filename": "quality.yml", "workflow_path": ".github/workflows/quality.yml", "contributor": "AjayP13", "sha_fail": "028ad1efee2c41691d78e5a4de90ebd6f8236cad", "sha_success": "9ff59024aee19e24948401eb8cc7057602592b49", "workflow": "name: Quality Check\n\non: [pull_request]\n\njobs:\n quality:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/[email protected]\n - name: Set up Python 3.8\n uses: actions/setup-python@v3\n with:\n python-version: 3.8\n - name: Install Python dependencies\n run: pip install -e .[quality]\n - name: Run Quality check\n run: make quality\n - name: Check if failure\n if: ${{ failure() }}\n run: |\n echo \"Quality check failed. Please ensure the right dependency versions are installed with 'pip install -e .[quality]' and rerun 'make style; make quality;'\" >> $GITHUB_STEP_SUMMARY\n\n", "logs": [{"step_name": "quality/5_Run Quality check.txt", "log": "##[group]Run make quality\n\u001b[36;1mmake quality\u001b[0m\nshell: /usr/bin/bash -e {0}\nenv:\n pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib\n##[endgroup]\nblack --required-version 23 --check tests src examples benchmarks utils\nAll done! \u2728 \ud83c\udf70 \u2728\n118 files would be left unchanged.\nruff tests src examples benchmarks utils\nsrc/accelerate/utils/__init__.py:1:1: I001 [*] Import block is un-sorted or un-formatted\nsrc/accelerate/utils/modeling.py:15:1: I001 [*] Import block is un-sorted or un-formatted\nFound 2 errors.\n[*] 2 fixable with the `--fix` option.\nmake: *** [Makefile:16: quality] Error 1\n##[error]Process completed with exit code 2.\n"}], "diff": "diff --git a/src/accelerate/utils/__init__.py b/src/accelerate/utils/__init__.py\nindex ddf794a..7179afb 100644\n--- a/src/accelerate/utils/__init__.py\n+++ b/src/accelerate/utils/__init__.py\n@@ -59,7 +59,6 @@ from .imports import (\n is_comet_ml_available,\n is_cuda_available,\n is_datasets_available,\n- is_peft_available,\n is_deepspeed_available,\n is_dvclive_available,\n is_fp8_available,\n@@ -70,6 +69,7 @@ from .imports import (\n is_msamp_available,\n is_npu_available,\n is_pandas_available,\n+ is_peft_available,\n is_rich_available,\n is_sagemaker_available,\n is_tensorboard_available,\n@@ -81,7 +81,6 @@ from .imports import (\n is_xpu_available,\n )\n from .modeling import (\n- is_peft_model,\n calculate_maximum_sizes,\n check_device_map,\n check_tied_parameters_in_config,\n@@ -96,6 +95,7 @@ from .modeling import (\n get_mixed_precision_context_manager,\n id_tensor_storage,\n infer_auto_device_map,\n+ is_peft_model,\n load_checkpoint_in_model,\n load_offloaded_weights,\n load_state_dict,\ndiff --git a/src/accelerate/utils/modeling.py b/src/accelerate/utils/modeling.py\nindex 802b13c..03d3a39 100644\n--- a/src/accelerate/utils/modeling.py\n+++ b/src/accelerate/utils/modeling.py\n@@ -30,7 +30,7 @@ import torch.nn as nn\n from ..state import AcceleratorState\n from .constants import SAFE_WEIGHTS_NAME, WEIGHTS_NAME\n from .dataclasses import AutocastKwargs, CustomDtype, DistributedType\n-from .imports import is_mps_available, is_npu_available, is_xpu_available, is_peft_available\n+from .imports import is_mps_available, is_npu_available, is_peft_available, is_xpu_available\n from .offload import load_offloaded_weight, offload_weight, save_offload_index\n from .tqdm import is_tqdm_available, tqdm\n \n", "difficulty": 1, "changed_files": ["src/accelerate/utils/__init__.py", "src/accelerate/utils/modeling.py"], "commit_link": "https://github.com/huggingface/accelerate/tree/028ad1efee2c41691d78e5a4de90ebd6f8236cad"} |