Skip to content

Conversation

@Prachi194agrawal
Copy link

✨ Feature: Implement openml.flows.edit_flow for Flow Metadata Editing (Closes #896)

This Pull Request addresses Issue #896 by introducing the function openml.flows.edit_flow, which allows authenticated users to modify non-critical metadata fields of their uploaded OpenML Flows.

This functionality is crucial for fixing typos, adding missing context, or updating automatically generated names, as discussed in the original issue thread.

⚙️ Key Changes:

  1. New Function: Added openml.flows.edit_flow(flow_id, **kwargs) to openml/flows/functions.py.
  2. Editable Fields: The function supports editing the following fields, which are sent to the newly implemented REST API endpoint (flow/edit):
    • custom_name
    • tags (passed as a list, converted to a comma-separated string for the API)
    • language
    • description
  3. Validation: Implements client-side checks to ensure:
    • flow_id is an integer.
    • At least one editable field is provided.
  4. Testing: Comprehensive tests are added in tests/test_flows/test_flow_functions.py to cover single-field edits, multiple-field edits, tag handling, and error conditions (like no fields provided or server errors).
  5. Documentation: The function is added to openml/flows/__init__.py and includes detailed docstrings with examples.

Note to Reviewers: This implementation relies on the existence of the corresponding flow/edit endpoint in the OpenML REST API (which was implemented separately as a prerequisite for this PR).

@Prachi194agrawal
Copy link
Author

@PGijsbers
Hello,
This Pull Request implements the openml.flows.edit_flow functionality discussed in Issue #896. The proposed implementation enables authenticated users to update selected non-critical metadata fields of an existing flow, including custom_name, tags, language, and description. It also includes validation logic, tests, and documentation updates to ensure consistent behavior.

When you have the opportunity, I kindly request your review and feedback on this PR.
Thank you for your time and consideration.

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.

Edit (some) fields of flow after upload?

1 participant