Perfect, this seems to do what I was looking for, thanks a lot! š
Would it also be possible to query based on
multiple
user properties
multiple key/value I think are currently not that easy to query,
but multiple tags are quite easy to do
tags=["__$all", "tag1", "tag2],
Hi @<1523704152130064384:profile|SmallGiraffe94>
Yes it is possible!
set the User Properties of a dataset when creating a Dataset with
A bit hackish but should work.
dataset = Dataset.create(dataset_project="project", dataset_name="name")
dataset._task.set_user_properties(key="value")
dataset_ids = Task.query_tasks(
project_name=["project/.datasets/name"],
task_filter=dict(
type=[str(Task.TaskTypes.data_processing)],
exact_match_regex_flag=False,
search_hidden=True,
_allow_extra_fields_=True,
_all_=dict(fields=['hyperparams.properties.key.value'], pattern="^value$"),
order_by=['-created'],
)
)
dataset.get(dataset_id=dataset_ids[0])
Maybe this should be incorporated into the top level interface? What is the use case?
Would tags make more sense ?
Would it also be possible to query based on multiple user properties / tags? (So for example, only matching datasets that have key_1="value_1"
and key_2="value_2"
properties / "value_1"
and "value_2"
tags)
If I set a list of tags for query_tasks()
, all dataset Ids with any of the tags are matched, not with all of the tags (contrary to what is stated in the docstring of query_task
).