FIX PEFT test changed error type
Author: BenjaminBossan
Pull request: yes

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

# What does this PR do?

This fixes the following error: https://github.com/huggingface/transformers/actions/runs/28366810651/job/84035227750?pr=46891#step:17:446

In `test_peft_from_pretrained_hub_kwargs`, which loads a PEFT adapter from a revision, we were checking for an `OSError` when the revision is omitted. However, Transformers now raises a `ValueError`. The test is thus changed to check for `ValueError`.

I haven't checked when exactly this behavior changed. As the PEFT tests are marked as slow, they don't run on normal CI and this change hasn't been caught.

## 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
- [ ] 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://huggingface.co/docs/transformers/contributing) and the
      [Pull Request](https://huggingface.co/docs/transformers/pr_checks) checks?
- [ ] 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 according to the [guidelines](https://github.com/huggingface/transformers/tree/main/docs)?
- [ ] Did you write any new necessary [tests](https://huggingface.co/docs/transformers/testing)?

<!-- 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=46959)
**Latest run:** [28374682065:1](https://github.com/huggingface/transformers/actions/runs/28377223837)
**Result:** `success` | **Jobs:** 3 | **Tests:** 67 | **Failures:** 0 | **Duration:** 2m 3s

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

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