Repository navigation
Commit 01079a5
### Description
This PR fixes #1210 by improving the warning message when
`avoid_duplicate_runs=True` is used without an API key.
**Changes:**
- Replaced the generic `RuntimeWarning` with a `UserWarning`.
- Updated the warning message to explicitly inform the user that
duplicate runs cannot be checked server-side without authentication.
- Changed the condition check to explicitly look for
`openml.config.apikey is None`.
### Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
### How Has This Been Tested?
I verified this locally by mocking `openml.runs.run_model_on_task` with
`apikey=None` and asserting that the new `UserWarning` is triggered
correctly.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pieter Gijsbers <p.gijsbers@tue.nl>
1 parent 496ac32 commit 01079a5
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
| |||
0 commit comments