Skip to content

[ENH] V1 -> V2 Migration : Runs#1616

Open
Omswastik-11 wants to merge 300 commits intoopenml:mainfrom
Omswastik-11:runs-migration-stacked
Open

[ENH] V1 -> V2 Migration : Runs#1616
Omswastik-11 wants to merge 300 commits intoopenml:mainfrom
Omswastik-11:runs-migration-stacked

Conversation

@Omswastik-11
Copy link
Copy Markdown
Contributor

@Omswastik-11 Omswastik-11 commented Jan 15, 2026

Metadata

  • Reference Issue:
  • New Tests Added:
  • Documentation Updated:
  • Change Log Entry:

Details

fixes #1624

@geetu040 geetu040 mentioned this pull request Jan 15, 2026
18 tasks
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 54.19847% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.08%. Comparing base (e653ef6) to head (f6e6516).

Files with missing lines Patch % Lines
openml/_api/clients/http.py 16.66% 20 Missing ⚠️
openml/_api/resources/base/versions.py 6.25% 15 Missing ⚠️
openml/runs/run.py 31.57% 13 Missing ⚠️
openml/_api/resources/run.py 84.28% 11 Missing ⚠️
openml/runs/functions.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1616      +/-   ##
==========================================
- Coverage   54.67%   54.08%   -0.60%     
==========================================
  Files          63       63              
  Lines        5108     5155      +47     
==========================================
- Hits         2793     2788       -5     
- Misses       2315     2367      +52     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@geetu040 geetu040 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sync with base pr
sdk code look good so far, please take a look at #1575 (comment) and make changes accordingly where needed.
all tests (existing and new) should pass to make sure we are retaining the original functionality of the sdk

Signed-off-by: Omswastik-11 <omswastikpanda11@gmail.com>
Signed-off-by: Omswastik-11 <omswastikpanda11@gmail.com>
@Omswastik-11 Omswastik-11 requested a review from geetu040 January 30, 2026 09:50
@Omswastik-11 Omswastik-11 marked this pull request as ready for review January 30, 2026 09:50
Copilot AI review requested due to automatic review settings April 1, 2026 18:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

openml/runs/functions.py:1088

  • list_runs now delegates to openml._backend.run.list, but the legacy helper _list_runs/__list_runs implementation remains below and appears unused (no internal references). Keeping both implementations increases maintenance burden and risks divergence; consider removing the dead code or clearly marking it as deprecated for eventual removal.
    listing_call = partial(
        openml._backend.run.list,
        ids=id,
        task=task,
        setup=setup,
        flow=flow,
        uploader=uploader,
        tag=tag,
        study=study,
        display_errors=display_errors,
        task_type=task_type,
    )
    batches = openml.utils._list_all(listing_call, offset=offset, limit=size)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1808 to 1810
@mock.patch.object(requests.Session, "request")
def test_delete_run_not_owned(mock_delete, test_files_directory, test_server_v1, test_apikey_v1):
content_file = test_files_directory / "mock_responses" / "runs" / "run_delete_not_owned.xml"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patched method is requests.Session.request, but the mock parameter is still named mock_delete. Renaming it to something like mock_request would make the test intent clearer and avoid confusion when reading failures.

Copilot uses AI. Check for mistakes.
Comment on lines +179 to +183
)

assert isinstance(runs_dict["oml:runs"]["oml:run"], list), type(runs_dict["oml:runs"])

runs = {
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using assert for validating server-provided XML structure here. Asserts can be skipped with Python optimizations (-O), which would turn this into a hard-to-debug KeyError/TypeError later. Please replace with an explicit runtime check and raise a TypeError/ValueError (similar to openml/runs/functions.py::__list_runs).

Copilot uses AI. Check for mistakes.
@Omswastik-11 Omswastik-11 requested a review from geetu040 April 1, 2026 18:35
Copilot AI review requested due to automatic review settings April 3, 2026 10:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI review requested due to automatic review settings April 3, 2026 11:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI review requested due to automatic review settings April 3, 2026 11:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove this function now, since it's not used anywhere

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file still contains some old-style api calls through openml._api_calls which should be replaced with new-style api calls through openml._backend.run

@Omswastik-11 Omswastik-11 requested a review from geetu040 April 3, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] V1 → V2 API Migration - runs

8 participants