Clarify that max_steps is required for datasets without __len__
Author: albertvillanova
Pull request: yes

<!-- ci-dashboard-badge:start -->
[![CI](https://transformers-ci.lor-e.huggingface.cool/badge/pr?pr=47155)](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=47155)
<!-- ci-dashboard-badge:end -->

# What does this PR do?

This PR clarifies, in both the raised error and the `max_steps`/`train_dataset` docstrings, that `max_steps` must be set when the training dataset has no `__len__` (e.g. a streaming dataset), because the total step count bounds the training loop and configures the LR scheduler.

Documentation-only change (no behavior change).

### Motivation

When train_dataset has no `__len__` (e.g. a streaming `IterableDataset`) and `max_steps` is left at its default -1, `Trainer.__init__` raises:
> The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learning rate scheduler.

The message attributes the requirement solely to the learning rate scheduler, but that is only a secondary consumer. For a length-less dataset, the total step count is the only source of the training loop's stopping condition and of its step accounting: `set_initial_training_values` sets `num_train_epochs = sys.maxsize` and `num_update_steps_per_epoch = max_steps`, and training stops purely when `global_step >= max_steps`. Even a horizon-free scheduler (e.g. `constant`) or a user-supplied scheduler cannot run without `max_steps`, so the scheduler-only framing is misleading.

### Solution

This PR:
- Rewords the `ValueError` to say the step count is needed to bound the training loop and to configure the learning rate scheduler.
- Documents the requirement in the `max_steps` docstring: the `TrainingArguments` class docstring, the CLI `--help` text, and the `set_training` / `set_lr_scheduler` convenience setters.
- Adds a note to the Trainer `train_dataset` docstring that a dataset without `__len__` requires `max_steps`.

No public API or behavior changes; only the error string and docstrings are updated.

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->

## Code Agent Policy

The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by
code agents. We are currently bottlenecked by our ability to review and respond to them. As a result, 
**we ask that new users do not submit pure code agent PRs** at this time. 
You may use code agents in drafting or to help you diagnose issues. We'd also ask autonomous "OpenClaw"-like agents
not to open any PRs or issues for the moment.

PRs that appear to be fully agent-written will probably be closed without review, and we may block users who do this
repeatedly or maliciously. 

This is a rapidly-evolving situation that's causing significant shockwaves in the open-source community. As a result, 
this policy is likely to be updated regularly in the near future. For more information, please read [`CONTRIBUTING.md`](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md).

- [x] I confirm that this is not a pure code agent PR.

## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).

## 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.

CC: @SunMarc

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- text models: @ArthurZucker @Cyrilvallez @vasqu
- vision models: @yonigozlan @molbap
- audio models: @eustlb @ebezzam @vasqu
- multimodal models: @zucchini-nlp
- graph models: @clefourrier

Library:

- generate: @zucchini-nlp (visual-language models) or @Cyrilvallez (all others)
- continuous batching: @remi-or @ArthurZucker @McPatate
- pipelines: @Rocketknight1
- tokenizers: @ArthurZucker and @itazap
- trainer: @SunMarc
- attention: @vasqu @ArthurZucker @CyrilVallez
- model loading (from pretrained, etc): @CyrilVallez
- distributed: @3outeille @ArthurZucker
- CIs: @ydshieh

Integrations:

- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization: @SunMarc
- kernels: @vasqu @drbh
- peft: @BenjaminBossan @githubnemo

Devices/Backends:

- AMD ROCm: @ivarflakstad
- Intel XPU: @IlyasMoutawwakil
- Ascend NPU: @ivarflakstad 

Documentation: @stevhliu

Research projects are not maintained and should be taken as is.

 -->

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

<!-- ci-dashboard-recap:start -->

---

### CI recap

**Dashboard:** [View test results in Grafana](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=47155)
**Latest run:** [28997659369:1](https://github.com/huggingface/transformers/actions/runs/28997659369)
**Result:** `success` | **Jobs:** 15 | **Tests:** 170,723 | **Failures:** 0 | **Duration:** 18h 55m

<!-- ci-dashboard-recap:end -->