Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into fb-dia-1715
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-bernstein committed Jan 9, 2025
2 parents 46f7168 + 8f0a54e commit 773931c
Show file tree
Hide file tree
Showing 41 changed files with 89 additions and 247 deletions.
1 change: 1 addition & 0 deletions docs/source/tags/taxonomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Use with the following data types: audio, image, HTML, paragraphs, text, time se
| [placeholder=] | <code>string</code> | | What to display as prompt on the input |
| [perRegion] | <code>boolean</code> | | Use this tag to classify specific regions instead of the whole object |
| [perItem] | <code>boolean</code> | | Use this tag to classify specific items inside the object instead of the whole object |
| [labeling] | <code>boolean</code> | | Use taxonomy to label regions in text. Only supported with <Text> and <HyperText> object tags. |
| [legacy] | <code>boolean</code> | | Use this tag to enable the legacy version of the Taxonomy tag. The legacy version supports the ability for annotators to add labels as needed. However, when true, the `apiUrl` parameter is not usable. |

### Example
Expand Down
11 changes: 11 additions & 0 deletions docs/source/templates/taxonomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ In both options, the following tags are required:
<Taxonomy name="taxonomy" toName="text">
```

## Taxonomy as a labeling tool

Typically, the `<Taxonomy>` tag is used to perform classification tasks. However, if you set `labeling="true"`, you can apply your taxonomy choices to regions within text. This can be especially useful for NER projects.

Note that the `labeling` parameter is only supported when using `<Text> `or `<HyperText>` object tags.

![Screenshot of taxonomy as NER](/images/templates-misc/taxonomy_ner.png)

!!! info Tip
You can use the `color` parameter on your taxonomy [`<Choice>`](/tags/choice) to color-code selected regions within the text.

## Taxonomies defined using nested `Choice` tags

Use the [`Choice`](/tags/choice.html) tag to specify the taxonomy. Nest choices under [`Choice`](/tags/choice.html) tags to create layers in the taxonomy.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 0 additions & 7 deletions label_studio/core/feature_flags/stale_feature_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,12 @@
'fflag_fix_font_lsdv_1148_hotkeys_namespaces_01022023_short': True,
'fflag_fix_back_lsdv_1044_check_annotations_24012023_short': False,
'fflag_fix_front_dev_4075_taxonomy_overlap_281222_short': True,
'fflag_fix_front_dev_3730_shortcuts_initial_input_22122022_short': True,
'ff_back_dev_3865_filters_anno_171222_short': True,
'fflag_feat_front_dev_3873_labeling_ui_improvements_short': True,
'fflag_feat_back_dev_3756_queue_enrollment_min_short': False,
'fflag_fix_front_dev_3666_max_usages_on_region_creation_171122_short': True,
'fflag_fix_front_dev_3617_taxonomy_memory_leaks_fix': True,
'fflag_fix_front_dev_3350_restrict_drawing_area_short': True,
'fflag_feat_front_dev_2461_audio_paragraphs_seek_chunk_position_short': True,
'ff_front_dev_2432_auto_save_polygon_draft_210622_short': True,
'ff_front_dev_2575_projects_list_performance_280622_short': True,
'ff_front_dev_2431_delete_polygon_points_080622_short': True,
'ff_front_dev_2290_draft_in_annotation_history_short': True,
'ff_dev_2128_html_in_labels_150422_short': True,
'ff_front_dev_1495_avatar_mess_210122_short': True,
'ff_front_1170_outliner_030222_short': True,
'fflag_fix_front_lsdv_4620_memory_leaks_100723_short': False,
Expand Down
81 changes: 0 additions & 81 deletions label_studio/feature_flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,33 +190,6 @@
"version": 3,
"deleted": false
},
"ff_back_2070_inner_id_12052022_short": {
"key": "ff_back_2070_inner_id_12052022_short",
"on": true,
"prerequisites": [],
"targets": [],
"contextTargets": [],
"rules": [],
"fallthrough": {
"variation": 0
},
"offVariation": 1,
"variations": [
true,
false
],
"clientSideAvailability": {
"usingMobileKey": false,
"usingEnvironmentId": false
},
"clientSide": false,
"salt": "86d9f39cea98459ab04d7ed9c01a1752",
"trackEvents": false,
"trackEventsFallthrough": false,
"debugEventsUntilDate": null,
"version": 4,
"deleted": false
},
"ff_back_2884_comments_notifications_02092022_short": {
"key": "ff_back_2884_comments_notifications_02092022_short",
"on": false,
Expand Down Expand Up @@ -1081,33 +1054,6 @@
"version": 2,
"deleted": false
},
"fflag-feat-front-dev-2982-label-weights-settings": {
"key": "fflag-feat-front-dev-2982-label-weights-settings",
"on": true,
"prerequisites": [],
"targets": [],
"contextTargets": [],
"rules": [],
"fallthrough": {
"variation": 0
},
"offVariation": 1,
"variations": [
true,
false
],
"clientSideAvailability": {
"usingMobileKey": false,
"usingEnvironmentId": false
},
"clientSide": false,
"salt": "87124bd5b0b54930aa35f693be93d3aa",
"trackEvents": false,
"trackEventsFallthrough": false,
"debugEventsUntilDate": null,
"version": 3,
"deleted": false
},
"fflag-feat-front-dev-3051-trial-experience": {
"key": "fflag-feat-front-dev-3051-trial-experience",
"on": false,
Expand Down Expand Up @@ -2148,33 +2094,6 @@
"version": 3,
"deleted": false
},
"fflag_feat_front_dev_2984_dm_draggable_columns_short": {
"key": "fflag_feat_front_dev_2984_dm_draggable_columns_short",
"on": true,
"prerequisites": [],
"targets": [],
"contextTargets": [],
"rules": [],
"fallthrough": {
"variation": 0
},
"offVariation": 1,
"variations": [
true,
false
],
"clientSideAvailability": {
"usingMobileKey": false,
"usingEnvironmentId": false
},
"clientSide": false,
"salt": "69f38a9b776d4c8fa453b2dbea7017a2",
"trackEvents": false,
"trackEventsFallthrough": false,
"debugEventsUntilDate": null,
"version": 4,
"deleted": false
},
"fflag_feat_front_dev_3051_trial_experience_short": {
"key": "fflag_feat_front_dev_3051_trial_experience_short",
"on": false,
Expand Down
9 changes: 6 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ django-migration-linter = "^5.1.0"
setuptools = ">=75.4.0"

# Humansignal repo dependencies
label-studio-sdk = {url = "https://github.com/HumanSignal/label-studio-sdk/archive/b1bee60ddc416f3519ecce45337a41cf442534af.zip"}
label-studio-sdk = {url = "https://github.com/HumanSignal/label-studio-sdk/archive/250af500905b654b208741cc9d6b34ba3b4c28a0.zip"}

[tool.poetry.group.test.dependencies]
pytest = "7.2.2"
Expand Down
31 changes: 12 additions & 19 deletions web/apps/labelstudio/src/pages/Projects/Projects.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { ApiContext } from "../../providers/ApiProvider";
import { useContextProps } from "../../providers/RoutesProvider";
import { useAbortController } from "../../hooks/useAbortController";
import { Block, Elem } from "../../utils/bem";
import { FF_DEV_2575, isFF } from "../../utils/feature-flags";
import { CreateProject } from "../CreateProject/CreateProject";
import { DataManagerPage } from "../DataManager/DataManager";
import { SettingsPage } from "../Settings";
Expand Down Expand Up @@ -41,33 +40,27 @@ export const ProjectsPage = () => {

const requestParams = { page, page_size: pageSize };

if (isFF(FF_DEV_2575)) {
requestParams.include = [
"id",
"title",
"created_by",
"created_at",
"color",
"is_published",
"assignment_settings",
].join(",");
}
requestParams.include = [
"id",
"title",
"created_by",
"created_at",
"color",
"is_published",
"assignment_settings",
].join(",");

const data = await api.callApi("projects", {
params: requestParams,
...(isFF(FF_DEV_2575)
? {
signal: abortController.controller.current.signal,
errorFilter: (e) => e.error.includes("aborted"),
}
: null),
signal: abortController.controller.current.signal,
errorFilter: (e) => e.error.includes("aborted"),
});

setTotalItems(data?.count ?? 1);
setProjectsList(data.results ?? []);
setNetworkState("loaded");

if (isFF(FF_DEV_2575) && data?.results?.length) {
if (data?.results?.length) {
const additionalData = await api.callApi("projects", {
params: {
ids: data?.results?.map(({ id }) => id).join(","),
Expand Down
2 changes: 0 additions & 2 deletions web/apps/labelstudio/src/utils/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export const FF_DEV_1495 = "ff_front_dev_1495_avatar_mess_210122_short";
export const FF_DEV_1658 = "ff_front_dev_1658_notification_center_170222_short";
// Model version selector per model backend
export const FF_DEV_1682 = "ff_front_dev_1682_model_version_dropdown_070622_short";
// Project list performance improvements
export const FF_DEV_2575 = "ff_front_dev_2575_projects_list_performance_280622_short";

/**
* Addresses the memory leak issue in Taxonomy with Repeater
Expand Down
1 change: 0 additions & 1 deletion web/dist/apps/labelstudio/139.css.map

This file was deleted.

1 change: 0 additions & 1 deletion web/dist/apps/labelstudio/139.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion web/dist/apps/labelstudio/543.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/dist/apps/labelstudio/543.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/dist/apps/labelstudio/543.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/dist/apps/labelstudio/543.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web/dist/apps/labelstudio/709.css.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web/dist/apps/labelstudio/709.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/dist/apps/labelstudio/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/dist/apps/labelstudio/main.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 773931c

Please sign in to comment.