openml / openml/OpenML

Data Edit API does not allow multiple ignored attributes

Open
#1,117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
755
Forks
128
PR merge metrics
No merged PRs in 30d

Description

When editing ignore_attribute field with the data edit API with multiple attributes to ignore, only the last one is used:

import openml

new_id = openml.datasets.fork_dataset(41702)  # new ID was: 43070
openml.datasets.edit_dataset(new_id, ignore_attribute=["instance_id", "repetition", "runstatus"])

I verified that the Python API sends the following xml (indentation for readability):

<?xml version="1.0" encoding="utf-8"?>
<oml:data_edit_parameters xmlns:oml="http://openml.org/openml">
  <oml:ignore_attribute>instance_id</oml:ignore_attribute>
  <oml:ignore_attribute>repetition</oml:ignore_attribute>
  <oml:ignore_attribute>runstatus</oml:ignore_attribute>
</oml:data_edit_parameters>

however when obtaining the dataset XML after the edit:

<oml:data_set_description>
  <oml:id>43070</oml:id>
  <oml:name>MIP-2016-regression</oml:name>
  <oml:version>2</oml:version>
  <oml:description/>
  <oml:description_version/>
  <oml:format>ARFF</oml:format>
  <oml:upload_date>2019-05-28T13:09:37</oml:upload_date>
  <oml:licence>Public</oml:licence>
  <oml:url>
    https://www.openml.org/data/v1/download/21377444/MIP-2016-regression.arff
  </oml:url>
  <oml:file_id>21377444</oml:file_id>
  <oml:default_target_attribute>PAR10</oml:default_target_attribute>
  <oml:ignore_attribute>runstatus</oml:ignore_attribute>
  <oml:citation>[1] NA</oml:citation>
  <oml:visibility>public</oml:visibility>
  <oml:minio_url>
    http://openml1.win.tue.nl/dataset43070/dataset_43070.pq
  </oml:minio_url>
  <oml:status>active</oml:status>
  <oml:processing_date>2021-07-28 16:48:03</oml:processing_date>
  <oml:md5_checksum>91a74d1d325765e61530ebf8c2ba3263</oml:md5_checksum>
</oml:data_set_description>

changing the edit call again (e.g. to ["instance_id", "repetition"]) does change the dataset XML, so it's not a matter of waiting for updates. It consistently only saves the last field in the list.

Contributor guide

Open the contributing guide

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 with the openml.datasets.edit_dataset entry point and trace the data edit API request handling for repeated ignore_attribute elements. Reproduce the example with three attributes and compare the saved dataset XML with the request. Done means every requested ignored attribute is retained, rather than only the last one.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, python
Domain
api, backend, data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.