Repository: foundation-model-stack/fms-hf-tuning (language: python)

Issue:
build(deps): Update accelerate requirement from !=0.34,<0.35,>=0.20.3 to >=0.20.3,!=0.34,<1.1
Updates the requirements on [accelerate](https://github.com/huggingface/accelerate) to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/huggingface/accelerate/releases">accelerate's releases</a>.</em></p>
<blockquote>
<h2>v1.0.1: Bugfix</h2>
<h2>Bugfixes</h2>
<ul>
<li>Fixes an issue where the <code>auto</code> values were no longer being parsed when using <a href="https://redirect.github.com/huggingface/accelerate/pull/3143">deepspeed</a></li>
<li>Fixes a broken test in the deepspeed tests related to the <a href="https://redirect.github.com/huggingface/accelerate/pull/3145">auto values</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/huggingface/accelerate/compare/v1.0.0...v1.0.1">https://github.com/huggingface/accelerate/compare/v1.0.0...v1.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/huggingface/accelerate/commit/a427548f7341f23e80f71e7796b046484e593a7f"><code>a427548</code></a> DS fix, continued (<a href="https://redirect.github.com/huggingface/accelerate/issues/3145">#3145</a>)</li>
<li><a href="https://github.com/huggingface/accelerate/commit/42be235d17750844dcdfc3dfaafd9c8bae5f7d80"><code>42be235</code></a> Fixup DS issue with weakref (<a href="https://redirect.github.com/huggingface/accelerate/issues/3143">#3143</a>)</li>
<li><a href="https://github.com/huggingface/accelerate/commit/a650d1b3246bade5c91307d5f9759c49de85e769"><code>a650d1b</code></a> Modify version</li>
<li><a href="https://github.com/huggingface/accelerate/commit/5d71646380f57723da7d75ba668637c05358bd7c"><code>5d71646</code></a> Fix merge</li>
<li><a href="https://github.com/huggingface/accelerate/commit/97d413ef3e0a21fd4a80af3eaf354e5b8262a5d9"><code>97d413e</code></a> Release: v1.0.0</li>
<li><a href="https://github.com/huggingface/accelerate/commit/0c46240894529bf90b7882ee070f8c68de832997"><code>0c46240</code></a> Release: v1.0.0rc1</li>
<li><a href="https://github.com/huggingface/accelerate/commit/873b623a124aeb1244dc8e4d65468d8c7d225583"><code>873b623</code></a> Release: v1.0.0rc0</li>
<li><a href="https://github.com/huggingface/accelerate/commit/127818fc27ebe5cb236357fff59ff1748326d643"><code>127818f</code></a> MNT Permission for PRs for GH token in stale.yml (<a href="https://redirect.github.com/huggingface/accelerate/issues/3112">#3112</a>)</li>
<li><a href="https://github.com/huggingface/accelerate/commit/bcc13c00b56021cb7b9059a43d0e05f1f34dca46"><code>bcc13c0</code></a> typo of &quot;scalar&quot; instead of &quot;scaler&quot; (<a href="https://redirect.github.com/huggingface/accelerate/issues/3116">#3116</a>)</li>
<li><a href="https://github.com/huggingface/accelerate/commit/d4d6b6e7f58bb7a1a8391fd9b25d6a5ffcb19cce"><code>d4d6b6e</code></a> fix tip brackets typo (<a href="https://redirect.github.com/huggingface/accelerate/issues/3129">#3129</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/huggingface/accelerate/compare/v0.20.3...v1.0.1">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Discussion / hints:

Fix patch:
diff --git a/fixtures/accelerate_fsdp_defaults.yaml b/fixtures/accelerate_fsdp_defaults.yaml
index f70d74faa..30916b2a5 100644
--- a/fixtures/accelerate_fsdp_defaults.yaml
+++ b/fixtures/accelerate_fsdp_defaults.yaml
@@ -14,9 +14,10 @@ fsdp_config:
   fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
 
   # this controls the FSDP pipelining
-  fsdp_backward_prefetch_policy: BACKWARD_PRE # set to BACKWARD_PRE for the most time-efficient pipeline
+  fsdp_backward_prefetch: BACKWARD_PRE # set to BACKWARD_PRE for the most time-efficient pipeline
                                               # but requires the most memory. BACKWARD_POST is the less
                                               # memory intensive option
+  fsdp_backward_prefetch_policy: BACKWARD_PRE # for backwards compatibility
 
   # setting this to true will increase forward memory by prefetching the next FSDP all-gather, while performing
   # the current forward pass. 
diff --git a/pyproject.toml b/pyproject.toml
index 541e89112..021beeb57 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -27,7 +27,7 @@ classifiers=[
 ]
 dependencies = [
 "numpy>=1.26.4,<2.0",
-"accelerate>=0.20.3,<0.35,!=0.34",
+"accelerate>=0.20.3,!=0.34,<1.1",
 "transformers>4.41,<4.50",
 "torch>=2.2.0,<3.0",
 "sentencepiece>=0.1.99,<0.3",


Test patch:
diff --git a/tests/build/dummy_job_config.json b/tests/build/dummy_job_config.json
index 315a5b527..ed5abfa85 100644
--- a/tests/build/dummy_job_config.json
+++ b/tests/build/dummy_job_config.json
@@ -5,7 +5,7 @@
       "dynamo_use_dynamic": true,
       "num_machines": 1,
       "main_process_port": 1234,
-      "fsdp_backward_prefetch_policy": "TRANSFORMER_BASED_WRAP",
+      "fsdp_backward_prefetch": "TRANSFORMER_BASED_WRAP",
       "fsdp_sharding_strategy": 1,
       "fsdp_state_dict_type": "FULL_STATE_DICT",
       "fsdp_cpu_ram_efficient_loading": true,
diff --git a/tests/build/test_utils.py b/tests/build/test_utils.py
index fde0ffb2c..4ad228879 100644
--- a/tests/build/test_utils.py
+++ b/tests/build/test_utils.py
@@ -44,7 +44,7 @@ def test_process_accelerate_launch_args(job_config):
     args = process_accelerate_launch_args(job_config)
     # json config values used
     assert args.use_fsdp is True
-    assert args.fsdp_backward_prefetch_policy == "TRANSFORMER_BASED_WRAP"
+    assert args.fsdp_backward_prefetch == "TRANSFORMER_BASED_WRAP"
     assert args.env == ["env1", "env2"]
     assert args.training_script == "tuning.sft_trainer"
     assert args.config_file == "fixtures/accelerate_fsdp_defaults.yaml"