-
-
Notifications
You must be signed in to change notification settings - Fork 270
Add feature description PR #1313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f63d717
adds ontology functionality
janvanrijn 3c5cf6a
adds feature description
janvanrijn 95a51ff
updates functions
janvanrijn 6b10d34
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 911e9fc
updates to ontology pr
janvanrijn 18f10a7
updates to ontology pr
janvanrijn 559a874
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] af57407
Update openml/datasets/functions.py
LennartPurucker dc9408d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
- Loading branch information
commit 6b10d34e4e3f46d71ca4ef0548df7b989bbcd9f0
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1081,44 +1081,35 @@ def data_feature_add_ontology(data_id, index, ontology): | |
| ------- | ||
| True or throws an OpenML server exception | ||
| """ | ||
| upload_data = { | ||
| 'data_id': data_id, | ||
| 'index': index, | ||
| 'ontology': ontology | ||
| } | ||
| upload_data = {"data_id": data_id, "index": index, "ontology": ontology} | ||
| openml._api_calls._perform_api_call("data/feature/ontology/add", "post", data=upload_data) | ||
| # an error will be thrown in case the request was unsuccessful | ||
| return True | ||
|
|
||
|
|
||
| def data_feature_remove_ontology(data_id, index, ontology): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add typing |
||
| """ | ||
| Removes an existing ontology (URL) to a given dataset feature (defined | ||
| by a dataset id and index). The dataset has to exists on OpenML and needs | ||
| to have been processed by the evaluation engine. Ontology needs to be | ||
| attached to the specific fearure. | ||
| Removes an existing ontology (URL) to a given dataset feature (defined | ||
|
LennartPurucker marked this conversation as resolved.
Outdated
|
||
| by a dataset id and index). The dataset has to exists on OpenML and needs | ||
| to have been processed by the evaluation engine. Ontology needs to be | ||
| attached to the specific fearure. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| data_id : int | ||
| id of the dataset to which the feature belongs | ||
| Parameters | ||
| ---------- | ||
| data_id : int | ||
| id of the dataset to which the feature belongs | ||
|
|
||
| index : int | ||
| index of the feature in dataset (0-based) | ||
| index : int | ||
| index of the feature in dataset (0-based) | ||
|
|
||
| ontology : str | ||
| URL to ontology (max. 256 characters) | ||
| ontology : str | ||
| URL to ontology (max. 256 characters) | ||
|
|
||
| Returns | ||
| ------- | ||
| True or throws an OpenML server exception | ||
| Returns | ||
| ------- | ||
| True or throws an OpenML server exception | ||
| """ | ||
|
|
||
| upload_data = { | ||
| 'data_id': data_id, | ||
| 'index': index, | ||
| 'ontology': ontology | ||
| } | ||
| upload_data = {"data_id": data_id, "index": index, "ontology": ontology} | ||
| openml._api_calls._perform_api_call("data/feature/ontology/remove", "post", data=upload_data) | ||
| # an error will be thrown in case the request was unsuccessful | ||
| return True | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to have a default value as it is otherwise a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while technically it would make break code, I find it unlikely that people use this constructor outside our library. In the library, I think I have updated all constructors