Skip to content

tagging for other stuff - #356

Merged
mfeurer merged 8 commits into
openml:developfrom
amueller:task_tagging
Oct 13, 2017
Merged

mfeurer merged 8 commits into
openml:developfrom
amueller:task_tagging

Conversation

@amueller

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread openml/tasks/task.py Outdated
return self.split.repeats, self.split.folds, self.split.samples

def push_tag(self, tag):
"""Annotates this flow with a tag on the server.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be `Annotates thi task``, right?

Comment thread openml/tasks/task.py Outdated
Parameters
----------
tag : str
Tag to attach to the flow.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Comment thread openml/tasks/task.py Outdated
Tag to attach to the flow.
"""
data = {'flow_id': self.flow_id, 'tag': tag}
_perform_api_call("/flow/tag", data=data)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Comment thread openml/tasks/task.py Outdated
tag : str
Tag to attach to the flow.
"""
data = {'flow_id': self.flow_id, 'tag': tag}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Comment thread openml/tasks/task.py Outdated
_perform_api_call("/flow/tag", data=data)

def remove_tag(self, tag):
"""Removes a tag from this flow on the server.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Comment thread openml/tasks/task.py Outdated
Parameters
----------
tag : str
Tag to attach to the flow.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Comment thread openml/tasks/task.py Outdated
tag : str
Tag to attach to the flow.
"""
data = {'flow_id': self.flow_id, 'tag': tag}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Comment thread openml/tasks/task.py Outdated
Tag to attach to the flow.
"""
data = {'flow_id': self.flow_id, 'tag': tag}
_perform_api_call("/flow/untag", data=data)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like I missed one search and replace.

Comment thread tests/test_flows/test_flow.py Outdated
self.assertEqual(len(subflow_3.components), 0)

def test_tagging(self):
flow = openml.flows.get_flow(4024)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's dangerous. If the server is purged, this flow will no longer exist. Maybe you should just query the server for a flow and take the first.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flow is used in another test, which is why I selected it ;) We can have the setup query for a flow and then use that everywhere, though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though the server was purged and it didn't fail, right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that flow is loaded from the production server.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Querying for a flow would be better.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol it's actually using the production server in the other test...

@amueller

Copy link
Copy Markdown
Contributor Author

should be good now

@mfeurer
mfeurer merged commit 08c9cf6 into openml:develop Oct 13, 2017
@mfeurer mfeurer mentioned this pull request Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants