From 245ab4c9d8c5415bfc37b4a57ea96786372e845f Mon Sep 17 00:00:00 2001 From: joaquinvanschoren Date: Mon, 6 Nov 2023 01:03:05 +0100 Subject: [PATCH] added API docs + cleaned up code --- app/package.json | 2 + app/public/locales/en/common.yml | 6 +- app/public/openml-api.json | 5649 +++++++++++++++++ app/src/components/navbar/Navbar.js | 7 +- app/src/components/pages/apis/SwaggerUI.js | 189 + .../components/pages/apis/javaCodeExamples.js | 34 + .../pages/apis/juliaCodeExamples.js | 17 + .../pages/apis/pythonCodeExamples.js | 46 + .../components/pages/apis/rCodeExamples.js | 44 + app/src/pages/about.js | 14 +- app/src/pages/apis.js | 339 +- app/src/pages/contribute.js | 2 +- 12 files changed, 6327 insertions(+), 22 deletions(-) create mode 100644 app/public/openml-api.json create mode 100644 app/src/components/pages/apis/SwaggerUI.js create mode 100644 app/src/components/pages/apis/javaCodeExamples.js create mode 100644 app/src/components/pages/apis/juliaCodeExamples.js create mode 100644 app/src/components/pages/apis/pythonCodeExamples.js create mode 100644 app/src/components/pages/apis/rCodeExamples.js diff --git a/app/package.json b/app/package.json index c2df2bb3..071c2155 100644 --- a/app/package.json +++ b/app/package.json @@ -67,6 +67,8 @@ "react-syntax-highlighter": "15.5.0", "react-timeago": "^7.2.0", "redux": "4.2.1", + "swagger-ui-react": "^5.9.1", + "swagger-ui-themes": "^3.0.1", "web-vitals": "3.5.0", "yup": "1.3.2" }, diff --git a/app/public/locales/en/common.yml b/app/public/locales/en/common.yml index f784896e..fd0705c6 100644 --- a/app/public/locales/en/common.yml +++ b/app/public/locales/en/common.yml @@ -191,7 +191,7 @@ contribute: - "OpenCollective" - "GitHub Sponsors" about: - helmet: "About" + helmet: "About us" title: "About OpenML" core: "Authors" core_text: > @@ -484,4 +484,6 @@ terms: do our best efforts to promptly remove such information from our records. ### Consent - By using our website, you hereby consent to our Privacy Policy and agree to its terms. \ No newline at end of file + By using our website, you hereby consent to our Privacy Policy and agree to its terms. +apis: + helmet: "APIs" \ No newline at end of file diff --git a/app/public/openml-api.json b/app/public/openml-api.json new file mode 100644 index 00000000..51492764 --- /dev/null +++ b/app/public/openml-api.json @@ -0,0 +1,5649 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "OpenML API", + "description": "REST API for sharing, organizing and reusing machine learning datasets, code, and experiments. ", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://www.openml.org/api/v1/json", + "description": "" + }, + { + "url": "https://test.openml.org/api/v1/json", + "description": "" + } + ], + "paths": { + "/data/{id}": { + "get": { + "tags": [ + "data" + ], + "summary": "Get dataset description. Contains all the meta-data about the dataset, as well as links to download the formatted data.", + "description": "Returns information about a dataset. The information includes the name, information about the creator, URL to download it and more.", + "operationId": "Api_data::data", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the dataset.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A dataset description", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Data" + }, + "example": { + "data_set_description": { + "id": "1", + "name": "anneal", + "version": "2", + "description": "...", + "format": "ARFF", + "upload_date": "2014-04-06 23:19:20", + "licence": "Public", + "url": "https://www.openml.org/data/download/1/dataset_1_anneal.arff", + "file_id": "1", + "default_target_attribute": "class", + "version_label": "2", + "tag": [ + "study_1", + "uci" + ], + "visibility": "public", + "original_data_url": "https://www.openml.org/d/2", + "status": "active", + "md5_checksum": "d01f6ccd68c88b749b20bbe897de3713" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned\\n110 - Please provide data_id.\\n111 - Unknown dataset. Data set description with data_id was not found in the database.\\n112 - No access granted. This dataset is not shared with you.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "tags": [ + "data" + ], + "summary": "Delete dataset", + "description": "Deletes a dataset. Upon success, it returns the ID of the deleted dataset.", + "operationId": "Api_data::data_delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the dataset.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ID of the deleted dataset", + "content": { + "application/json": { + "schema": { + "properties": { + "data_delete": { + "$ref": "#/components/schemas/inline_response_200_data_delete" + } + }, + "type": "object" + }, + "example": { + "data_delete": { + "id": "4328" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned\\n- 350 - Please provide API key. In order to remove your content, please authenticate.\\n- 351 - Authentication failed. The API key was not valid. Please try to login again, or contact api administrators.\\n- 352 - Dataset does not exists. The data ID could not be linked to an existing dataset.\\n- 353 - Dataset is not owned by you. The dataset is owned by another user. Hence you cannot delete it.\\n- 354 - Dataset is in use by other content. Can not be deleted. The data is used in tasks or runs. Delete other content before deleting this dataset.\\n- 355 - Deleting dataset failed. Deleting the dataset failed. Please contact support team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/list/{filters}": { + "get": { + "tags": [ + "data" + ], + "summary": "List and filter datasets", + "description": "List datasets, possibly filtered by a range of properties. Any number of properties can be combined by listing them one after the other in the form '/data/list/{filter}/{value}/{filter}/{value}/...' Returns an array with all datasets that match the constraints.", + "operationId": "Api_data::data_list", + "parameters": [ + { + "name": "filters", + "in": "path", + "description": "Any combination of these filters\r\n /limit/{limit}/offset/{offset} - returns only {limit} results starting from result number {offset}. Useful for paginating results. With /limit/5/offset/10, results 11..15 will be returned. Both limit and offset need to be specified.\r\n /status/{status} - returns only datasets with a given status, either 'active', 'deactivated', or 'in_preparation'.\r\n /tag/{tag} - returns only datasets tagged with the given tag.\r\n /{data_quality}/{range} - returns only tasks for which the underlying datasets have certain qualities. {data_quality} can be data_id, data_name, data_version, number_instances, number_features, number_classes, number_missing_values. {range} can be a specific value or a range in the form 'low..high'. Multiple qualities can be combined, as in 'number_instances/0..50/number_features/0..10'.\r\n ", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of datasets with the given task", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataList" + }, + "example": { + "data": { + "dataset": [ + { + "did": "1", + "name": "anneal", + "status": "active", + "format": "ARFF", + "quality": [ + { + "name": "MajorityClassSize", + "value": "684" + }, + { + "name": "MaxNominalAttDistinctValues", + "value": "10.0" + }, + { + "name": "MinorityClassSize", + "value": "0" + }, + { + "name": "NumBinaryAtts", + "value": "14.0" + }, + { + "name": "NumberOfClasses", + "value": "6" + }, + { + "name": "NumberOfFeatures", + "value": "39" + }, + { + "name": "NumberOfInstances", + "value": "898" + }, + { + "name": "NumberOfInstancesWithMissingValues", + "value": "0" + }, + { + "name": "NumberOfMissingValues", + "value": "0" + }, + { + "name": "NumberOfNumericFeatures", + "value": "6" + }, + { + "name": "NumberOfSymbolicFeatures", + "value": "32" + } + ] + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n370 - Illegal filter specified.\\n371 - Filter values/ranges not properly specified.\\n372 - No results. There where no matches for the given constraints.\\n373 - Can not specify an offset without a limit.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/features/{id}": { + "get": { + "tags": [ + "data" + ], + "summary": "Get data features", + "description": "Returns the features of a dataset.", + "operationId": "Api_data::data_features", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the dataset.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "All the features of the dataset", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataFeatures" + }, + "example": { + "data_features": { + "feature": [ + { + "index": "0", + "name": "sepallength", + "data_type": "numeric", + "is_target": "false", + "is_ignore": "false", + "is_row_identifier": "false" + }, + { + "index": "1", + "name": "sepalwidth", + "data_type": "numeric", + "is_target": "false", + "is_ignore": "false", + "is_row_identifier": "false" + }, + { + "index": "2", + "name": "petallength", + "data_type": "numeric", + "is_target": "false", + "is_ignore": "false", + "is_row_identifier": "false" + }, + { + "index": "3", + "name": "petalwidth", + "data_type": "numeric", + "is_target": "false", + "is_ignore": "false", + "is_row_identifier": "false" + }, + { + "index": "4", + "name": "class", + "data_type": "nominal", + "is_target": "true", + "is_ignore": "false", + "is_row_identifier": "false" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n270 - Please provide dataset ID.\\n271 - Unknown dataset. Data set with the given data ID was not found (or is not shared with you).\\n272 - No features found. The dataset did not contain any features, or we could not extract them.\\n273 - Dataset not processed yet. The dataset was not processed yet, features are not yet available. Please wait for a few minutes.\\n274 - Dataset processed with error. The feature extractor has run into an error while processing the dataset. Please check whether it is a valid supported file. If so, please contact the API admins.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/qualities/{id}": { + "get": { + "tags": [ + "data" + ], + "summary": "Get data qualities", + "description": "Returns the qualities of a dataset.", + "operationId": "Api_data::data_qualities", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the dataset.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "All the qualities of the dataset", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataQualities" + }, + "example": { + "data_qualities": { + "quality": [ + { + "name": "ClassCount", + "value": "3.0" + }, + { + "name": "ClassEntropy", + "value": "1.584962500721156" + }, + { + "name": "NumberOfClasses", + "value": "3" + }, + { + "name": "NumberOfFeatures", + "value": "5" + }, + { + "name": "NumberOfInstances", + "value": "150" + }, + { + "name": "NumberOfInstancesWithMissingValues", + "value": "0" + }, + { + "name": "NumberOfMissingValues", + "value": "0" + }, + { + "name": "NumberOfNumericFeatures", + "value": "4" + }, + { + "name": "NumberOfSymbolicFeatures", + "value": "0" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n360 - Please provide data set ID\\n361 - Unknown dataset. The data set with the given ID was not found in the database, or is not shared with you.\\n362 - No qualities found. The registered dataset did not contain any calculated qualities.\\n363 - Dataset not processed yet. The dataset was not processed yet, no qualities are available. Please wait for a few minutes.\\n364 - Dataset processed with error. The quality calculator has run into an error while processing the dataset. Please check whether it is a valid supported file. If so, contact the support team.\\n365 - Interval start or end illegal. There was a problem with the interval\\nstart or end.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/qualities/list": { + "get": { + "tags": [ + "data" + ], + "summary": "List all data qualities", + "description": "Returns a list of all data qualities in the system.", + "operationId": "Api_data::data_qualities_list", + "responses": { + "200": { + "description": "A list of data qualities", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataQualityList" + }, + "example": { + "data_qualities_list": { + "quality": [ + "NumberOfClasses", + "NumberOfFeatures", + "NumberOfInstances", + "NumberOfInstancesWithMissingValues", + "NumberOfMissingValues", + "NumberOfNumericFeatures", + "NumberOfSymbolicFeatures" + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned\\n370 - No data qualities available. There are no data qualities in the system.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/unprocessed/{data_engine_id}/{order}": { + "get": { + "tags": [ + "data" + ], + "summary": "Get a list of unprocessed datasets", + "description": "This call is for people running their own dataset processing engines. It returns the details of datasets that are not yet processed by the given processing engine. It doesn't process the datasets, it just returns the dataset info.", + "operationId": "Api_data::data_unprocessed", + "parameters": [ + { + "name": "data_engine_id", + "in": "path", + "description": "The ID of the data processing engine. You get this ID when you register a new data processing engine with OpenML. The ID of the main data processing engine is 1.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "order", + "in": "path", + "description": "When there are multiple datasets still to process, this defines which ones to return. Options are 'normal' - the oldest datasets, or 'random'.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of unprocessed datasets", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataUnprocessed" + }, + "example": { + "data_unprocessed": { + "run": [ + { + "did": "1", + "status": "deactivated", + "version": "2", + "name": "anneal", + "format": "ARFF" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n681 - No unprocessed datasets.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data": { + "post": { + "tags": [ + "data" + ], + "summary": "Upload dataset", + "description": "Uploads a dataset. Upon success, it returns the data id.", + "operationId": "Api_data::data_upload", + "parameters": [ + { + "name": "description", + "in": "query", + "description": "An XML file describing the dataset. Only name, description, and data format are required. Also see the [XSD schema](https://www.openml.org/api/v1/xsd/openml.data.upload) and an [XML example](https://www.openml.org/api/v1/xml_example/data).", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "dataset", + "in": "query", + "description": "The actual dataset, being an ARFF file.", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Id of the uploaded dataset", + "content": { + "application/json": { + "schema": { + "properties": { + "upload_data_set": { + "$ref": "#/components/schemas/inline_response_200_1_upload_data_set" + } + }, + "type": "object" + }, + "example": { + "upload_data_set": { + "id": "4328" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n130 - Problem with file uploading. There was a problem with the file upload.\\n131 - Problem validating uploaded description file. The XML description format does not meet the standards.\\n132 - Failed to move the files. Internal server error, please contact API administrators.\\n133 - Failed to make checksum of datafile. Internal server error, please contact API administrators.\\n134 - Failed to insert record in database. Internal server error, please contact API administrators.\\n135 - Please provide description xml.\\n136 - File failed format verification. The uploaded file is not valid according to the selected file format. Please check the file format specification and try again.\\n137 - Please provide API key. In order to share content, please log in or provide your API key.\\n138 - Authentication failed. The API key was not valid. Please try to login again, or contact API administrators\\n139 - Combination name / version already exists. Leave version out for auto increment\\n140 - Both dataset file and dataset url provided. The system is confused since both a dataset file (post) and a dataset url (xml) are provided. Please remove one.\\n141 - Neither dataset file or dataset url are provided. Please provide either a dataset file as POST variable, or a dataset url in the description XML.\\n142 - Error in processing arff file. Can be a syntax error, or the specified target feature does not exists. For now, we only check on arff files. If a dataset is claimed to be in such a format, and it can not be parsed, this error is returned.\\n143 - Suggested target feature not legal. It is possible to suggest a default target feature (for predictive tasks). However, it should be provided in the data.\\n144 - Unable to update dataset. The dataset with id could not be found in the database. If you upload a new dataset, unset the id.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/status/update/": { + "post": { + "tags": [ + "data" + ], + "summary": "Change the status of a dataset", + "description": "Change the status of a dataset, either 'active' or 'deactivated'", + "operationId": "Api_data::status_update", + "parameters": [ + { + "name": "data_id", + "in": "query", + "description": "Id of the dataset.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "status", + "in": "query", + "description": "The status on which to filter the results, either 'active' or 'deactivated'.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "412": { + "description": "Precondition failed. An error code and message are returned.\\n691 - Illegal status\\n692 - Dataset does not exists\\n693 - Dataset is not owned by you\\n694 - Illegal status transition\\n695 - Status update failed\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/features": { + "post": { + "tags": [ + "data" + ], + "summary": "Upload dataset feature description", + "description": "Uploads dataset feature description. Upon success, it returns the data id.", + "operationId": "Api_data::data_features_upload", + "parameters": [ + { + "name": "description", + "in": "query", + "description": "An XML file describing the dataset. Only name, description, and data format are required. Also see the [XSD schema](https://www.openml.org/api/v1/xsd/openml.data.features) and an [XML example](https://www.openml.org/api/v1/xml_example/data.features).", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "412": { + "description": "Precondition failed. An error code and message are returned.\\n431 - Dataset already processed\\n432 - Please provide description xml\\n433 - Problem validating uploaded description file\\n434 - Could not find dataset\\n436 - Something wrong with XML, check data id and evaluation engine id\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/qualities": { + "post": { + "tags": [ + "data" + ], + "summary": "Upload dataset qualities", + "description": "Uploads dataset qualities. Upon success, it returns the data id.", + "operationId": "Api_data::data_qualities_upload", + "parameters": [ + { + "name": "description", + "in": "query", + "description": "An XML file describing the dataset. Only name, description, and data format are required. Also see the [XSD schema](https://www.openml.org/api/v1/xsd/openml.data.qualities) and an [XML example](https://www.openml.org/api/v1/xml_example/data.qualities).", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "412": { + "description": "Precondition failed. An error code and message are returned.\\n381 - Something wrong with XML, please check did and evaluation_engine_id\\n382 - Please provide description xml\\n383 - Problem validating uploaded description file\\n384 - Dataset not processed yet\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/qualities/unprocessed/{data_engine_id}/{order}": { + "post": { + "tags": [ + "data" + ], + "summary": "Get a list of datasets with unprocessed qualities", + "description": "This call is for people running their own dataset processing engines. It returns the details of datasets for which certain qualities are not yet processed by the given processing engine. It doesn't process the datasets, it just returns the dataset info.", + "operationId": "Api_data::dataqualities_unprocessed", + "parameters": [ + { + "name": "data_engine_id", + "in": "path", + "description": "The ID of the data processing engine. You get this ID when you register a new data processing engine with OpenML. The ID of the main data processing engine is 1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "path", + "description": "When there are multiple datasets still to process, this defines which ones to return. Options are 'normal' - the oldest datasets, or 'random'.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "API key to authenticate the user", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "qualities", + "in": "query", + "description": "Comma-separated list of (at least two) quality names, e.g. 'NumberOfInstances,NumberOfFeatures'.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of unprocessed datasets", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataUnprocessed" + }, + "example": { + "data_unprocessed": { + "run": [ + { + "did": "1", + "status": "deactivated", + "version": "2", + "name": "anneal", + "format": "ARFF" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n686 - Please specify the features the evaluation engine wants to calculate (at least 2).\\n687 - No unprocessed datasets according to the given set of meta-features.\\n688 - Illegal qualities.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/tag": { + "post": { + "tags": [ + "data" + ], + "summary": "Tag a dataset", + "description": "Tags a dataset.", + "operationId": "Api_data::data_tag", + "parameters": [ + { + "name": "data_id", + "in": "query", + "description": "Id of the dataset.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "Tag name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The id of the tagged dataset", + "content": { + "application/json": { + "schema": { + "properties": { + "data_tag": { + "$ref": "#/components/schemas/inline_response_200_2_data_tag" + } + }, + "type": "object" + }, + "example": { + "data_tag": { + "id": "2" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n470 - In order to add a tag, please upload the entity id (either data_id, flow_id, run_id) and tag (the name of the tag).\\n471 - Entity not found. The provided entity_id {data_id, flow_id, run_id} does not correspond to an existing entity.\\n472 - Entity already tagged by this tag. The entity {dataset, flow, run} already had this tag.\\n473 - Something went wrong inserting the tag. Please contact OpenML Team.\\n474 - Internal error tagging the entity. Please contact OpenML Team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/data/untag": { + "post": { + "tags": [ + "data" + ], + "summary": "Untag a dataset", + "description": "Untags a dataset.", + "operationId": "Api_data::data_untag", + "parameters": [ + { + "name": "data_id", + "in": "query", + "description": "Id of the dataset.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "Tag name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The ID of the untagged dataset", + "content": { + "application/json": { + "schema": { + "properties": { + "data_untag": { + "$ref": "#/components/schemas/inline_response_200_3_data_untag" + } + }, + "type": "object" + }, + "example": { + "data_untag": { + "id": "2" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n475 - Please give entity_id {data_id, flow_id, run_id} and tag. In order to remove a tag, please upload the entity id (either data_id, flow_id, run_id) and tag (the name of the tag).\\n476 - Entity {dataset, flow, run} not found. The provided entity_id {data_id, flow_id, run_id} does not correspond to an existing entity.\\n477 - Tag not found. The provided tag is not associated with the entity {dataset, flow, run}.\\n478 - Tag is not owned by you. The entity {dataset, flow, run} was tagged by another user. Hence you cannot delete it.\\n479 - Internal error removing the tag. Please contact OpenML Team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/task/{id}": { + "get": { + "tags": [ + "task" + ], + "summary": "Get task description. Tasks describe machine learning tasks (e.g. classification), defining inputs (e.g. target features), outputs (e.g. predictions), and evaluation criteria (e.g. cross-validation splits).", + "description": "Returns information about a task. The information includes the task type, input data, train/test sets, and more.", + "operationId": "Api_task::task", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the task.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A task description", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + }, + "example": { + "task": { + "task_id": "1", + "task_type": "Supervised Classification", + "input": [ + { + "name": "source_data", + "data_set": { + "data_set_id": "1", + "target_feature": "class" + } + }, + { + "name": "estimation_procedure", + "estimation_procedure": { + "type": "crossvalidation", + "data_splits_url": "https://www.openml.org/api_splits/get/1/Task_1_splits.arff", + "parameter": [ + { + "name": "number_repeats", + "value": "1" + }, + { + "name": "number_folds", + "value": "10" + }, + { + "name": "percentage" + }, + { + "name": "stratified_sampling", + "value": "true" + } + ] + } + }, + { + "name": "cost_matrix", + "cost_matrix": [] + }, + { + "name": "evaluation_measures", + "evaluation_measures": { + "evaluation_measure": "predictive_accuracy" + } + } + ], + "output": { + "name": "predictions", + "predictions": { + "format": "ARFF", + "feature": [ + { + "name": "repeat", + "type": "integer" + }, + { + "name": "fold", + "type": "integer" + }, + { + "name": "row_id", + "type": "integer" + }, + { + "name": "confidence.classname", + "type": "numeric" + }, + { + "name": "prediction", + "type": "string" + } + ] + } + }, + "tag": [ + "basic", + "study_1", + "under100k", + "under1m" + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n150 - Please provide task_id.\\n151 - Unknown task. The task with the given id was not found in the database\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "tags": [ + "task" + ], + "summary": "Delete task", + "description": "Deletes a task. Upon success, it returns the ID of the deleted task.", + "operationId": "Api_task::task_delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the task.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ID of the deleted task", + "content": { + "application/json": { + "schema": { + "properties": { + "task_delete": { + "$ref": "#/components/schemas/inline_response_200_4_task_delete" + } + }, + "type": "object" + }, + "example": { + "task_delete": { + "id": "4328" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n450 - Please provide API key. In order to remove your content, please authenticate.\\n451 - Authentication failed. The API key was not valid. Please try to login again, or contact api administrators.\\n452 - Task does not exists. The task ID could not be linked to an existing task.\\n454 - Task is executed in some runs. Delete these first.\\n455 - Deleting the task failed. Please contact support team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/task/list/{filters}": { + "get": { + "tags": [ + "task" + ], + "summary": "List and filter tasks", + "description": "List tasks, possibly filtered by a range of properties from the task itself or from the underlying dataset. Any number of properties can be combined by listing them one after the other in the form '/task/list/{filter}/{value}/{filter}/{value}/...' Returns an array with all tasks that match the constraints.", + "operationId": "Api_task::task_list", + "parameters": [ + { + "name": "filters", + "in": "path", + "description": "Any combination of these filters\r\n /limit/{limit}/offset/{offset} - returns only {limit} results starting from result number {offset}. Useful for paginating results. With /limit/5/offset/10, tasks 11..15 will be returned. Both limit and offset need to be specified.\r\n /status/{status} - returns only tasks with a given status, either 'active', 'deactivated', or 'in_preparation'.\r\n /type/{type_id} - returns only tasks with a given task type id. See the list of task types of the ID's (e.g. 1 = Supervised Classification).\r\n /tag/{tag} - returns only tasks tagged with the given tag.\r\n /data_tag/{tag} - returns only tasks for which the underlying dataset is tagged with the given tag.\r\n /{data_quality}/{range} - returns only tasks for which the underlying datasets have certain qualities. {data_quality} can be data_id, data_name, number_instances, number_features, number_classes, number_missing_values. {range} can be a specific value or a range in the form 'low..high'. Multiple qualities can be combined, as in 'number_instances/0..50/number_features/0..10'.\r\n ", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of tasks with the given tag", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskList" + }, + "example": { + "task": { + "task": [ + { + "task_id": "1", + "task_type": "Supervised Classification", + "did": "1", + "name": "anneal", + "status": "active", + "format": "ARFF", + "input": [ + { + "name": "estimation_procedure", + "value": "1" + }, + { + "name": "evaluation_measures", + "value": "predictive_accuracy" + }, + { + "name": "source_data", + "value": "1" + }, + { + "name": "target_feature", + "value": "class" + } + ], + "quality": [ + { + "name": "MajorityClassSize", + "value": "684" + }, + { + "name": "MaxNominalAttDistinctValues", + "value": "10.0" + }, + { + "name": "MinorityClassSize", + "value": "0" + }, + { + "name": "NumBinaryAtts", + "value": "14.0" + }, + { + "name": "NumberOfClasses", + "value": "6" + }, + { + "name": "NumberOfFeatures", + "value": "39" + }, + { + "name": "NumberOfInstances", + "value": "898" + }, + { + "name": "NumberOfInstancesWithMissingValues", + "value": "0" + }, + { + "name": "NumberOfMissingValues", + "value": "0" + }, + { + "name": "NumberOfNumericFeatures", + "value": "6" + }, + { + "name": "NumberOfSymbolicFeatures", + "value": "32" + } + ], + "tag": [ + "basic", + "study_1", + "study_7", + "under100k", + "under1m" + ] + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n480 - Illegal filter specified.\\n481 - Filter values/ranges not properly specified.\\n482 - No results. There where no matches for the given constraints.\\n483 - Can not specify an offset without a limit.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/task": { + "post": { + "tags": [ + "task" + ], + "summary": "Upload task", + "description": "Uploads a task. Upon success, it returns the task id.", + "operationId": "Api_task::task_upload", + "parameters": [ + { + "name": "description", + "in": "query", + "description": "An XML file describing the task. Only name, description, and task format are required. Also see the [XSD schema](https://www.openml.org/api/v1/xsd/openml.task.upload) and an [XML example](https://www.openml.org/api/v1/xml_example/task).", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Id of the uploaded task", + "content": { + "application/json": { + "schema": { + "properties": { + "upload_task": { + "$ref": "#/components/schemas/inline_response_200_5_upload_task" + } + }, + "type": "object" + }, + "example": { + "upload_task": { + "id": "4328" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n530 - Description file not present. Please upload the task description.\\n531 - Internal error. Please contact api support team\\n532 - Problem validating uploaded description file. The XML description format does not meet the standards\\n533 - Task already exists.\\n534 - Error creating the task.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/task/tag": { + "post": { + "tags": [ + "task" + ], + "summary": "Tag a task", + "description": "Tags a task.", + "operationId": "Api_task::task_tag", + "parameters": [ + { + "name": "task_id", + "in": "query", + "description": "Id of the task.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "Tag name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The id of the tagged task", + "content": { + "application/json": { + "schema": { + "properties": { + "task_tag": { + "$ref": "#/components/schemas/inline_response_200_6_task_tag" + } + }, + "type": "object" + }, + "example": { + "task_tag": { + "id": "2" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n470 - In order to add a tag, please upload the entity id (either data_id, task_id, flow_id, run_id) and tag (the name of the tag).\\n471 - Entity not found. The provided entity_id {data_id, task_id, flow_id, run_id} does not correspond to an existing entity.\\n472 - Entity already tagged by this tag. The entity {dataset, task, flow, run} already had this tag.\\n473 - Something went wrong inserting the tag. Please contact OpenML Team.\\n474 - Internal error tagging the entity. Please contact OpenML Team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/task/untag": { + "post": { + "tags": [ + "task" + ], + "summary": "Untag a task", + "description": "Untags a task.", + "operationId": "Api_task::task_untag", + "parameters": [ + { + "name": "task_id", + "in": "query", + "description": "Id of the task.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "Tag name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A the features of the task", + "content": { + "application/json": { + "schema": { + "properties": { + "task_untag": { + "$ref": "#/components/schemas/inline_response_200_7_task_untag" + } + }, + "type": "object" + }, + "example": { + "task_untag": { + "id": "2" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n475 - Please give entity_id {data_id, flow_id, run_id} and tag. In order to remove a tag, please upload the entity id (either data_id, task_id, flow_id, run_id) and tag (the name of the tag).\\n476 - Entity {dataset, task, flow, run} not found. The provided entity_id {data_id, task_id, flow_id, run_id} does not correspond to an existing entity.\\n477 - Tag not found. The provided tag is not associated with the entity {dataset, task, flow, run}.\\n478 - Tag is not owned by you. The entity {dataset, flow, run} was tagged by another user. Hence you cannot delete it.\\n479 - Internal error removing the tag. Please contact OpenML Team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/flow/{id}": { + "get": { + "tags": [ + "flow" + ], + "summary": "Get flow description. Flows represent machine learning models and/or pipelines.", + "description": "Returns information about a flow. The information includes the name, information about the creator, dependencies, parameters, run instructions and more.", + "operationId": "Api_flow::flow", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the flow.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A flow description", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Flow" + }, + "example": { + "flow": { + "id": "100", + "uploader": "1", + "name": "weka.J48", + "version": "2", + "external_version": "Weka_3.7.5_9117", + "description": "...", + "upload_date": "2014-04-23 18:00:36", + "language": "Java", + "dependencies": "Weka_3.7.5", + "parameter": [ + { + "name": "A", + "data_type": "flag", + "default_value": [], + "description": "Laplace smoothing..." + }, + { + "name": "C", + "data_type": "option", + "default_value": "0.25", + "description": "Set confidence threshold..." + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n180 - Please provide flow id.\\n181 - Unknown flow. The flow with the given ID was not found in the database.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "tags": [ + "flow" + ], + "summary": "Delete a flow", + "description": "Deletes a flow. Upon success, it returns the ID of the deleted flow.", + "operationId": "Api_flow::flow_delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the flow.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "api_key", + "in": "query", + "description": "API key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ID of the deleted flow", + "content": { + "application/json": { + "schema": { + "properties": { + "flow_delete": { + "$ref": "#/components/schemas/inline_response_200_8_flow_delete" + } + }, + "type": "object" + }, + "example": { + "flow_delete": { + "id": "4328" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n320 - Please provide API key. In order to remove your content, please authenticate.\\n321 - Authentication failed. The API key was not valid. Please try to login again, or contact api administrators.\\n322 - Flow does not exists. The flow ID could not be linked to an existing flow.\\n323 - Flow is not owned by you. The flow is owned by another user. Hence you cannot delete it.\\n324 - Flow is in use by other content. Can not be deleted. The flow is used in runs, evaluations or as a component of another flow. Delete other content before deleting this flow.\\n325 - Deleting flow failed. Deleting the flow failed. Please contact\\nsupport team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/flow/list/{filters}": { + "get": { + "tags": [ + "flow" + ], + "summary": "List and filter flows", + "description": "List flows, possibly filtered by a range of properties. Any number of properties can be combined by listing them one after the other in the form '/task/list/{filter}/{value}/{filter}/{value}/...' Returns an array with all flows that match the constraints.", + "operationId": "Api_flow::flow_list", + "parameters": [ + { + "name": "filters", + "in": "path", + "description": "Any combination of these filters\r\n /limit/{limit}/offset/{offset} - returns only {limit} results starting from result number {offset}. Useful for paginating results. With /limit/5/offset/10, tasks 11..15 will be returned. Both limit and offset need to be specified.\r\n /tag/{tag} - returns only tasks tagged with the given tag.\r\n /uploader/{id} - return only evaluations uploaded by a specific user, specified by user ID.\r\n ", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of flows", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowList" + }, + "example": { + "flows": { + "flow": [ + { + "id": "65", + "full_name": "weka.RandomForest(1)", + "name": "weka.RandomForest", + "version": "1", + "external_version": "Weka_3.7.10_9186", + "uploader": "1" + }, + { + "id": "66", + "full_name": "weka.IBk(1)", + "name": "weka.IBk", + "version": "1", + "external_version": "Weka_3.7.10_8034", + "uploader": "1" + }, + { + "id": "67", + "full_name": "weka.BayesNet_K2(1)", + "name": "weka.BayesNet_K2", + "version": "1", + "external_version": "Weka_3.7.10_8034", + "uploader": "1" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n500 - No results. There where no matches for the given constraints.\\n501 - Illegal filter specified.\\n502 - Filter values/ranges not properly specified.\\n503 - Can not specify an offset without a limit.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/flow/exists/{name}/{version}": { + "get": { + "tags": [ + "flow" + ], + "summary": "Check whether flow exists", + "description": "Checks whether a flow with the given name and (external) version exists.", + "operationId": "Api_flow::flow_exists", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "The name of the flow.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "description": "The external version of the flow", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of flows", + "content": { + "application/json": { + "schema": { + "properties": { + "flow_exists": { + "$ref": "#/components/schemas/inline_response_200_10_flow_exists" + } + }, + "type": "object" + }, + "example": { + "flow_exists": { + "exists": "true", + "id": "65" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n330 - Mandatory fields not present. Please provide name and external_version.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/flow": { + "post": { + "tags": [ + "flow" + ], + "summary": "Upload a flow", + "description": "Uploads a flow. Upon success, it returns the flow id.", + "operationId": "Api_flow::flow_upload", + "parameters": [ + { + "name": "description", + "in": "query", + "description": "An XML file describing the flow. Only name and description are required. Also see the [XSD schema](https://www.openml.org/api/v1/xsd/openml.implementation.upload) and an [XML example](https://www.openml.org/api/v1/xml_example/flow).", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "flow", + "in": "query", + "description": "The actual flow, being a source (or binary) file.", + "required": false, + "schema": { + "type": "file" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Id of the uploaded flow", + "content": { + "application/json": { + "schema": { + "properties": { + "upload_flow": { + "$ref": "#/components/schemas/inline_response_200_9_upload_flow" + } + }, + "type": "object" + }, + "example": { + "upload_flow": { + "id": "2520" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n160 - Error in file uploading. There was a problem with the file upload.\\n161 - Please provide description xml.\\n163 - Problem validating uploaded description file. The XML description format does not meet the standards.\\n164 - Flow already stored in database. Please change name or version number\\n165 - Failed to insert flow. There can be many causes for this error. If you included the implements field, it should be an existing entry in the algorithm or math_function table. Otherwise it could be an internal server error. Please contact API support team.\\n166 - Failed to add flow to database. Internal server error, please contact API administrators\\n167 - Illegal files uploaded. An non required file was uploaded.\\n168 - The provided md5 hash equals not the server generated md5 hash of the file.\\n169 - Please provide API key. In order to share content, please authenticate and provide API key.\\n170 - Authentication failed. The API key was not valid. Please try to login again, or contact API administrators\\n171 - Flow already exists. This flow is already in the database\\n172 - XSD not found. Please contact API support team\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + + "/flow/tag": { + "post": { + "tags": [ + "flow" + ], + "summary": "Tag a flow", + "description": "Tags a flow.", + "operationId": "Api_flow::flow_tag", + "parameters": [ + { + "name": "flow_id", + "in": "query", + "description": "Id of the flow.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "Tag name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The id of the tagged flow", + "content": { + "application/json": { + "schema": { + "properties": { + "flow_tag": { + "$ref": "#/components/schemas/inline_response_200_12_flow_tag" + } + }, + "type": "object" + }, + "example": { + "flow_tag": { + "id": "2" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n470 - In order to add a tag, please upload the entity id (either data_id, flow_id, run_id) and tag (the name of the tag).\\n471 - Entity not found. The provided entity_id {data_id, flow_id, run_id} does not correspond to an existing entity.\\n472 - Entity already tagged by this tag. The entity {dataset, flow, run} already had this tag.\\n473 - Something went wrong inserting the tag. Please contact OpenML Team.\\n474 - Internal error tagging the entity. Please contact OpenML Team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/flow/untag": { + "post": { + "tags": [ + "flow" + ], + "summary": "Untag a flow", + "description": "Untags a flow.", + "operationId": "Api_flow::flow_untag", + "parameters": [ + { + "name": "flow_id", + "in": "query", + "description": "Id of the flow.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "Tag name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The id of the untagged flow", + "content": { + "application/json": { + "schema": { + "properties": { + "flow_untag": { + "$ref": "#/components/schemas/inline_response_200_13_flow_untag" + } + }, + "type": "object" + }, + "example": { + "flow_untag": { + "id": "2" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n475 - Please give entity_id {data_id, flow_id, run_id} and tag. In order to remove a tag, please upload the entity id (either data_id, flow_id, run_id) and tag (the name of the tag).\\n476 - Entity {dataset, flow, run} not found. The provided entity_id {data_id, flow_id, run_id} does not correspond to an existing entity.\\n477 - Tag not found. The provided tag is not associated with the entity {dataset, flow, run}.\\n478 - Tag is not owned by you. The entity {dataset, flow, run} was tagged\\nby another user. Hence you cannot delete it.\\n479 - Internal error removing the tag. Please contact OpenML Team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + + "/run/{id}": { + "get": { + "tags": [ + "run" + ], + "summary": "Get run description. Runs describe machine learning experiments, typically the results or running a certain model (flow) on a certain task.", + "description": "Returns information about a run. The information includes the name, information about the creator, dependencies, parameters, run instructions and more.", + "operationId": "Api_run::run", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the run.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A run description", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Run" + }, + "example": { + "run": { + "run_id": "100", + "uploader": "1", + "uploader_name": "Jan van Rijn", + "task_id": "28", + "task_type": "Supervised Classification", + "task_evaluation_measure": "predictive_accuracy", + "flow_id": "67", + "flow_name": "weka.BayesNet_K2(1)", + "setup_string": "weka.classifiers.bayes.BayesNet -- -D -Q weka.classifiers.bayes.net.search.local.K2 -- -P 1 -S BAYES -E weka.classifiers.bayes.net.estimate.SimpleEstimator -- -A 0.5", + "parameter_setting": [ + { + "name": "D", + "value": "true" + }, + { + "name": "Q", + "value": "weka.classifiers.bayes.net.search.local.K2" + }, + { + "name": "P", + "value": "1" + }, + { + "name": "S", + "value": "BAYES" + } + ], + "input_data": { + "dataset": { + "did": "28", + "name": "optdigits", + "url": "https:\\\\/\\\\/www.openml.org\\\\/data\\\\/download\\\\/28\\\\/dataset_28_optdigits.arff" + } + }, + "output_data": { + "file": [ + { + "did": "48838", + "file_id": "261", + "name": "description", + "url": "https:\\\\/\\\\/www.openml.org\\\\/data\\\\/download\\\\/261\\\\/weka_generated_run935374685998857626.xml" + }, + { + "did": "48839", + "file_id": "262", + "name": "predictions", + "url": "https:\\\\/\\\\/www.openml.org\\\\/data\\\\/download\\\\/262\\\\/weka_generated_predictions576954524972002741.arff" + } + ], + "evaluation": [ + { + "name": "area_under_roc_curve", + "flow_id": "4", + "value": "0.990288", + "array_data": "[0.99724,0.989212,0.992776,0.994279,0.980578,0.98649,0.99422,0.99727,0.994858,0.976143]" + }, + { + "name": "confusion_matrix", + "flow_id": "10", + "array_data": "[[544,1,0,0,7,0,1,0,0,1],[0,511,21,1,0,1,3,1,5,28],[0,7,511,1,0,1,0,3,23,11],[0,2,2,519,0,3,0,12,16,18],[0,3,0,0,528,0,4,21,6,6],[0,1,0,7,5,488,2,0,4,51],[1,7,0,0,2,0,548,0,0,0],[0,2,0,1,9,1,0,545,4,4],[1,25,2,2,3,6,2,1,503,9],[0,7,0,20,16,5,0,19,9,486]]" + }, + { + "name": "f_measure", + "flow_id": "12", + "value": "0.922723", + "array_data": "[0.989091,0.898857,0.935041,0.92431,0.927944,0.918156,0.980322,0.933219,0.895018,0.826531]" + }, + { + "name": "kappa", + "flow_id": "13", + "value": "0.913601" + } + ] + } + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n220 - Please provide run ID. In order to view run details, please provide the run ID.\\n221 - Run not found. The run ID was invalid, run does not exist (anymore).\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "tags": [ + "run" + ], + "summary": "Delete run", + "description": "Deletes a run. Upon success, it returns the ID of the deleted run.", + "operationId": "Api_run::run_delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the run.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "api_key", + "in": "query", + "description": "API key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ID of the deleted run", + "content": { + "application/json": { + "schema": { + "properties": { + "data_delete": { + "$ref": "#/components/schemas/inline_response_200_17_data_delete" + } + }, + "type": "object" + }, + "example": { + "run_delete": { + "id": "2520" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n390 - Please provide API key. In order to remove your content, please authenticate.\\n391 - Authentication failed. The API key was not valid. Please try to login again, or contact api administrators\\n392 - Run does not exists. The run ID could not be linked to an existing run.\\n393 - Run is not owned by you. The run was owned by another user. Hence you cannot delete it.\\n394 - Deleting run failed. Deleting the run failed. Please contact support team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/run/reset/{id}": { + "get": { + "tags": [ + "run" + ], + "summary": "Resets a run. Causes the evaluations of the run to be recomputed.", + "description": "Removes all run evaluations. When a run is reset, the runs will automatically be evaluated as soon as they are picked up by the evaluation engine again.", + "operationId": "Api_run::run_reset", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Run ID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Id of the evaluated run", + "content": { + "application/json": { + "schema": { + "properties": { + "run_reset": { + "$ref": "#/components/schemas/inline_response_200_21_upload_flow" + } + }, + "type": "object" + }, + "example": { + "run_reset": { + "id": "2520" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n412 - Run does not exist\\n413 - Run is not owned by you\\n394 - Resetting run failed\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/run/list/{filters}": { + "get": { + "tags": [ + "run" + ], + "summary": "List and filter runs", + "description": "List runs, filtered by a range of properties. Any number of properties can be combined by listing them one after the other in the form '/run/list/{filter}/{value}/{filter}/{value}/...' Returns an array with all runs that match the constraints. A maximum of 10,000 results are returned, an error is returned if the result set is bigger. Use pagination (via limit and offset filters), or limit the results to certain tasks, flows, setups, or uploaders.", + "operationId": "Api_run::run_list", + "parameters": [ + { + "name": "filters", + "in": "path", + "description": "Any combination of these filters\r\n /tag/{tag} - return only runs tagged with the given tag.\r\n /run/{ids} - return only specific runs, specified as a comma-separated list of run IDs, e.g. ''1,2,3''\r\n /task/{ids} - return only runs on specific tasks, specified as a comma-separated list of task IDs, e.g. ''1,2,3''\r\n /flow/{ids} - return only runs on specific flows, specified as a comma-separated list of flow IDs, e.g. ''1,2,3''\r\n /setup/{ids} - return only runs with specific setups, specified as a comma-separated list of setup IDs, e.g. ''1,2,3''\r\n /uploader/{ids} - return only runs uploaded by specific users, specified as a comma-separated list of user IDs, e.g. ''1,2,3''\r\n /limit/{limit}/offset/{offset} - returns only {limit} results starting from result number {offset}. Useful for paginating results. With /limit/5/offset/10, results 11..15 will be returned. Both limit and offset need to be specified.\r\n ", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of runs descriptions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunList" + }, + "example": { + "runs": { + "run": [ + { + "upload_time": "2014-04-06 23:30:40", + "task_id": "28", + "run_id": "100", + "error_message": [], + "setup_id": "12", + "uploader": "1", + "flow_id": "67" + }, + { + "upload_time": "2014-04-06 23:30:40", + "task_id": "48", + "run_id": "101", + "error_message": [], + "setup_id": "6", + "uploader": "1", + "flow_id": "61" + }, + { + "upload_time": "2014-04-06 23:30:40", + "task_id": "41", + "run_id": "102", + "error_message": [], + "setup_id": "3", + "uploader": "1", + "flow_id": "58" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n510 - Please provide at least task, flow or setup, uploader or run, to filter results, or limit the number of responses. The number of runs is huge. Please limit the result space.\\n511 - Input not safe. The input parameters (task_id, setup_id, flow_id, run_id, uploader_id) did not meet the constraints (comma separated list of integers).\\n512 - There where no results. Check whether there are runs under the given constraint.\\n513 - Too many results. Given the constraints, there were still too many results. Please add filters to narrow down the list.\\n514 - Illegal filter specified.\\n515 - Offset specified without limit.\\n516 - Requested result limit too high.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/run/trace/{id}": { + "get": { + "tags": [ + "run" + ], + "summary": "Get run trace, containing all hyperparameter settings tried while tuning the model, and their evaluations.", + "description": "Returns the optimization trace of run. The trace contains every setup tried, its evaluation, and whether it was selected.", + "operationId": "Api_run::run_trace", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the run.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A run trace description", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTrace" + }, + "example": { + "trace": { + "run_id": "573055", + "trace_iteration": { + "repeat": "0", + "fold": "0", + "iteration": "1", + "setup_string": { + "parameter_minNumObj": "1", + "parameter_confidenceFactor": "0.25" + }, + "evaluation": "94.074074", + "selected": "true" + } + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n570 - No successful trace associated with this run\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "post": { + "tags": [ + "run" + ], + "summary": "Upload run trace", + "description": "Uploads a run trace. Upon success, it returns the run id.", + "operationId": "Api_run::run_trace_upload", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the run.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "description", + "in": "query", + "description": "An XML file describing the trace. Also see the [XSD schema](https://www.openml.org/api/v1/xsd/openml.run.trace) and an [XML example](https://www.openml.org/api/v1/xml_example/run.trace).", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Id of the run with the trace", + "content": { + "application/json": { + "schema": { + "properties": { + "upload_flow": { + "$ref": "#/components/schemas/inline_response_200_23_upload_flow" + } + }, + "type": "object" + }, + "example": { + "run_trace": { + "id": "2520" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n561 - Problem with uploaded trace file.\\n562 - Problem validating xml trace file.\\n563 - Problem loading xml trace file.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/run": { + "post": { + "tags": [ + "run" + ], + "summary": "Upload run", + "description": "Uploads a run. Upon success, it returns the run id.", + "operationId": "Api_run::run_upload", + "parameters": [ + { + "name": "description", + "in": "query", + "description": "An XML file describing the dataset. Only name, description, and data format are required. Also see the [XSD schema](https://www.openml.org/api/v1/xsd/openml.run.upload) and an [XML example](https://www.openml.org/api/v1/xml_example/run).", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "predictions", + "in": "query", + "description": "The predictions generated by the run", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "model_readable", + "in": "query", + "description": "The human-readable model generated by the run", + "required": false, + "schema": { + "type": "file" + } + }, + { + "name": "model_serialized", + "in": "query", + "description": "The serialized model generated by the run", + "required": false, + "schema": { + "type": "file" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Id of the uploaded run", + "content": { + "application/json": { + "schema": { + "properties": { + "upload_flow": { + "$ref": "#/components/schemas/inline_response_200_18_upload_flow" + } + }, + "type": "object" + }, + "example": { + "upload_run": { + "id": "2520" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n201 - Authentication failed. The API key was not valid. Please try to login again, or contact api administrators.\\n202 - Please provide run XML.\\n203 - Could not validate run xml by XSD. Please double check that the xml is valid.\\n204 - Unknown task. The task with the given ID was not found in the database.\\n205 - Unknown flow. The flow with the given ID was not found in the database.\\n206 - Invalid number of files. The number of uploaded files did not match the number of files expected for the task type\\n207 - File upload failed. One of the files uploaded has a problem.\\n208 - Error inserting setup record. Please contact api administrators\\n210 - Unable to store run. Please contact api administrators.\\n211 - Dataset not in database. One of the datasets of the task was not included in database, please contact api administrators.\\n212 - Unable to store file. Please contact api administrators.\\n213 - Parameter in run xml unknown. One of the parameters provided in the run xml is not registered as parameter for the flow nor its components.\\n214 - Unable to store input setting. Please contact API support team.\\n215 - Unable to evaluate predictions. Please contact API support team.\\n216 - Error thrown by Java Application. Additional information field is provided.\\n217 - Error processing output data. Unknown or inconsistent evaluation measure. One of the provided evaluation measures could not be matched with a record in the math_function or flow table.\\n218 - Wrong flow associated with run. The flow implements a math_function, which is unable to generate predictions. Please select another flow.\\n219 - Error reading the XML document. The XML description file could not be verified.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/run/evaluate": { + "post": { + "tags": [ + "run" + ], + "summary": "Uploads a run evaluation", + "description": "Uploads a run evaluation. When successful, it returns the run id.", + "operationId": "Api_run::run_evaluate", + "parameters": [ + { + "name": "description", + "in": "query", + "description": "An XML file describing the run evaluation.Also see the [XSD schema](https://www.openml.org/api/v1/xsd/openml.run.evaluate) and an [XML example](https://www.openml.org/api/v1/xml_example/run.evaluate).", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Id of the evaluated run", + "content": { + "application/json": { + "schema": { + "properties": { + "upload_flow": { + "$ref": "#/components/schemas/inline_response_200_21_upload_flow" + } + }, + "type": "object" + }, + "example": { + "run_evaluate": { + "id": "2520" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n422 - Upload problem description XML\\n423 - Problem validating uploaded description file\\n424 - Problem opening description xml\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/run/tag": { + "post": { + "tags": [ + "run" + ], + "summary": "Tag a run", + "description": "Tags a run.", + "operationId": "Api_run::run_tag", + "parameters": [ + { + "name": "run_id", + "in": "query", + "description": "Id of the run.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "Tag name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The id of the tagged run", + "content": { + "application/json": { + "schema": { + "properties": { + "run_tag": { + "$ref": "#/components/schemas/inline_response_200_19_run_tag" + } + }, + "type": "object" + }, + "example": { + "run_tag": { + "id": "2" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n470 - In order to add a tag, please upload the entity id (either data_id, flow_id, run_id) and tag (the name of the tag).\\n471 - Entity not found. The provided entity_id {data_id, flow_id, run_id} does not correspond to an existing entity.\\n472 - Entity already tagged by this tag. The entity {dataset, flow, run} already had this tag.\\n473 - Something went wrong inserting the tag. Please contact OpenML Team.\\n474 - Internal error tagging the entity. Please contact OpenML Team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/run/untag": { + "post": { + "tags": [ + "run" + ], + "summary": "Untag a run", + "description": "Untags a run.", + "operationId": "Api_run::run_untag", + "parameters": [ + { + "name": "run_id", + "in": "query", + "description": "Id of the run.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "Tag name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The id of the untagged run", + "content": { + "application/json": { + "schema": { + "properties": { + "run_untag": { + "$ref": "#/components/schemas/inline_response_200_20_run_untag" + } + }, + "type": "object" + }, + "example": { + "run_untag": { + "id": "2" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n475 - Please give entity_id {data_id, flow_id, run_id} and tag. In order to remove a tag, please upload the entity id (either data_id, flow_id, run_id) and tag (the name of the tag).\\n476 - Entity {dataset, flow, run} not found. The provided entity_id {data_id, flow_id, run_id} does not correspond to an existing entity.\\n477 - Tag not found. The provided tag is not associated with the entity {dataset, flow, run}.\\n478 - Tag is not owned by you. The entity {dataset, flow, run} was tagged by another user. Hence you cannot delete it.\\n479 - Internal error removing the tag. Please contact OpenML Team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/evaluation/list/{filters}": { + "get": { + "tags": [ + "evaluation" + ], + "summary": "List and filter run evaluations. Useful for retrieving model evaluations across many runs.", + "description": "List evaluations, filtered by a range of properties. Any number of properties can be combined by listing them one after the other in the form '/evaluation/list/{filter}/{value}/{filter}/{value}/...' Returns an array with all evaluations that match the constraints. A maximum of 10,000 results are returned, an error is returned if the result set is bigger. Use pagination (via limit and offset filters), or limit the results to certain tasks, flows, setups, uploaders or runs.", + "operationId": "Api_evaluation::evaluation_list", + "parameters": [ + { + "name": "filters", + "in": "path", + "description": "Any combination of these filters\r\n /function/{name} - name of the evaluation measure, e.g. area_under_auc or predictive_accuracy. See the OpenML website for the complete list of measures.\r\n /tag/{tag} - returns only evaluations of runs tagged with the given tag.\r\n /run/{ids} - return only evaluations for specific runs, specified as a comma-separated list of run IDs, e.g. ''1,2,3''\r\n /task/{ids} - return only evaluations for specific tasks, specified as a comma-separated list of task IDs, e.g. ''1,2,3''\r\n /flow/{ids} - return only evaluations for specific flows, specified as a comma-separated list of flow IDs, e.g. ''1,2,3''\r\n /setup/{ids} - return only evaluations for specific setups, specified as a comma-separated list of setup IDs, e.g. ''1,2,3''\r\n /uploader/{ids} - return only evaluations uploaded by specific users, specified as a comma-separated list of user IDs, e.g. ''1,2,3''\r\n /limit/{limit}/offset/{offset} - returns only {limit} results starting from result number {offset}. Useful for paginating results. With /limit/5/offset/10, results 11..15 will be returned. Both limit and offset need to be specified.\r\n /per_fold/{true,false} - whether or not to return crossvalidation scores per fold. Defaults to 'false'. Setting it to 'true' leads to large numbers of results, use only for very specific sets of runs.\r\n /sort_order/{asc,desc} - sorts the results by the evaluation value, according to the selected evaluation measure (function)\r\n ", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of evaluations descriptions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationList" + }, + "example": { + "evaluations": { + "evaluation": [ + { + "function": "area_under_roc_curve", + "upload_time": "2014-04-06 23:30:40", + "task_id": "68", + "run_id": "1", + "array_data": "[0,0.99113,0.898048,0.874862,0.791282,0.807343,0.820674]", + "value": "0.839359", + "uploader": "1", + "flow_id": "61" + }, + { + "function": "f_measure", + "upload_time": "2014-04-06 23:30:40", + "task_id": "68", + "run_id": "1", + "array_data": "[0,0,0.711934,0.735714,0.601363,0.435678,0.430913]", + "value": "0.600026", + "uploader": "1", + "flow_id": "61" + }, + { + "function": "predictive_accuracy", + "upload_time": "2014-04-06 23:30:40", + "task_id": "68", + "run_id": "1", + "array_data": [], + "value": "0.614634", + "uploader": "1", + "flow_id": "61" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n540 - Please provide at least task, flow or setup, uploader or run, to\\nfilter results, or limit the number of responses.\\n541 - The input parameters (task_id, setup_id, flow_id, run_id, uploader_id) did not meet the constraints (comma separated list of integers).\\n542 - There where no results. Check whether there are runs under the given constraint.\\n543 - Too many results. Given the constraints, there were still too many results. Please add filters to narrow down the list.\\n544 - Illegal filter specified.\\n545 - Offset specified without limit.\\n546 - Requested result limit too high.\\n547 - Per fold can only be set to value 'true' or 'false'.\\n548 - Per fold queries are experimental and require a fair amount of filters on resulting run records to keep the query fast (use, e.g., flow, setup, task and uploader filter)\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/evaluation/request/{evaluation_engine_id}/{order}": { + "get": { + "tags": [ + "evaluation" + ], + "summary": "Get an unevaluated run. Only for managing run evaluation scripts.", + "description": "This call is for people running their own evaluation engines. It returns the details of a run that is not yet evaluated by the given evaluation engine. It doesn't evaluate the run, it just returns the run info.", + "operationId": "Api_evaluation::evaluation_request", + "parameters": [ + { + "name": "evaluation_engine_id", + "in": "path", + "description": "The ID of the evaluation engine. You get this ID when you register a new evaluation engine with OpenML. The ID of the main evaluation engine is 1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "path", + "description": "When there are multiple runs still to evaluate, this defines which one to return. Options are 'normal' - the oldest run, 'reverse' - the newest run, or 'random' - a random run.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of evaluations descriptions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationRequest" + }, + "example": { + "evaluation_request": { + "run": [ + { + "setup_id": "68799271", + "upload_time": "2018-04-03 21:05:38", + "uploader": "1935", + "task_id": "3021", + "run_id": "8943712" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n100 - Function not valid.\\n545 - No unevaluated runs according to the criteria.\\n546 - Illegal filter.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/study/{id}": { + "get": { + "tags": [ + "study" + ], + "summary": "Get study description by study id or alias. Studies are collections of OpenML tasks and/or runs, also used for benchmarks.", + "description": "Returns information about the study with the given id or alias.", + "operationId": "Api_study::study_get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID or alias of the study.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A study description", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Study" + }, + "example": { + "study": { + "id": "99", + "main_entity_type": "task", + "name": "CC18 benchmark suite", + "description": "CC18 benchmark suite", + "creation_date": "2019-02-16T17:35:58", + "creator": "1159", + "data": { + "data_id": [ + "1", + "2", + "3" + ] + }, + "tasks": { + "task_id": [ + "1", + "2", + "3" + ] + } + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n601 - Unknown study. The study with the given id or alias was not found in the database\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "tags": [ + "study" + ], + "summary": "Delete study", + "description": "Deletes a study. Upon success, it returns the ID of the deleted study.", + "operationId": "Api_study::study_delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the study.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ID of the deleted study", + "content": { + "application/json": { + "schema": { + "properties": { + "study_delete": { + "$ref": "#/components/schemas/inline_response_200_24_study_delete" + } + }, + "type": "object" + }, + "example": { + "study_delete": { + "id": "1" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n591 - Please provide API key. In order to remove your content, please authenticate.\\n592 - Study does not exists. The study ID could not be linked to an existing study.\\n593 - Study deletion failed. Please try again later.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/study/list/{filters}": { + "get": { + "tags": [ + "study" + ], + "summary": "List all studies (collections of items)", + "description": "List studies, optionally filtered by a range of properties. Any number of properties can be combined by listing them one after the other in the form '/study/list/{filter}/{value}/{filter}/{value}/...' Returns an array with all studies that match the constraints.", + "operationId": "Api_study::study_list", + "parameters": [ + { + "name": "filters", + "in": "path", + "description": "Any combination of these filters\r\n /main_entity_type/{type} - only return studies collecting entities of a given type (e.g. 'task' or 'run').\r\n /uploader/{ids} - return only evaluations uploaded by specific users, specified as a comma-separated list of user IDs, e.g. ''1,2,3''\r\n /limit/{limit}/offset/{offset} - returns only {limit} results starting from result number {offset}. Useful for paginating results. With /limit/5/offset/10, results 11..15 will be returned. Both limit and offset need to be specified.\r\n ", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of studies", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StudyList" + }, + "example": { + "study_list": { + "study": [ + { + "id": "1", + "alias": "Study_1", + "name": "A large-scale comparison of classification algorithms", + "creation_date": "2017-07-20 15:51:20", + "creator": "2" + }, + { + "id": "2", + "alias": "Study_2", + "name": "Fast Algorithm Selection using Learning Curves", + "creation_date": "2017-07-20 15:51:20", + "creator": "2" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/study": { + "post": { + "tags": [ + "study" + ], + "summary": "Create new study", + "description": "Creates a new study. Upon success, it returns the study id.", + "operationId": "Api_study::study_create", + "parameters": [ + { + "name": "description", + "in": "query", + "description": "An XML file describing the study. Also see the [XSD schema](https://www.openml.org/api/v1/xsd/openml.study.upload) and an [XML example](https://www.openml.org/api/v1/xml_example/study).", + "required": true, + "schema": { + "type": "file" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Id of the uploaded study", + "content": { + "application/json": { + "schema": { + "properties": { + "upload_study": { + "$ref": "#/components/schemas/inline_response_200_25_upload_study" + } + }, + "type": "object" + }, + "example": { + "upload_study": { + "id": "4328" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n1031 - Description file not present. Please upload the study description.\\n1032 - Problem validating uploaded description file. The XML description format does not meet the standards. See the XSD schema.\\n1033 - Illegal main entity type. Currently only collections of tasks and can be created.\\n1034 - Linked entities are not of the correct type fot this study.\\n1035 - Benchmark suites can only be linked to run studies.\\n1036 - Referred benchmark suite cannot be found.\\n1037 - Referred benchmark suite should be a task collection.\\n1038 - Study alias is not unique.\\n1039 - Dataset insertion problem. Please contact the administrators.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/study/{id}/attach": { + "post": { + "tags": [ + "study" + ], + "summary": "Attach a new entity to a study", + "description": "Attach a new entity to an exising study. Upon success, it returns the study id, type, and linked entities.", + "operationId": "Api_study::study_attach", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the study. Supplied in the URL path.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "ids", + "in": "query", + "description": "Comma-separated list of entity IDs to be attached to the study. For instance, if this is a run study, the list of run IDs that need to be added (attached) to the study. Must be supplied as a POST variable.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Properties of the updated study", + "content": { + "application/json": { + "schema": { + "properties": { + "study_attach": { + "$ref": "#/components/schemas/inline_response_200_26_study_attach" + } + }, + "type": "object" + }, + "example": { + "study_attach": { + "id": "1", + "main_entity_type": "task", + "linked_entities": "5" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n1041 - Could not find study. Check the study ID in your request.\\n1042 - Cannnot attach entities to legacy studies.\\n1043 - Please provide POST field 'ids'.\\n1044 - Please ensure that the 'ids' in the POST field is a list of natural numbers.\\n1045 - Could not attach entities to the study. It appears as if the entity does not exist.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/study/{id}/detach": { + "post": { + "tags": [ + "study" + ], + "summary": "Detach an entity from a study", + "description": "Detach an entity from an exising study. Upon success, it returns the study id, type, and linked entities.", + "operationId": "Api_study::study_detach", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the study.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "ids", + "in": "query", + "description": "Comma-separated list of entity IDs to be detached from the study. For instance, if this is a run study, the list of run IDs that need to be removed (detached) from the study. Must be supplied as a POST variable.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Properties of the updated study", + "content": { + "application/json": { + "schema": { + "properties": { + "upload_study": { + "$ref": "#/components/schemas/inline_response_200_26_study_attach" + } + }, + "type": "object" + }, + "example": { + "study_detach": { + "id": "1", + "main_entity_type": "task", + "linked_entities": "5" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n1041 - Could not find study. Check the study ID in your request.\\n1042 - Cannot attach entities to legacy studies.\\n1043 - Please provide POST field 'ids'.\\n1044 - Please ensure that the 'ids' in the POST field is a list of natural numbers.\\n1046 - Could not detach entities from the study. It appears as if the entity does not exist. \\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/tasktype/list": { + "get": { + "tags": [ + "tasktype" + ], + "summary": "List all task types", + "description": "Returns an array with all task types in the system.", + "responses": { + "default": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "200": { + "description": "A task description", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskTypeList" + }, + "example": { + "task_types": { + "task_type": [ + { + "id": "1", + "name": "Supervised Classification", + "description": "In supervised classification, you are given ...", + "creator": "Joaquin Vanschoren, Jan van Rijn, Luis Torgo, Bernd Bischl" + }, + { + "id": "2", + "name": "Supervised Regression", + "description": "Given a dataset with a numeric target ...", + "creator": "Joaquin Vanschoren, Jan van Rijn, Luis Torgo, Bernd Bischl" + } + ] + } + } + } + } + } + } + } + }, + "/setup/{id}": { + "get": { + "tags": [ + "setup" + ], + "summary": "Get a hyperparameter setup. Used only to keep track of which hyperparameter settings are use across runs.", + "description": "Returns information about a setup. The information includes the list of hyperparameters, with name, value, and default value.", + "operationId": "Api_setup::setup", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the hyperparameter setup (configuration). These IDs are stated in run descriptions.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A setup description", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Setup" + }, + "example": { + "setup_parameters": { + "flow_id": "59", + "parameter": [ + { + "full_name": "weka.JRip(1)_F", + "parameter_name": "F", + "data_type": "option", + "default_value": "3", + "value": "3" + }, + { + "full_name": "weka.JRip(1)_N", + "parameter_name": "N", + "data_type": "option", + "default_value": "2.0", + "value": "2.0" + }, + { + "full_name": "weka.JRip(1)_O", + "parameter_name": "O", + "data_type": "option", + "default_value": "2", + "value": "2" + }, + { + "full_name": "weka.JRip(1)_S", + "parameter_name": "S", + "data_type": "option", + "default_value": "1", + "value": "1" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n280 - Please provide setup ID. In order to view setup details, please provide the run ID\\n281 - Setup not found. The setup ID was invalid, or setup does not exist (anymore).\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "tags": [ + "setup" + ], + "summary": "Delete setup", + "description": "Deletes a setup. Upon success, it returns the ID of the deleted setup.", + "operationId": "Api_setup::setup_delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the setup.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ID of the deleted setup", + "content": { + "application/json": { + "schema": { + "properties": { + "study_delete": { + "$ref": "#/components/schemas/inline_response_200_14_study_delete" + } + }, + "type": "object" + }, + "example": { + "setup_delete": { + "id": "1" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n401 - Authentication failed. Please provide API key. In order to remove your content, please authenticate.\\n402 - Setup does not exists. The setup ID could not be linked to an existing setup.\\n404 - Setup deletion failed. Setup is in use by other content (runs, schedules, etc). Can not be deleted.\\n405 - Setup deletion failed. Please try again later.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/setup/list/{filters}": { + "get": { + "tags": [ + "setup" + ], + "summary": "List and filter setups", + "description": "List setups, filtered by a range of properties. Any number of properties can be combined by listing them one after the other in the form '/setup/list/{filter}/{value}/{filter}/{value}/...' Returns an array with all evaluations that match the constraints. A maximum of 1,000 results are returned at a time, an error is returned if the result set is bigger. Use pagination (via limit and offset filters), or limit the results to certain flows, setups, or tags.", + "operationId": "Api_setup::setup_list", + "parameters": [ + { + "name": "filters", + "in": "path", + "description": "Any combination of these filters\r\n /tag/{tag} - returns only setups tagged with the given tag.\r\n /flow/{ids} - return only setups for specific flows, specified as a comma-separated list of flow IDs, e.g. ''1,2,3''\r\n /setup/{ids} - return only specific setups, specified as a comma-separated list of setup IDs, e.g. ''1,2,3''\r\n /limit/{limit}/offset/{offset} - returns only {limit} results starting from result number {offset}. Useful for paginating results. With /limit/5/offset/10, results 11..15 will be returned. Both limit and offset need to be specified.\r\n ", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of setup descriptions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetupList" + }, + "example": { + "setups": { + "setup": [ + { + "setup_id": "10", + "flow_id": "65", + "parameter": [ + { + "id": "4144", + "flow_id": "65", + "flow_name": "weka.RandomForest", + "full_name": "weka.RandomForest(1)_I", + "parameter_name": "I", + "data_type": "option", + "default_value": "10", + "value": "10" + }, + { + "id": "4145", + "flow_id": "65", + "flow_name": "weka.RandomForest", + "full_name": "weka.RandomForest(1)_K", + "parameter_name": "K", + "data_type": "option", + "default_value": "0", + "value": "0" + } + ] + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n670 - Please specify at least one filter.\\n671 - Illegal filter.\\n672 - Illegal filter input.\\n673 - Result set too big. Please use one of the filters or the limit option.\\n674 - No results, please check the filter.\\n675 - Cannot specify offset without limit.\\n676 - Requested result limit too high.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/setup/tag": { + "post": { + "tags": [ + "setup" + ], + "summary": "Tag a setup", + "description": "Tags a setup.", + "operationId": "Api_setup::setup_tag", + "parameters": [ + { + "name": "setup_id", + "in": "query", + "description": "Id of the setup.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "Tag name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The id of the tagged setup", + "content": { + "application/json": { + "schema": { + "properties": { + "flow_tag": { + "$ref": "#/components/schemas/inline_response_200_15_flow_tag" + } + }, + "type": "object" + }, + "example": { + "setup_tag": { + "id": "2" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n470 - In order to add a tag, please upload the entity id (either data_id, flow_id, run_id) and tag (the name of the tag).\\n471 - Entity not found. The provided entity_id {data_id, flow_id, run_id} does not correspond to an existing entity.\\n472 - Entity already tagged by this tag. The entity {dataset, flow, run} already had this tag.\\n473 - Something went wrong inserting the tag. Please contact OpenML Team.\\n474 - Internal error tagging the entity. Please contact OpenML Team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/setup/untag": { + "post": { + "tags": [ + "setup" + ], + "summary": "Untag a setup", + "description": "Untags a setup.", + "operationId": "Api_setup::setup_untag", + "parameters": [ + { + "name": "setup_id", + "in": "query", + "description": "Id of the setup.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "Tag name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key", + "in": "query", + "description": "Api key to authenticate the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The id of the untagged setup", + "content": { + "application/json": { + "schema": { + "properties": { + "flow_untag": { + "$ref": "#/components/schemas/inline_response_200_16_flow_untag" + } + }, + "type": "object" + }, + "example": { + "setup_untag": { + "id": "2" + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n475 - Please give entity_id {data_id, flow_id, run_id} and tag. In order to remove a tag, please upload the entity id (either data_id, flow_id, run_id) and tag (the name of the tag).\\n476 - Entity {dataset, flow, run} not found. The provided entity_id {data_id, flow_id, run_id} does not correspond to an existing entity.\\n477 - Tag not found. The provided tag is not associated with the entity {dataset, flow, run}.\\n478 - Tag is not owned by you. The entity {dataset, flow, run} was tagged\\nby another user. Hence you cannot delete it.\\n479 - Internal error removing the tag. Please contact OpenML Team.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/tasktype/{id}": { + "get": { + "tags": [ + "tasktype" + ], + "summary": "Get task type description", + "description": "Returns information about a task type. The information includes a description, the given inputs and the expected outputs.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the task.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A task type description", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskType" + }, + "example": { + "task_type": { + "id": "1", + "name": "Supervised Classification", + "description": "In supervised classification, you are given an input dataset in which instances are labeled with a certain class. The goal is to build a model that predicts the class for future unlabeled instances. The model is evaluated using a train-test procedure, e.g. cross-validation.

\\\r\n * \\\r\n * To make results by different users comparable, you are given the exact train-test folds to be used, and you need to return at least the predictions generated by your model for each of the test instances. OpenML will use these predictions to calculate a range of evaluation measures on the server.

\\\r\n * \\\r\n * You can also upload your own evaluation measures, provided that the code for doing so is available from the implementation used. For extremely large datasets, it may be infeasible to upload all predictions. In those cases, you need to compute and provide the evaluations yourself.

\\\r\n * \\\r\n * Optionally, you can upload the model trained on all the input data. There is no restriction on the file format, but please use a well-known format or PMML.", + "creator": [ + "Joaquin Vanschoren", + "Jan van Rijn", + "Luis Torgo", + "Bernd Bischl" + ], + "contributor": [ + "Bo Gao", + "Simon Fischer", + "Venkatesh Umaashankar", + "Michael Berthold", + "Bernd Wiswedel", + "Patrick Winter" + ], + "creation_date": "2013-01-24 00:00:00", + "input": [ + { + "name": "source_data", + "requirement": "required", + "data_type": "numeric" + }, + { + "name": "target_feature", + "requirement": "required", + "data_type": "string" + }, + { + "name": "estimation_procedure", + "requirement": "required", + "data_type": "numeric" + }, + { + "name": "cost_matrix", + "data_type": "json" + }, + { + "name": "custom_testset", + "data_type": "json" + }, + { + "name": "evaluation_measures", + "data_type": "string" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n240 - Please provide task type ID.\\n241 - Unknown task type. The task type with the given id was not found in the database\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/evaluationmeasure/list": { + "get": { + "tags": [ + "evaluationmeasure" + ], + "summary": "List all evaluation measures", + "description": "Returns an array with all model evaluation measures in the system.", + "operationId": "Api_evaluationmeasure::evaluationmeasure_list", + "responses": { + "200": { + "description": "A list of evaluation measures", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationMeasureList" + }, + "example": { + "evaluation_measures": { + "measures": { + "measure": [ + "area_under_roc_curve", + "average_cost", + "binominal_test", + "build_cpu_time" + ] + } + } + } + } + } + } + } + } + }, + "/estimationprocedure/list": { + "get": { + "tags": [ + "estimationprocedure" + ], + "summary": "List all estimation procedures", + "description": "Returns an array with all model performance estimation procedures in the system.", + "operationId": "Api_estimationprocedure::estimationprocedure_list", + "responses": { + "200": { + "description": "A list of estimation procedures", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EstimationProcedureList" + }, + "example": { + "estimationprocedures": { + "estimationprocedure": [ + { + "id": "1", + "ttid": "1", + "name": "10-fold Crossvalidation", + "type": "crossvalidation", + "repeats": "1", + "folds": "10", + "stratified_sampling": "true" + }, + { + "id": "2", + "ttid": "1", + "name": "5 times 2-fold Crossvalidation", + "type": "crossvalidation", + "repeats": "5", + "folds": "2", + "stratified_sampling": "true" + } + ] + } + } + } + } + }, + "412": { + "description": "Precondition failed. An error code and message are returned.\\n500 - No model performance estimation procedures available.\\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/user/list": { + "get": { + "tags": [ + "user" + ], + "summary": "List all users by user id. Only accessible to admins.", + "description": "Returns an array with all user ids and names.", + "operationId": "Api_user::username_list", + "responses": { + "200": { + "description": "A list of users", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserList" + }, + "example": { + "users": { + "user": [ + { + "id": "1", + "username": "janvanrijn@gmail.com" + }, + { + "id": "2", + "username": "joaquin.vanschoren@gmail.com" + } + ] + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "inline_response_200_16_flow_untag": { + "properties": { + "id": { + "description": "ID of the untagged setup", + "type": "string" + } + }, + "type": "object" + }, + "EvaluationMeasureList_evaluation_measures_measures": { + "properties": { + "measure": { + "description": "The evaluation measure names", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "inline_response_200_10_flow_exists": { + "properties": { + "id": { + "description": "The id of the flow with the given name and (external) version", + "type": "string" + }, + "exists": { + "description": "true or false", + "type": "string" + } + }, + "type": "object" + }, + "Data_data_set_description": { + "properties": { + "default_target_attribute": { + "description": "For tabular data, the name of the column that is typically used as the target attribute for that data set", + "type": "string" + }, + "upload_date": { + "description": "The datetime that the dataset was uploaded, format yyyy-MM-dd HH:mm:ss", + "type": "string" + }, + "version_label": { + "description": "The version of the dataset, as defined by the uploader, for reference. Can be any format as long as it is unique.", + "type": "string" + }, + "description": { + "description": "Wiki description of the dataset, in (Git flavoured) markdown format", + "type": "string" + }, + "format": { + "description": "Data format, for instance ARFF", + "type": "string" + }, + "url": { + "description": "The URL where the data can be downloaded", + "type": "string" + }, + "tag": { + "description": "Tags added by OpenML users. Includes study tags in the form `study_1`", + "type": "array", + "items": { + "type": "string" + } + }, + "visibility": { + "description": "Who can see the dataset. For instance `public`.", + "type": "string" + }, + "md5_checksum": { + "description": "Checksum to verify downloads of the dataset", + "type": "string" + }, + "version": { + "description": "The version of the dataset, set by OpenML. A positive integer", + "type": "string" + }, + "status": { + "description": "active, in_preparation, or deactivated", + "type": "string" + }, + "file_id": { + "description": "The ID of the dataset file stored on the OpenML server", + "type": "string" + }, + "licence": { + "description": "The licence granted for using the dataset, for instance Public or CC-BY", + "type": "string" + }, + "original_data_url": { + "description": "The URL where the original data is hosted.", + "type": "string" + }, + "id": { + "description": "ID of the dataset, a positive integer", + "type": "string" + }, + "name": { + "description": "The name of the dataset", + "type": "string" + } + }, + "type": "object" + }, + "DataList_data_dataset": { + "properties": { + "did": { + "description": "The dataset ID", + "type": "string" + }, + "status": { + "description": "The dataset status, either in_preparation, active, or deactivated", + "type": "string" + }, + "quality": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataList_data_quality" + } + }, + "name": { + "description": "The dataset name", + "type": "string" + }, + "format": { + "description": "The data format of the dataset, e.g. ARFF", + "type": "string" + } + }, + "type": "object" + }, + "Task_task_description_estimation_procedure": { + "properties": { + "parameter": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task_task_description_estimation_procedure_parameter" + } + }, + "type": { + "description": "The type of procedure, e.g. crossvalidation", + "type": "string" + }, + "data_splits_url": { + "description": "The url where the data splits can be downloaded", + "type": "string" + } + }, + "type": "object" + }, + "DataList_data_quality": { + "properties": { + "name": { + "description": "The name of the property", + "type": "string" + }, + "value": { + "description": "The value of the property", + "type": "string" + } + }, + "type": "object" + }, + "FlowList_flows_flow": { + "properties": { + "full_name": { + "description": "The full flow name (name + internal version number)", + "type": "string" + }, + "external_version": { + "description": "The external flow version", + "type": "string" + }, + "version": { + "description": "The internal flow version", + "type": "string" + }, + "uploader": { + "description": "The ID of the person who uploaded the flow", + "type": "string" + }, + "id": { + "description": "The flow ID", + "type": "string" + }, + "name": { + "description": "The flow name", + "type": "string" + } + }, + "type": "object" + }, + "Run_run_description_input_data_dataset": { + "properties": { + "did": { + "description": "The id of the dataset", + "type": "string" + }, + "url": { + "description": "The download url of the dataset", + "type": "string" + }, + "name": { + "description": "The name of the dataset", + "type": "string" + } + }, + "type": "object" + }, + "EvaluationList_evaluations": { + "properties": { + "evaluation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationList_evaluations_evaluation" + } + } + }, + "type": "object" + }, + "inline_response_200_14_study_delete": { + "properties": { + "id": { + "description": "ID of the deleted setup, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "DataUnprocessed": { + "properties": { + "data_unprocessed": { + "$ref": "#/components/schemas/DataUnprocessed_data_unprocessed" + } + }, + "type": "object" + }, + "DataUnprocessed_data_unprocessed_dataset": { + "properties": { + "did": { + "description": "ID of the dataset a positive integer", + "type": "string" + }, + "status": { + "description": "Status of the dataset", + "type": "string" + }, + "version": { + "description": "Version of the dataset, a positive integer", + "type": "string" + }, + "name": { + "description": "The name of the dataset", + "type": "string" + }, + "format": { + "description": "The dataset format, e.g. ARFF", + "type": "string" + } + }, + "type": "object" + }, + "EstimationProcedureList_estimationprocedures": { + "properties": { + "estimationprocedure": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EstimationProcedureList_estimationprocedures_estimationprocedure" + } + } + }, + "type": "object" + }, + "TaskTypeList": { + "properties": { + "task_types": { + "$ref": "#/components/schemas/TaskTypeList_task_types" + } + }, + "type": "object" + }, + "Run_run_description_output_data_evaluation": { + "properties": { + "array_data": { + "description": "For composite evaluation measures (e.g. per-class measures, confusion matrix), a string (JSON) representation of the evaluation.", + "type": "string" + }, + "name": { + "description": "The name of the evaluation measure", + "type": "string" + }, + "value": { + "description": "The result of the evaluation", + "type": "string" + }, + "flow_id": { + "description": "The id of the code used to compute this evaluation method", + "type": "string" + } + }, + "type": "object" + }, + "TaskList_task_quality": { + "properties": { + "name": { + "description": "The name of the quality", + "type": "string" + }, + "value": { + "description": "The value of the quality", + "type": "string" + } + }, + "type": "object" + }, + "Task_task_description": { + "properties": { + "input": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task_task_description_input" + } + }, + "task_type": { + "description": "The type of the task, e.g. Supervised Classification", + "type": "string" + }, + "tag": { + "description": "Tags added by OpenML uers. Includes study tags in the form 'study_1'", + "type": "array", + "items": { + "type": "string" + } + }, + "task_id": { + "description": "ID of the task, a positive integer", + "type": "string" + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task_task_description_output" + } + } + }, + "type": "object" + }, + "inline_response_200_9_upload_flow": { + "properties": { + "id": { + "description": "ID of the uploaded flow, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "Flow_flow_description": { + "properties": { + "upload_date": { + "description": "The datetime that the flow was uploaded, format yyyy-MM-dd HH:mm:ss", + "type": "string" + }, + "description": { + "description": "Wiki description of the flow, in (Git flavoured) markdown format", + "type": "string" + }, + "language": { + "description": "The programming language the flow is written in.", + "type": "string" + }, + "parameter": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Flow_flow_description_parameter" + } + }, + "tag": { + "description": "Tags added by OpenML users. Includes study tags in the form `study_1`", + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "description": "The version of the flow, set by OpenML. A positive integer", + "type": "string" + }, + "version_label": { + "description": "The version of the flow, as defined by the uploader, for reference. Can be any format as long as it is unique.", + "type": "string" + }, + "dependencies": { + "description": "The libraries that this flow depends on, and their version numbers.", + "type": "string" + }, + "uploader": { + "description": "The uploader of the flow", + "type": "string" + }, + "id": { + "description": "ID of the flow, a positive integer", + "type": "string" + }, + "name": { + "description": "The name of the flow", + "type": "string" + } + }, + "type": "object" + }, + "Task": { + "properties": { + "task_description": { + "$ref": "#/components/schemas/Task_task_description" + } + }, + "type": "object" + }, + "Setup": { + "properties": { + "setup_parameters": { + "$ref": "#/components/schemas/Setup_setup_parameters" + } + }, + "type": "object" + }, + "FlowList_flows": { + "properties": { + "flow": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowList_flows_flow" + } + } + }, + "type": "object" + }, + "RunTrace": { + "properties": { + "trace": { + "$ref": "#/components/schemas/RunTrace_trace" + } + }, + "type": "object" + }, + "Task_task_description_predictions_feature": { + "properties": { + "type": { + "description": "The type of the prediction feature, e.g. integer", + "type": "string" + }, + "name": { + "description": "The name of the prediction feature, e.g. row_id", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_24_study_delete": { + "properties": { + "id": { + "description": "ID of the deleted study, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_5_upload_task": { + "properties": { + "id": { + "description": "ID of the uploaded task, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_13_flow_untag": { + "properties": { + "id": { + "description": "ID of the untagged flow", + "type": "string" + } + }, + "type": "object" + }, + "UserList_users": { + "properties": { + "user": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserList_users_user" + } + } + }, + "type": "object" + }, + "DataFeatures": { + "properties": { + "data_features": { + "$ref": "#/components/schemas/DataFeatures_data_features" + } + }, + "type": "object" + }, + "Task_task_description_predictions": { + "properties": { + "feature": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task_task_description_predictions_feature" + } + }, + "format": { + "description": "The fromat of the predictions, e.g. ARFF", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_15_flow_tag": { + "properties": { + "id": { + "description": "ID of the tagged setup", + "type": "string" + } + }, + "type": "object" + }, + "Setup_setup_parameters": { + "properties": { + "parameter_setting": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Setup_setup_parameters_parameter_setting" + } + }, + "flow_id": { + "description": "ID of the flow, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "DataList": { + "properties": { + "data": { + "$ref": "#/components/schemas/DataList_data" + } + }, + "type": "object" + }, + "inline_response_200_26_study_attach": { + "properties": { + "linked_entities": { + "description": "The number of linked entities", + "type": "string" + }, + "main_entity_type": { + "description": "Main entity type of the of the study", + "type": "string" + }, + "id": { + "description": "ID of the study, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_2_data_tag": { + "properties": { + "id": { + "description": "ID of the tagged dataset", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_23_upload_flow": { + "properties": { + "id": { + "description": "ID of the run with the trace, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "EvaluationRequest_evaluation_request": { + "properties": { + "run": { + "$ref": "#/components/schemas/EvaluationRequest_evaluation_request_run" + } + }, + "type": "object" + }, + "Run": { + "properties": { + "run_description": { + "$ref": "#/components/schemas/Run_run_description" + } + }, + "type": "object" + }, + "inline_response_200_6_task_tag": { + "properties": { + "id": { + "description": "ID of the tagged task", + "type": "string" + } + }, + "type": "object" + }, + "RunList": { + "properties": { + "runs": { + "$ref": "#/components/schemas/RunList_runs" + } + }, + "type": "object" + }, + "inline_response_200_17_data_delete": { + "properties": { + "id": { + "description": "ID of the deleted run, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "Task_task_description_input": { + "properties": { + "data_set": { + "$ref": "#/components/schemas/Task_task_description_data_set" + }, + "cost_matrix": { + "description": "The cost matrix, indicating the costs for each type of misclassification", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + "name": { + "description": "The name of the input, e.g. source_data", + "type": "string" + }, + "evaluation_measures": { + "$ref": "#/components/schemas/Task_task_description_evaluation_measures" + }, + "estimation_procedure": { + "$ref": "#/components/schemas/Task_task_description_estimation_procedure" + } + }, + "type": "object" + }, + "UserList": { + "properties": { + "users": { + "$ref": "#/components/schemas/UserList_users" + } + }, + "type": "object" + }, + "Study_study_runs": { + "properties": { + "run_id": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "DataFeatures_data_features_feature": { + "properties": { + "index": { + "description": "Feature index", + "type": "string" + }, + "name": { + "description": "Feature name", + "type": "string" + }, + "data_type": { + "description": "Feature data type", + "type": "string" + }, + "is_target": { + "description": "Whether this feature is seen as a target feature", + "type": "string" + }, + "is_ignore": { + "description": "Whether this feature should be ignored in modelling (e.g. every value is unique)", + "type": "string" + }, + "is_row_identifier": { + "description": "Whether this feature is a row identifier", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_21_upload_flow": { + "properties": { + "id": { + "description": "ID of the evaluated run, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "TaskType": { + "properties": { + "description": { + "description": "A description of the task type", + "type": "string" + }, + "date": { + "description": "The date when the task type was created", + "type": "string" + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskType_output" + } + }, + "contributor": { + "type": "array", + "items": { + "type": "string" + } + }, + "input": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskType_input" + } + }, + "id": { + "description": "ID of the task type, a positive integer", + "type": "string" + }, + "name": { + "description": "The name of the task type, e.g. Supervised Classification", + "type": "string" + } + }, + "type": "object" + }, + "Run_run_description_output_data_file": { + "properties": { + "did": { + "description": "The id of the uploaded file", + "type": "string" + }, + "file_id": { + "description": "The reference id of the uploaded file, for downloading afterward", + "type": "string" + }, + "name": { + "description": "The name of the uploaded file (e.g., description, predictions, model,...)", + "type": "string" + } + }, + "type": "object" + }, + "TaskType_input": { + "properties": { + "data_set": { + "$ref": "#/components/schemas/Task_task_description_data_set" + }, + "cost_matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + "name": { + "description": "The name of the input, e.g. source_data", + "type": "string" + }, + "evaluation_measures": { + "$ref": "#/components/schemas/Task_task_description_evaluation_measures" + }, + "estimation_procedure": { + "$ref": "#/components/schemas/Task_task_description_estimation_procedure" + } + }, + "type": "object" + }, + "Run_run_description_output_data": { + "properties": { + "evaluation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Run_run_description_output_data_evaluation" + } + }, + "file": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Run_run_description_output_data_file" + } + } + }, + "type": "object" + }, + "inline_response_200_3_data_untag": { + "properties": { + "id": { + "description": "ID of the untagged dataset", + "type": "string" + } + }, + "type": "object" + }, + "Task_task_description_output": { + "properties": { + "name": { + "description": "The name of the output, e.g. predictions", + "type": "string" + }, + "predictions": { + "$ref": "#/components/schemas/Task_task_description_predictions" + } + }, + "type": "object" + }, + "DataQualityList": { + "properties": { + "data_qualities_list": { + "$ref": "#/components/schemas/DataQualityList_data_qualities_list" + } + }, + "type": "object" + }, + "DataUnprocessed_data_unprocessed": { + "properties": { + "dataset": { + "$ref": "#/components/schemas/DataUnprocessed_data_unprocessed_dataset" + } + }, + "type": "object" + }, + "Study": { + "properties": { + "study": { + "$ref": "#/components/schemas/Study_study" + } + }, + "type": "object" + }, + "DataList_data": { + "properties": { + "dataset": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataList_data_dataset" + } + } + }, + "type": "object" + }, + "UserList_users_user": { + "properties": { + "username": { + "description": "The full user name", + "type": "string" + }, + "id": { + "description": "The user ID", + "type": "string" + } + }, + "type": "object" + }, + "TaskType_output": { + "properties": { + "name": { + "description": "The name of the output, e.g. predictions", + "type": "string" + }, + "predictions": { + "$ref": "#/components/schemas/TaskType_predictions" + } + }, + "type": "object" + }, + "RunList_runs_run": { + "properties": { + "task_id": { + "description": "The ID of the task solved by this run", + "type": "string" + }, + "run_id": { + "description": "The run ID", + "type": "string" + }, + "error_message": { + "description": "Error message generated by the run (if any)", + "type": "string" + }, + "setup_id": { + "description": "Ignore (internal representation of the parameter setting)", + "type": "string" + }, + "uploader": { + "description": "The ID of the person uploading this run", + "type": "string" + }, + "flow_id": { + "description": "The ID of the flow used in this run", + "type": "string" + } + }, + "type": "object" + }, + "DataFeatures_data_features": { + "properties": { + "feature": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataFeatures_data_features_feature" + } + } + }, + "type": "object" + }, + "DataQualities_data_qualities_quality": { + "properties": { + "name": { + "description": "The name of the dataset quality measures", + "type": "string" + }, + "value": { + "description": "The value for this dataset", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_12_flow_tag": { + "properties": { + "id": { + "description": "ID of the tagged flow", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_8_flow_delete": { + "properties": { + "id": { + "description": "ID of the deleted flow, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "DataQualities_data_qualities": { + "properties": { + "quality": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataQualities_data_qualities_quality" + } + } + }, + "type": "object" + }, + "EvaluationRequest": { + "properties": { + "evaluation_request": { + "$ref": "#/components/schemas/EvaluationRequest_evaluation_request" + } + }, + "type": "object" + }, + "inline_response_200_18_upload_flow": { + "properties": { + "id": { + "description": "ID of the uploaded run, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "SetupList": { + "properties": { + "setups": { + "$ref": "#/components/schemas/SetupList_setups" + } + }, + "type": "object" + }, + "TaskList": { + "properties": { + "task": { + "$ref": "#/components/schemas/TaskList_task" + } + }, + "type": "object" + }, + "inline_response_200_4_task_delete": { + "properties": { + "id": { + "description": "ID of the deleted task, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "Task_task_description_data_set": { + "properties": { + "data_set_id": { + "description": "The id of the dataset", + "type": "string" + }, + "target_feature": { + "description": "The name of the target feature for this task", + "type": "string" + } + }, + "type": "object" + }, + "EvaluationList": { + "properties": { + "evaluations": { + "$ref": "#/components/schemas/EvaluationList_evaluations" + } + }, + "type": "object" + }, + "Run_run_description": { + "properties": { + "setup_string": { + "description": "Configuration of the flow as a string, to be interpreted by the flow, its library, or command line interface.", + "type": "string" + }, + "task_type": { + "description": "The type of task solved by this run (e.g., classification)", + "type": "string" + }, + "task_id": { + "description": "The id of the task solved by this run", + "type": "string" + }, + "task_evaluation_measure": { + "description": "The evaluation measure that is supposed to be optimized in the task, if any", + "type": "string" + }, + "uploader_name": { + "description": "The name of the uploader of the run", + "type": "string" + }, + "input_data": { + "$ref": "#/components/schemas/Run_run_description_input_data" + }, + "tag": { + "description": "Tags added by OpenML users. Includes study tags in the form `study_1`", + "type": "array", + "items": { + "type": "string" + } + }, + "output_data": { + "$ref": "#/components/schemas/Run_run_description_output_data" + }, + "uploader": { + "description": "The uploader of the run", + "type": "string" + }, + "flow_id": { + "description": "The id of the flow used in this run", + "type": "string" + }, + "flow_name": { + "description": "The name of the flow used in this run", + "type": "string" + }, + "id": { + "description": "ID of the run, a positive integer", + "type": "string" + }, + "parameter_setting": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Run_run_description_parameter_setting" + } + } + }, + "type": "object" + }, + "FlowList": { + "properties": { + "flows": { + "$ref": "#/components/schemas/FlowList_flows" + } + }, + "type": "object" + }, + "inline_response_200_19_run_tag": { + "properties": { + "id": { + "description": "ID of the tagged run", + "type": "string" + } + }, + "type": "object" + }, + "Study_study_data": { + "properties": { + "data_id": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "inline_response_200_data_delete": { + "properties": { + "id": { + "description": "ID of the deleted dataset, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "RunTrace_trace": { + "properties": { + "trace_iteration": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunTrace_trace_trace_iteration" + } + }, + "run_id": { + "description": "run ID", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_7_task_untag": { + "properties": { + "id": { + "description": "ID of the untagged task", + "type": "string" + } + }, + "type": "object" + }, + "Data": { + "properties": { + "data_set_description": { + "$ref": "#/components/schemas/Data_data_set_description" + } + }, + "type": "object" + }, + "Task_task_description_evaluation_measures": { + "properties": { + "evaluation_measure": { + "description": "The evaluation measure to optimize in this task", + "type": "string" + } + }, + "type": "object" + }, + "SetupList_setups_parameter": { + "properties": { + "default_value": { + "description": "The parameter's default value", + "type": "string" + }, + "data_type": { + "description": "The parameter's data type", + "type": "string" + }, + "value": { + "description": "The parameter value in this setup", + "type": "string" + }, + "parameter_name": { + "description": "The parameter's short name", + "type": "string" + }, + "full_name": { + "description": "The parameter's full name", + "type": "string" + }, + "flow_id": { + "description": "The (sub)flow ID", + "type": "string" + }, + "flow_name": { + "description": "The (sub)flow name", + "type": "string" + }, + "id": { + "description": "The parameter ID", + "type": "string" + } + }, + "type": "object" + }, + "TaskList_task_input": { + "properties": { + "name": { + "description": "The name of the input", + "type": "string" + }, + "value": { + "description": "The value of the input", + "type": "string" + } + }, + "type": "object" + }, + "StudyList_study_list": { + "properties": { + "study": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StudyList_study_list_study" + } + } + }, + "type": "object" + }, + "Study_study_tag": { + "properties": { + "write_access": { + "description": "The write access level of the study (e.g. public)", + "type": "string" + }, + "name": { + "description": "The name of the study (e.g. study_1)", + "type": "string" + } + }, + "type": "object" + }, + "Flow": { + "properties": { + "flow_description": { + "$ref": "#/components/schemas/Flow_flow_description" + } + }, + "type": "object" + }, + "Run_run_description_parameter_setting": { + "properties": { + "name": { + "description": "The name of the parameter", + "type": "string" + }, + "value": { + "description": "The value of the parameter used", + "type": "string" + } + }, + "type": "object" + }, + "EvaluationRequest_evaluation_request_run": { + "properties": { + "setup_id": { + "description": "ID of the setup, a positive integer", + "type": "string" + }, + "upload_time": { + "description": "The datetime that the dataset was uploaded, format yyyy-MM-dd HH:mm:ss", + "type": "string" + }, + "uploader": { + "description": "ID of the uploader, a positive integer", + "type": "string" + }, + "task_id": { + "description": "ID of the task, a positive integer", + "type": "string" + }, + "run_id": { + "description": "ID of the run, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "Error": { + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "integer" + }, + "additional_message": { + "type": "string" + } + }, + "type": "object" + }, + "EstimationProcedureList_estimationprocedures_estimationprocedure": { + "properties": { + "name": { + "description": "The estimation procedure name, e.g. '10 fold Crossvalidation'", + "type": "string" + }, + "folds": { + "description": "The number of cross-validation folds, e.g. '10'", + "type": "string" + }, + "stratified_sampling": { + "description": "Whether or not the sampling is stratified, 'true' or 'false'", + "type": "string" + }, + "ttid": { + "description": "The task type ID", + "type": "string" + }, + "repeats": { + "description": "The number of repeats, e.g. '10'", + "type": "string" + }, + "type": { + "description": "The estimation procedure type, e.g. 'crossvalidation'", + "type": "string" + }, + "id": { + "description": "The estimation procedure ID", + "type": "string" + } + }, + "type": "object" + }, + "TaskTypeList_task_types": { + "properties": { + "task_type": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskTypeList_task_types_task_type" + } + } + }, + "type": "object" + }, + "TaskList_task_task": { + "properties": { + "status": { + "description": "The status of the source dataset, active, in_preparation, or deactivated", + "type": "string" + }, + "task_type": { + "description": "The type of task (e.g. Supervised Classificationr)", + "type": "string" + }, + "name": { + "description": "The name of the source dataset", + "type": "string" + }, + "task_id": { + "description": "The ID of the task", + "type": "string" + }, + "format": { + "description": "The format of the source dataset", + "type": "string" + }, + "did": { + "description": "The id of the source dataset", + "type": "string" + }, + "tag": { + "type": "array", + "items": { + "type": "string" + } + }, + "input": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskList_task_input" + } + }, + "quality": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskList_task_quality" + } + } + }, + "type": "object" + }, + "inline_response_200_20_run_untag": { + "properties": { + "id": { + "description": "ID of the untagged run", + "type": "string" + } + }, + "type": "object" + }, + "StudyList": { + "properties": { + "study_list": { + "$ref": "#/components/schemas/StudyList_study_list" + } + }, + "type": "object" + }, + "Study_study": { + "properties": { + "runs": { + "$ref": "#/components/schemas/Study_study_runs" + }, + "tasks": { + "$ref": "#/components/schemas/Study_study_tasks" + }, + "name": { + "description": "The name of the study", + "type": "string" + }, + "creator": { + "description": "A comma-separated list of the study creators", + "type": "string" + }, + "flows": { + "$ref": "#/components/schemas/Study_study_flows" + }, + "creation_date": { + "description": "The datetime that the dataset was uploaded, format yyyy-MM-dd HH:mm:ss", + "type": "string" + }, + "alias": { + "description": "The alias of the study", + "type": "string" + }, + "tag": { + "$ref": "#/components/schemas/Study_study_tag" + }, + "main_entity_type": { + "description": "The type of entity collected in the study (e.g. task or run)", + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/Study_study_data" + }, + "id": { + "description": "The ID of the study", + "type": "string" + } + }, + "type": "object" + }, + "inline_response_200_25_upload_study": { + "properties": { + "id": { + "description": "ID of the uploaded study, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "EvaluationList_evaluations_evaluation": { + "properties": { + "function": { + "description": "The name of the evaluation function", + "type": "string" + }, + "task_id": { + "description": "The ID of the tasks solved by this run", + "type": "string" + }, + "run_id": { + "description": "The run ID", + "type": "string" + }, + "array_data": { + "description": "For structured evaluation measures, an array of evaluation values (e.g. per-class predictions, evaluation matrices,...)", + "type": "string" + }, + "value": { + "description": "The outcome of the evaluation", + "type": "string" + }, + "flow_id": { + "description": "The ID of the flow used by this run", + "type": "string" + } + }, + "type": "object" + }, + "EstimationProcedureList": { + "properties": { + "estimationprocedures": { + "$ref": "#/components/schemas/EstimationProcedureList_estimationprocedures" + } + }, + "type": "object" + }, + "DataQualityList_data_qualities_list": { + "properties": { + "quality": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "Study_study_flows": { + "properties": { + "flow_id": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "StudyList_study_list_study": { + "properties": { + "alias": { + "description": "The alias of the study", + "type": "string" + }, + "creation_date": { + "description": "The datetime that the dataset was uploaded, format yyyy-MM-dd HH:mm:ss", + "type": "string" + }, + "creator": { + "description": "A comma-separated list of the study creators", + "type": "string" + }, + "id": { + "description": "The ID of the study", + "type": "string" + }, + "name": { + "description": "The name of the study", + "type": "string" + } + }, + "type": "object" + }, + "Run_run_description_input_data": { + "properties": { + "dataset": { + "$ref": "#/components/schemas/Run_run_description_input_data_dataset" + } + }, + "type": "object" + }, + "TaskTypeList_task_types_task_type": { + "properties": { + "description": { + "description": "A description of the task type", + "type": "string" + }, + "creator": { + "description": "A comma-separated list of the task type creators", + "type": "string" + }, + "id": { + "description": "The ID of the task type", + "type": "string" + }, + "name": { + "description": "The name of the task type", + "type": "string" + } + }, + "type": "object" + }, + "EvaluationMeasureList_evaluation_measures": { + "properties": { + "measures": { + "$ref": "#/components/schemas/EvaluationMeasureList_evaluation_measures_measures" + } + }, + "type": "object" + }, + "TaskType_predictions": { + "properties": { + "feature": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task_task_description_predictions_feature" + } + }, + "format": { + "description": "The format of the predictions, e.g. ARFF", + "type": "string" + } + }, + "type": "object" + }, + "Flow_flow_description_parameter": { + "properties": { + "default_value": { + "description": "The default value of the parameter", + "type": "string" + }, + "name": { + "description": "The name of the parameter", + "type": "string" + }, + "data_type": { + "description": "The data type of the parameter", + "type": "string" + }, + "description": { + "description": "A description of the parameter", + "type": "string" + } + }, + "type": "object" + }, + "RunTrace_trace_trace_iteration": { + "properties": { + "setup_string": { + "description": "A JSON representation of the setup (configuration)", + "type": "string" + }, + "repeat": { + "description": "The number of the repeat in the outer cross-valudation", + "type": "string" + }, + "selected": { + "description": "Whether this setup was selected as the best one (true or false)", + "type": "string" + }, + "iteration": { + "description": "A number of the optimization iteration", + "type": "string" + }, + "fold": { + "description": "The number of the fold in the inner cross-validation", + "type": "string" + }, + "evaluation": { + "description": "The evaluation score of the setup", + "type": "string" + } + }, + "type": "object" + }, + "EvaluationMeasureList": { + "properties": { + "evaluation_measures": { + "$ref": "#/components/schemas/EvaluationMeasureList_evaluation_measures" + } + }, + "type": "object" + }, + "SetupList_setups": { + "properties": { + "setup": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SetupList_setups_setup" + } + } + }, + "type": "object" + }, + "TaskList_task": { + "properties": { + "task": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskList_task_task" + } + } + }, + "type": "object" + }, + "SetupList_setups_setup": { + "properties": { + "setup_id": { + "description": "The setup ID", + "type": "string" + }, + "parameter": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SetupList_setups_parameter" + } + }, + "flow_id": { + "description": "The ID of the flow used by this run", + "type": "string" + } + }, + "type": "object" + }, + "Task_task_description_estimation_procedure_parameter": { + "properties": { + "name": { + "description": "The name of the parameter", + "type": "string" + }, + "value": { + "description": "The value of the parameter", + "type": "string" + } + }, + "type": "object" + }, + "RunList_runs": { + "properties": { + "run": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunList_runs_run" + } + } + }, + "type": "object" + }, + "Study_study_tasks": { + "properties": { + "task_id": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "inline_response_200_1_upload_data_set": { + "properties": { + "id": { + "description": "ID of the uploaded dataset, a positive integer", + "type": "string" + } + }, + "type": "object" + }, + "Setup_setup_parameters_parameter_setting": { + "properties": { + "default_value": { + "description": "The default value of the parameter used", + "type": "string" + }, + "value": { + "description": "The value of the parameter used", + "type": "string" + }, + "data_type": { + "description": "The data type of the hyperparameter value", + "type": "string" + }, + "full_name": { + "description": "The full name of the hyperparameter", + "type": "string" + }, + "parameter_name": { + "description": "The short name of the hyperparameter", + "type": "string" + } + }, + "type": "object" + }, + "DataQualities": { + "properties": { + "data_qualities": { + "$ref": "#/components/schemas/DataQualities_data_qualities" + } + }, + "type": "object" + } + } + } +} diff --git a/app/src/components/navbar/Navbar.js b/app/src/components/navbar/Navbar.js index 8b76d422..fae357ab 100644 --- a/app/src/components/navbar/Navbar.js +++ b/app/src/components/navbar/Navbar.js @@ -80,8 +80,7 @@ const Input = styled(InputBase)` padding-right: ${(props) => props.theme.spacing(2.5)}; padding-bottom: ${(props) => props.theme.spacing(2.5)}; padding-left: ${(props) => props.theme.spacing(2.5)}; - min-width: 260px; - max-width: 100%; + min-width: 100vw; } & > input::placeholder { @@ -90,12 +89,12 @@ const Input = styled(InputBase)` ${(props) => props.theme.breakpoints.up("md")} { & > input { - min-width: 400px; + min-width: 440px; } } ${(props) => props.theme.breakpoints.up("lg")} { & > input { - min-width: 600px; + min-width: 740px; } } `; diff --git a/app/src/components/pages/apis/SwaggerUI.js b/app/src/components/pages/apis/SwaggerUI.js new file mode 100644 index 00000000..770078b7 --- /dev/null +++ b/app/src/components/pages/apis/SwaggerUI.js @@ -0,0 +1,189 @@ +import styled from "@emotion/styled"; + +const StyledSwaggerUI = styled.div` + [id^="model-"][id*="_"] { + display: none; + } + [id^="model-"][id*="List"] { + display: none; + } + [id^="model-"][id*="Unprocessed"] { + display: none; + } + [id^="model-"][id*="Request"] { + display: none; + } + [id^="model-"][id*="Trace"] { + display: none; + } + .swagger-ui, + .swagger-ui *, + .swagger-ui .info .title, + .swagger-ui .info p, + .swagger-ui .info li, + .swagger-ui select, + .swagger-ui .opblock *, + .swagger-ui .opblock .opblock-section-header * { + color: ${(props) => props.theme.palette.text.primary}; + } + + .swagger-ui .info a { + color: ${(props) => props.theme.palette.text.secondary}; + } + .swagger-ui select, + .swagger-ui .opblock, + .swagger-ui .opblock-tag, + .swagger-ui section.models .model-container, + .swagger-ui .opblock .opblock-section-header { + background-color: ${(props) => props.theme.palette.background.paper}; + } + .swagger-ui .model, + .swagger-ui table.model tr.property-row td { + font-size: 10pt !important; + } + .swagger-ui .model-title { + font-size: 12pt !important; + } + .swagger-ui .model-toggle:after { + background: ${(props) => + `url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='${encodeURIComponent( + props.theme.name == "DARK" + ? props.theme.palette.primary.contrastText + : "#000", + )}' d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E") 50% no-repeat`}; + } + .swagger-ui .expand-methods svg, + .swagger-ui .opblock svg, + .swagger-ui .expand-operation svg { + fill: ${(props) => + props.theme.name == "DARK" + ? props.theme.palette.primary.contrastText + : "#000"}; + } + .swagger-ui .scheme-container { + background: inherit; + box-shadow: none; + } + .swagger-ui .wrapper:nth-of-type(2n):before { + content: "Actions"; + font-size: 18pt; + font-weight: 600; + } + #operations-tag-data { + margin-top: 20px; + } + .swagger-ui .scheme-container { + direction: rtl; + display: flex; + justify-content: flex-end; + padding: 0; + } + .swagger-ui section.schemes { + margin-left: auto; + } + .swagger-ui .servers { + width: 320px; + } + .swagger-ui .servers > label { + margin: 0; + } + .swagger-ui section.models .model-container { + margin: 0; + border-bottom: 1px solid rgba(59, 65, 81, 0.3); + border-radius: 0px; + box-shadow: + 0 2px 2px 0 rgba(0, 0, 0, 0.14), + 0 3px 1px -2px rgba(0, 0, 0, 0.2), + 0 1px 5px 0 rgba(0, 0, 0, 0.12); + } + .swagger-ui section.models .model-container:last-of-type { + margin: 0; + } + .swagger-ui section.models.is-open { + padding: 0px; + } + .swagger-ui section.models { + border: none; + } + .swagger-ui section.models h4 { + margin-bottom: 10px; + font-size: 18pt; + font-weight: 600; + } + .swagger-ui section.models.is-open h4 { + margin-top: 20px; + margin-bottom: 0px; + border-bottom: 0px; + } + .swagger-ui .info { + margin-bottom: 0px; + } + .swagger-ui .servers > label select { + height: 40px; + } + .swagger-ui table.model tr.property-row td { + padding: 0.6em; + font-size: 12pt; + } + .swagger-ui td .model .pointer .model-title { + display: none; + } + .swagger-ui .model-box { + padding-top: 7px; + padding-left: 5px; + padding-bottom: 7px; + } + .swagger-ui .model, + .model-title { + font-size: 12pt; + text-transform: lowercase; + } + .swagger-ui .model-title__text { + padding-left: 10px; + } + .swagger-ui td .model-toggle { + font-size: 20px; + top: 2px; + margin-left: 0px; + } + .swagger-ui td .brace-open { + font-size: 16px; + } + .renderedMarkdown { + } + .swagger-ui .opblock-tag { + margin: 0px; + box-shadow: + 0 2px 2px 0 rgba(0, 0, 0, 0.14), + 0 3px 1px -2px rgba(0, 0, 0, 0.2), + 0 1px 5px 0 rgba(0, 0, 0, 0.12); + } + .no-margin { + display: flex; + flex-direction: column; + } + .swagger-ui .opblock-tag-section h4 { + padding-left: 20px; + font-size: 12pt; + height: 50px; + } + .swagger-ui .opblock-get { + padding-left: 5px; + margin-bottom: 1px; + } + .swagger-ui .opblock-post { + padding-left: 5px; + margin-bottom: 1px; + order: 2; + } + .swagger-ui .opblock-delete { + padding-left: 5px; + margin-bottom: 1px; + order: 3; + } + .swagger-ui .opblock-summary { + height: 50px; + } +`; + +export default StyledSwaggerUI; diff --git a/app/src/components/pages/apis/javaCodeExamples.js b/app/src/components/pages/apis/javaCodeExamples.js new file mode 100644 index 00000000..b8890a79 --- /dev/null +++ b/app/src/components/pages/apis/javaCodeExamples.js @@ -0,0 +1,34 @@ +// Installation +export const InstallationExample = `// Download the jar file, or install via Maven. See the full docs.`; + +// Query and download data +export const DataExample = `// Create a client. Your API key can be found in your account. +OpenmlConnector openml = new OpenmlConnector("api_key"); + +// List all datasets and their properties +DataSet[] datasets = openml.dataList(); + +// Get dataset by ID +DataSetDescription data = openml.dataGet(40996); +String file_url = data.getUrl();`; + +// Run and publish models +export const RunExample = `// Build any model you like +Classifier model = new RandomForest(); + +// Download any OpenML task +Task t = openml.taskGet(3954); + +// Load the data as WEKA Instances (optional) +Instances d = InstancesHelper.getDatasetFromTask(openml, t); + +// Run and evaluate your model on the task, and upload to OpenML +Pair result = RunOpenmlJob.executeTask(openml, new WekaConfig(), 3954, model);`; + +// Using Benchmarks +export const BenchmarkExample = `// List all tasks in a benchmark +Study benchmark = openml.studyGet("OpenML-CC18", "tasks"); +Task[] tasks = benchmark.getTasks() + +// Return benchmark results +EvaluationList el = openml.evaluationList(tasks, null, "area_under_roc_curve", 1000);`; diff --git a/app/src/components/pages/apis/juliaCodeExamples.js b/app/src/components/pages/apis/juliaCodeExamples.js new file mode 100644 index 00000000..62fa81bf --- /dev/null +++ b/app/src/components/pages/apis/juliaCodeExamples.js @@ -0,0 +1,17 @@ +// Installation +export const InstallationExample = `using Pkg +Pkg.add("OpenML")`; + +// Query and download data +export const DataExample = `using OpenML +using DataFrames + +# List all datasets and their properties +ds = OpenML.list_datasets(output_format = DataFrame) + +# Get dataset by ID +OpenML.describe_dataset(40996) + +# Get the data itself as a dataframe (or otherwise) +table = OpenML.load(40996) +df = DataFrame(table)`; diff --git a/app/src/components/pages/apis/pythonCodeExamples.js b/app/src/components/pages/apis/pythonCodeExamples.js new file mode 100644 index 00000000..069b5847 --- /dev/null +++ b/app/src/components/pages/apis/pythonCodeExamples.js @@ -0,0 +1,46 @@ +// Installation +export const InstallationExample = `pip install openml`; + +// Query and download data +export const DataExample = `import openml + +# List all datasets and their properties +openml.datasets.list_datasets(output_format="dataframe") + +# Get dataset by ID +dataset = openml.datasets.get_dataset(61) + +# Get dataset by name +dataset = openml.datasets.get_dataset('Fashion-MNIST') + +# Get the data itself as a dataframe (or otherwise) +X, y, _, _ = dataset.get_data(dataset_format="dataframe")`; + +// Run and publish models +export const RunExample = `from sklearn import ensemble +from openml import tasks, runs + +# Build any model you like +clf = ensemble.RandomForestClassifier() + +# Download any OpenML task +task = tasks.get_task(3954) + +# Run and evaluate your model on the task +run = runs.run_model_on_task(clf, task) + +# Share the results on OpenML. Your API key can be found in your account. +# openml.config.apikey = 'YOUR_KEY' +run.publish()`; + +// Using Benchmarks +export const BenchmarkExample = `# List all tasks in a benchmark +benchmark = openml.study.get_suite('OpenML-CC18') +tasks.list_tasks(output_format="dataframe", task_id=benchmark.tasks) + +# Return benchmark results +openml.evaluations.list_evaluations( + function="area_under_roc_curve", + tasks=benchmark.tasks, + output_format="dataframe" +)`; diff --git a/app/src/components/pages/apis/rCodeExamples.js b/app/src/components/pages/apis/rCodeExamples.js new file mode 100644 index 00000000..a643a144 --- /dev/null +++ b/app/src/components/pages/apis/rCodeExamples.js @@ -0,0 +1,44 @@ +// Installation +export const InstallationExample = `# Note: The old OpenML package is superseded by the mlr3oml package. +# The documentation of the OpenML package can be found here: http://openml.github.io/openml-r/. +install.packages("mlr3oml")`; + +// Query and download data +export const DataExample = `library(mlr3oml) +library(mlr3) + +# Search for specific datasets +odatasets = list_oml_data( + number_features = c(10, 20), + number_instances = c(45000, 50000), + number_classes = 2 +) + +# Get dataset +odata = odt(id = 1590) +# Access the actual data +odata$data + +# Convert to an mlr3::Task +tsk_adult = as_task(odata, target = "class")`; + +// Run and publish models +export const RunExample = `# create an mlr3 Learner and Resampling and run a resample experiment + +rr = resample( + task = tsk_adult, + learner = lrn("classif.rpart"), + resampling = rsmp("cv", folds = 10) +)`; + +// Using Benchmarks +export const BenchmarkExample = `# Access a Benchmark Suite +ocollection = ocl(353) + +# The IDs +ocollection$task_ids +id = ocollection$task_ids[1L] + +# Create mlr3 Task and Resampling from the OpenML Task +task = tsk("oml", task_id = id) +resampling = rsmp("oml", task_id = id)`; diff --git a/app/src/pages/about.js b/app/src/pages/about.js index a3c9e9de..ec37c339 100644 --- a/app/src/pages/about.js +++ b/app/src/pages/about.js @@ -83,13 +83,13 @@ const FixedTypography = styled(Typography)` -webkit-box-orient: vertical; `; -const ContactButton = styled(Fab)({ - margin: 0, - top: 85, - bottom: "auto", - left: "auto", - position: "fixed", -}); +const ContactButton = styled(Fab)` + margin: 0; + top: 85px; + bottom: auto; + left: auto; + position: fixed; +`; const BigAvatar = styled(Avatar)` width: 92px; diff --git a/app/src/pages/apis.js b/app/src/pages/apis.js index db8f9660..22047b14 100644 --- a/app/src/pages/apis.js +++ b/app/src/pages/apis.js @@ -1,11 +1,58 @@ -import React from "react"; +import React, { useState } from "react"; import styled from "@emotion/styled"; import { Helmet } from "react-helmet-async"; import DashboardLayout from "../layouts/Dashboard"; +import { spacing, useTheme } from "@mui/system"; -import { Typography as MuiTypography } from "@mui/material"; -import { spacing } from "@mui/system"; +import { + Tab, + Tabs, + IconButton, + Tooltip, + Typography as MuiTypography, + Snackbar, + Box, + Fab, + Card, + Grid, + CardContent as MuiCardContent, + List, + ListItem, + ListItemText as MuiListItemText, +} from "@mui/material"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { green } from "@mui/material/colors"; +import { + faCopy, + faLocationArrow, + faPaperPlane, + faPlay, + faThumbsUp, +} from "@fortawesome/free-solid-svg-icons"; + +// Code highlighting (importing only the minimum needed) +import { PrismLight as SyntaxHighlighter } from "react-syntax-highlighter"; +import { + nightOwl as dark, + coy as light, +} from "react-syntax-highlighter/dist/cjs/styles/prism"; +import python from "react-syntax-highlighter/dist/cjs/languages/prism/python"; +import r from "react-syntax-highlighter/dist/cjs/languages/prism/r"; +import julia from "react-syntax-highlighter/dist/cjs/languages/prism/julia"; +import java from "react-syntax-highlighter/dist/cjs/languages/prism/java"; +SyntaxHighlighter.registerLanguage("python", python); +SyntaxHighlighter.registerLanguage("r", r); +SyntaxHighlighter.registerLanguage("julia", julia); +SyntaxHighlighter.registerLanguage("java", java); + +// API Docs. Note: swagger-ui-react is no longer actively maintained and uses +// outdated lifecycle methods (results in warnings). +// Replace with new API docs when available. +import SwaggerUI from "swagger-ui-react"; +import "swagger-ui-react/swagger-ui.css"; +import "swagger-ui-themes/themes/3.x/theme-material.css"; +import StyledSwaggerUI from "../components/pages/apis/SwaggerUI"; // Server-side translation import { useTranslation } from "next-i18next"; @@ -19,7 +66,93 @@ export async function getStaticProps({ locale }) { }; } +// Code examples +import * as PythonExamples from "../components/pages/apis/pythonCodeExamples"; +import * as RExamples from "../components/pages/apis/rCodeExamples"; +import * as JuliaExamples from "../components/pages/apis/juliaCodeExamples"; +import * as JavaExamples from "../components/pages/apis/javaCodeExamples"; + const Typography = styled(MuiTypography)(spacing); +const FixedIcon = styled(FontAwesomeIcon)` + font-size: ${(props) => (props.sizept ? props.sizept : 15)}pt; + left: ${(props) => props.l}px; + top: ${(props) => props.t}px; + margin-right: ${(props) => props.mr}px; + color: ${(props) => props.color}; +`; +const ApiTabs = styled(Tabs)` + height: 61px; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + border-top: 1px solid rgba(0, 0, 0, 0.12); +`; +const ApiTab = styled(Tab)` + color: ${(props) => props.searchcolor} !important; + font-size: 11pt; + margin-top: 5px; +`; +const HeroTitle = styled(Typography)({ + textAlign: "center", + lineHeight: "150%", + padding: "2vw 5vw", +}); +const CardContent = styled(MuiCardContent)` + margin-top: 10px; + + &:last-child { + padding-bottom: ${(props) => props.theme.spacing(8)}; + } +`; +const ListItemText = styled(MuiListItemText)` + font-weight: "bold" !important; +`; + +const docs = { + Python: "https://openml.github.io/openml-python", + R: "https://github.com/mlr-org/mlr3oml", + Julia: "https://juliaai.github.io/OpenML.jl/stable/", + Java: "https://docs.openml.org/Java-guide", +}; + +const colab_links = { + Python: + "https://colab.research.google.com/drive/1z5FvwxCz4AMQ67Vzd-AsSd8g5uRxnYDf?usp=sharing", + R: "https://colab.research.google.com/drive/1d3etWoVg9DVGnDdlQIerB9E4tyY29gqZ?usp=sharing", + Julia: + "https://colab.research.google.com/drive/1IKO-U27WbV9H4kMiWWp0yxKtKpNiDZAd?usp=sharing", +}; + +const other_links = { + RUST: "https://github.com/mbillingr/openml-rust", + ".NET": "https://github.com/openml/openml-dotnet", + "Command line": "https://github.com/nok/openml-cli", +}; + +const codeExamples = { + Python: { + Installation: PythonExamples.InstallationExample, + "Query and download data": PythonExamples.DataExample, + "Download tasks, run models locally, publish results (with scikit-learn)": + PythonExamples.RunExample, + "OpenML Benchmarks": PythonExamples.BenchmarkExample, + }, + R: { + Installation: RExamples.InstallationExample, + "Query and download data": RExamples.DataExample, + "Run an mlr3 model locally": RExamples.RunExample, + "OpenML Benchmarks": RExamples.BenchmarkExample, + }, + Julia: { + Installation: JuliaExamples.InstallationExample, + "Query and download data": JuliaExamples.DataExample, + }, + Java: { + Installation: JavaExamples.InstallationExample, + "Query and download data": JavaExamples.DataExample, + "Download tasks, run models locally, publish results (with WEKA)": + JavaExamples.RunExample, + "OpenML Benchmarks": JavaExamples.BenchmarkExample, + }, +}; function APIs() { // When developing, reload i18n resources on page reload @@ -28,13 +161,203 @@ function APIs() { i18n.reloadResources(); } + const [api, setApi] = useState("Python"); + const [open, setOpen] = React.useState(false); + const theme = useTheme(); + const codeTheme = theme.name === "DARK" ? dark : light; + + const CodeCard = (props) => { + const { language, value, title, colab } = props; + return ( +
+ + {title} + + + + + {value} + + + + + {colab && ( + + window.open(colab, "_blank")} + size="large" + > + + + + )} + + { + navigator.clipboard.writeText(value); + setOpen(true); + }} + size="large" + > + + + + +
+ ); + }; + const code = (language) => { + return Object.entries(codeExamples[language]).map(([title, example]) => { + return ( + + ); + }); + }; + const make_other = () => { + return Object.entries(other_links).map(([title, link]) => { + return ( + + + + ); + }); + }; + Object.entries(other_links).map(([title, link]) => { + return ( + + + + ); + }); return ( - - - - APIs - + + setApi(event.target.textContent)} + variant="scrollable" + scrollButtons="auto" + textColor="secondary" + indicatorColor="secondary" + > + + + + + + + + + {api === "REST" ? ( + + + + ) : api !== "Others" ? ( + + + {api} API + + + + + Full Documentation + + + {code(api)} + + You are learning fast, young apprentice! + {"\u00A0\u00A0"} + + {"\u00A0\u00A0"} + Still, there is so much more to see... + + + + + See the complete guide + + + + ) : ( + + + Other APIs + + + + These are all APIs developed and maintained independently by + others. As such, we can't offer any guarantees, but hope they + might be useful to you. + {make_other()} + + + + )} + + setOpen(false)} + /> ); } diff --git a/app/src/pages/contribute.js b/app/src/pages/contribute.js index 56813d0c..6e1f8ce5 100644 --- a/app/src/pages/contribute.js +++ b/app/src/pages/contribute.js @@ -91,7 +91,7 @@ const Typography = styled(MuiTypography)(spacing); const ContactButton = styled(Fab)` margin: 0; - top: 85; + top: 85px; bottom: auto; left: auto; position: fixed;