Skip to content

Commit

Permalink
[SN-73/98] Added workflow status filter to export_data notebook for p…
Browse files Browse the repository at this point in the history
…rojects (#1461)
  • Loading branch information
Gabefire authored Mar 7, 2024
1 parent f7e5c66 commit 7df06ca
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions examples/exports/export_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"- `label_created_at`\n",
"- `data_row_ids`\n",
"- `batch_ids`\n",
"- `workflow_status`\n",
"\n",
"#### Filter details\n",
"You can set the range for `last_activity_at` and `label_created_at` in the following formats: \n",
Expand All @@ -109,9 +110,16 @@
"\n",
"The `last_activity_at` filter captures the creation and modification of labels, metadata, workflow status, comments, and reviews.\n",
"\n",
"If you wish to specify data rows to export, uncomment the `data_row_ids` filter and provide a list of applicable IDs. The data rows must be part of a batch attached to the project in question. You can provide up to 2,000 data row IDs.\n",
"If you wish to specify data rows to export, uncomment the `data_row_ids` or `global_keys` filter and provide a list of applicable IDs. The data rows must be part of a batch attached to the project in question. You can provide up to 2,000 data row IDs.\n",
"\n",
"The `batch_ids` filter allows you to specify data rows for export based on their associated batch ID. This is particularly useful when `data_row_ids` is not sufficient due to 2,000 data row IDs limit. "
"The `batch_ids` filter allows you to specify data rows for export based on their associated batch ID. This is particularly useful when `data_row_ids` is not sufficient due to 2,000 data row IDs limit. \n",
"\n",
"\n",
"The `workflow_status` filter allows you to specify data rows in a given work flow step. This filter only accepts one value. For example, `filters = {\"workflow_status\": \"InReview\"}`. The filer accepts the following:\n",
"- `ToLabel`\n",
"- `InReview`\n",
"- `InRework`\n",
"- `Done`\n"
],
"cell_type": "markdown"
},
Expand Down Expand Up @@ -151,8 +159,10 @@
"filters= {\n",
" \"last_activity_at\": [\"2000-01-01 00:00:00\", \"2050-01-01 00:00:00\"],\n",
" \"label_created_at\": [\"2000-01-01 00:00:00\", \"2050-01-01 00:00:00\"],\n",
" # \"global_keys\": [\"<global_key>\", \"<global_key>\"],\n",
" # \"data_row_ids\": [\"<data_row_id>\", \"<data_row_id>\"],\n",
" # \"batch_ids\": [\"<batch_id>\", \"<batch_id>\"],\n",
" # \"workflow_status\": \"<workflow_status>\"\n",
"}\n",
"\n",
"export_task = project.export_v2(params=export_params, filters=filters)\n",
Expand Down Expand Up @@ -195,8 +205,10 @@
"filters= {\n",
" \"last_activity_at\": [\"2000-01-01 00:00:00\", \"2050-01-01 00:00:00\"],\n",
" \"label_created_at\": [\"2000-01-01 00:00:00\", \"2050-01-01 00:00:00\"],\n",
" # \"global_keys\": [\"<global_key>\", \"<global_key>\"],\n",
" # \"data_row_ids\": [\"<data_row_id>\", \"<data_row_id>\"],\n",
" # \"batch_ids\": [\"<batch_id>\", \"<batch_id>\"],\n",
" # \"workflow_status\": \"<workflow_status>\"\n",
"}\n",
"\n",
"client.enable_experimental = True\n",
Expand Down Expand Up @@ -284,10 +296,11 @@
" - Accepts a list of model run IDs. If provided, the labels and predicitions created _in these model runs_ will be included. \n",
"\n",
"### Filters\n",
"When you export data rows from a project, you can specify the included data rows with the following filters:\n",
"When you export data rows from a dataset, you can specify the included data rows with the following filters:\n",
"- `last_activity_at`\n",
"- `label_created_at`\n",
"- `data_row_ids`\n",
"- `global_keys`\n",
"\n",
"See the _Export data rows from a project_ section above for additional details on each filter. "
],
Expand Down Expand Up @@ -329,7 +342,10 @@
"\n",
"# Note: Filters follow AND logic, so typically using one filter is sufficient.\n",
"filters= {\n",
" \"last_activity_at\": [\"2000-01-01 00:00:00\", \"2050-01-01 00:00:00\"]\n",
" \"last_activity_at\": [\"2000-01-01 00:00:00\", \"2050-01-01 00:00:00\"],\n",
" \"label_created_at\": [\"2000-01-01 00:00:00\", \"2050-01-01 00:00:00\"],\n",
" # \"global_keys\": [\"<global_key>\", \"<global_key>\"],\n",
" # \"data_row_ids\": [\"<data_row_id>\", \"<data_row_id>\"],\n",
"}\n",
"\n",
"export_task = dataset.export_v2(params=export_params, filters=filters)\n",
Expand Down Expand Up @@ -372,7 +388,10 @@
"\n",
"# Note: Filters follow AND logic, so typically using one filter is sufficient.\n",
"filters= {\n",
" \"last_activity_at\": [\"2000-01-01 00:00:00\", \"2050-01-01 00:00:00\"]\n",
" \"last_activity_at\": [\"2000-01-01 00:00:00\", \"2050-01-01 00:00:00\"],\n",
" \"label_created_at\": [\"2000-01-01 00:00:00\", \"2050-01-01 00:00:00\"],\n",
" # \"global_keys\": [\"<global_key>\", \"<global_key>\"],\n",
" # \"data_row_ids\": [\"<data_row_id>\", \"<data_row_id>\"],\n",
"}\n",
"\n",
"client.enable_experimental = True\n",
Expand Down

0 comments on commit 7df06ca

Please sign in to comment.