openml / openml-python

Python module to interface with OpenML
https://openml.github.io/openml-python/main/
Other
276 stars 142 forks source link

Upload additional files in run object #1332

Open Taniya-Das opened 4 months ago

Taniya-Das commented 4 months ago

Description

Implement upload of additional files (such as model in binary format etc.) in the run object.

Steps

To upload additional files, each file should be added as a tuple ("file_name", "file_content") to file_elements in https://github.com/openml/openml-python/blob/develop/openml/base.py#L132.

This has been implemented as a patch in this commit - https://github.com/openml/openml-tensorflow/commit/259f356ff9ef2ae96c47510e2ee06101afc021d2

Example XML with additional file

Example: https://www.openml.org/api/v1/xml/run/10594197

PGijsbers commented 4 months ago

Specifically there is already a method for extensions that is supposed to be able to let the extension add additional files to the run, but it is not used from the generic extension code (supposedly). But it would also be good if the run object had some add_file function or something of that nature to allow anyone to add the extra files, and update OpenMLRun._get_file_elements accordingly.