Fix database schema patch: api_constraints should support multiple inputs per task type
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 16
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
Description
There's a TODO comment indicating that api_constraints in the test database currently only supports one input per task type, requiring a database patch.
Location
src/routers/openml/tasktype.py:70
# api_constraints is for one input only in the test database (TODO: patch db)
if isinstance(task_type_input.api_constraints, str):
constraint = json.loads(task_type_input.api_constraints)
input_["data_type"] = constraint["data_type"]
Impact
- Limited functionality for task types with multiple inputs
- Database schema doesn't match expected behavior
- Workaround code required in application layer
Expected Behavior
The database schema should properly support multiple inputs per task type with individual api_constraints for each.
Suggested Implementation
- Review current database schema for
task_type_inouttable - Ensure
api_constraintscan store multiple entries or is properly normalized - Update test database with correct schema
- Remove conditional workaround code once schema is fixed
- Add database migration script
Related
- Issue #165 (Database Migration Meta Issue)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/routers/openml/tasktype.py:70 and inspect the task_type_inout table schema and related database migrations, including the context from issue #165. Verify how multiple inputs and individual api_constraints are represented, then update the test database and add a migration so the workaround can be removed and multi-input task types work correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100