From 7df06cae4e7d76265d0f6d26dec6a6c2c00d766f Mon Sep 17 00:00:00 2001 From: Gabe <33893811+Gabefire@users.noreply.github.com> Date: Thu, 7 Mar 2024 13:53:27 -0600 Subject: [PATCH] [SN-73/98] Added workflow status filter to export_data notebook for projects (#1461) --- examples/exports/export_data.ipynb | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/examples/exports/export_data.ipynb b/examples/exports/export_data.ipynb index d26cedacf..602a160e9 100644 --- a/examples/exports/export_data.ipynb +++ b/examples/exports/export_data.ipynb @@ -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", @@ -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" }, @@ -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\": [\"\", \"\"],\n", " # \"data_row_ids\": [\"\", \"\"],\n", " # \"batch_ids\": [\"\", \"\"],\n", + " # \"workflow_status\": \"\"\n", "}\n", "\n", "export_task = project.export_v2(params=export_params, filters=filters)\n", @@ -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\": [\"\", \"\"],\n", " # \"data_row_ids\": [\"\", \"\"],\n", " # \"batch_ids\": [\"\", \"\"],\n", + " # \"workflow_status\": \"\"\n", "}\n", "\n", "client.enable_experimental = True\n", @@ -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. " ], @@ -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\": [\"\", \"\"],\n", + " # \"data_row_ids\": [\"\", \"\"],\n", "}\n", "\n", "export_task = dataset.export_v2(params=export_params, filters=filters)\n", @@ -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\": [\"\", \"\"],\n", + " # \"data_row_ids\": [\"\", \"\"],\n", "}\n", "\n", "client.enable_experimental = True\n",