Skip to content

Add uses_model and uses_dataset to Experiment model (#493)#722

Open
jolyboi wants to merge 2 commits intoaiondemand:developfrom
jolyboi:feature/493-experiment-uses-model-dataset
Open

Add uses_model and uses_dataset to Experiment model (#493)#722
jolyboi wants to merge 2 commits intoaiondemand:developfrom
jolyboi:feature/493-experiment-uses-model-dataset

Conversation

@jolyboi
Copy link

@jolyboi jolyboi commented Mar 10, 2026

Change

Change Type: Added

Change Category: Interface

Changelog Entry: Added uses_model and uses_dataset many-to-many relationships to the Experiment model.

These fields allow linking experiments to the ML models and datasets used during their execution, as specified in the AIoD metadata schema. The circular import between experiment.py and ml_model.py is handled using a TYPE_CHECKING guard and deferred deserializer setup in ml_model.py.

Note: exemplary_execution_settings (from #493) already exists in the codebase as execution_settings — confirmed by the rename mapping in scripts/model_comparison/compare.py line 39.

How to Test

  1. POST /experiments with uses_model and uses_dataset fields containing valid identifiers of existing ML models and datasets
  2. GET /experiments/{identifier} and verify the relationships are returned correctly
  3. Run the existing test suite: python -m pytest src/tests/

Checklist

  • Tests have been added or updated to reflect the changes, or their absence is explicitly explained.
  • Documentation has been added or updated to reflect the changes, or their absence is explicitly explained: No documentation changes needed as the new fields are reflected in the auto-generated API schema via their descriptions and examples in RelationshipConfig.
  • A self-review has been conducted checking:
    • No unintended changes have been committed.
    • The changes in isolation seem reasonable.
    • Anything that may be odd or unintuitive is provided with a GitHub comment explaining it (but consider if this should not be a code comment or in the documentation instead).
  • All CI checks pass before pinging a reviewer, or provide an explanation if they do not.
  • The PR title matches the changelog entry's one-line description.

Related Issues

Closes #493

@jolyboi jolyboi marked this pull request as ready for review March 11, 2026 15:27
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.

Update Experiment model

1 participant