Repository: huggingface/accelerate

Issue:
Rm DVCLive from test reqs as latest version causes failures
# What does this PR do?

The latest DVCLive is causing failures on main + nightlies due to a key error. Removing from test reqs until @dberenbaum can take a look. 

Fixes # (issue)


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/accelerate/blob/main/CONTRIBUTING.md#submitting-a-pull-request-pr),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/accelerate/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/accelerate/tree/main/docs#writing-documentation---specification).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@SunMarc 


Discussion:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/accelerate/pr_2279). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@
 extras["testing"] = extras["test_prod"] + extras["test_dev"]
 extras["rich"] = ["rich"]
 
-extras["test_trackers"] = ["wandb", "comet-ml", "tensorboard"]
+extras["test_trackers"] = ["wandb", "comet-ml", "tensorboard", "dvclive"]
 extras["dev"] = extras["quality"] + extras["testing"] + extras["rich"]
 
 extras["sagemaker"] = [
diff --git a/src/accelerate/tracking.py b/src/accelerate/tracking.py
--- a/src/accelerate/tracking.py
+++ b/src/accelerate/tracking.py
@@ -947,6 +947,7 @@ def log(self, values: dict, step: Optional[int] = None, **kwargs):
                     "This invocation of DVCLive's Live.log_metric() "
                     "is incorrect so we dropped this attribute."
                 )
+        self.live.next_step()
 
     @on_main_process
     def finish(self):


Test patch:
diff --git a/tests/test_tracking.py b/tests/test_tracking.py
--- a/tests/test_tracking.py
+++ b/tests/test_tracking.py
@@ -513,12 +513,19 @@ def test_log(self, mock_repo):
             init_kwargs = {"dvclive": {"dir": dirpath, "save_dvc_exp": False, "dvcyaml": None}}
             accelerator.init_trackers(project_name, init_kwargs=init_kwargs)
             values = {"total_loss": 0.1, "iteration": 1, "my_text": "some_value"}
-            accelerator.log(values, step=0)
+            # Log step 0
+            accelerator.log(values)
+            # Log step 1
+            accelerator.log(values)
+            # Log step 3 (skip step 2)
+            accelerator.log(values, step=3)
             accelerator.end_training()
             live = accelerator.trackers[0].live
             logs, latest = parse_metrics(live)
+            assert latest.pop("step") == 3
             assert latest == values
             scalars = os.path.join(live.plots_dir, Metric.subfolder)
-            assert os.path.join(scalars, "total_loss.tsv") in logs
-            assert os.path.join(scalars, "iteration.tsv") in logs
-            assert os.path.join(scalars, "my_text.tsv") in logs
+            for val in values.keys():
+                val_path = os.path.join(scalars, f"{val}.tsv")
+                steps = [int(row["step"]) for row in logs[val_path]]
+                assert steps == [0, 1, 3]