Repository: mlflow/mlflow
Issue category: Performance Issue

Issue:
Remove useless `chunk_dicts`
### Summary

```diff
diff --git a/mlflow/openai/_openai_autolog.py b/mlflow/openai/_openai_autolog.py
index 149e92793..45e486808 100644
--- a/mlflow/openai/_openai_autolog.py
+++ b/mlflow/openai/_openai_autolog.py
@@ -158,7 +158,6 @@ def patched_call(original, self, *args, **kwargs):
                 yield chunk
 
             try:
-                chunk_dicts = []
                 chunk_dicts = [chunk.to_dict() for chunk in chunks]
                 if config.log_traces and request_id:
                     mlflow_client.end_trace(
```

### Notes

- Make sure to open a PR from a **non-master** branch.
- Sign off the commit using the `-s` flag when making a commit:

  ```sh
  git commit -s -m "..."
           # ^^ make sure to use this
  ```

- Include `#{issue_number}` (e.g. `#123`) in the PR description when opening a PR.



Hints:
@harupy ill work on this issue

Patch:
diff --git a/mlflow/openai/_openai_autolog.py b/mlflow/openai/_openai_autolog.py
index d67da788da443..5ddbf87dc4379 100644
--- a/mlflow/openai/_openai_autolog.py
+++ b/mlflow/openai/_openai_autolog.py
@@ -159,7 +159,6 @@ def _stream_output_logging_hook(stream: Iterator) -> Iterator:
                 yield chunk
 
             try:
-                chunk_dicts = []
                 chunk_dicts = [chunk.to_dict() for chunk in chunks]
                 if config.log_traces and request_id:
                     mlflow_client.end_trace(


Test patch: