openml / openml/server-api

Fix database schema patch: api_constraints should support multiple inputs per task type

Open
#214 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Review current database schema for task_type_inout table
  2. Ensure api_constraints can store multiple entries or is properly normalized
  3. Update test database with correct schema
  4. Remove conditional workaround code once schema is fixed
  5. Add database migration script

Related

  • Issue #165 (Database Migration Meta Issue)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.