Skip to content

Commit b5f84a9

Browse files
baptiste-olivierNicolas Hervé
authored andcommitted
refactor: remove LLM_RLHF exports with kili.export_labels
1 parent f037f77 commit b5f84a9

File tree

11 files changed

+4
-1292
lines changed

11 files changed

+4
-1292
lines changed

src/kili/presentation/client/label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ def is_rectangle(coco_annotation, coco_image, kili_annotation):
12411241
self, # pyright: ignore[reportGeneralTypeIssues]
12421242
asset_ids=resolved_asset_ids,
12431243
project_id=ProjectId(project_id),
1244-
export_type="normal" if fmt == "llm_v1" else "latest",
1244+
export_type="latest",
12451245
label_format=fmt,
12461246
split_option=layout,
12471247
single_file=single_file,

src/kili/services/export/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from kili.services.export.format.coco import CocoExporter
1212
from kili.services.export.format.geojson import GeoJsonExporter
1313
from kili.services.export.format.kili import KiliExporter
14-
from kili.services.export.format.llm import LLMExporter
1514
from kili.services.export.format.voc import VocExporter
1615
from kili.services.export.format.yolo import YoloExporter
1716
from kili.services.export.logger import get_logger
@@ -45,9 +44,7 @@ def export_labels( # pylint: disable=too-many-arguments, too-many-locals
4544
kili.kili_api_gateway.get_project(project_id, ["id"])
4645

4746
include_sent_back_labels = (
48-
include_sent_back_labels
49-
if include_sent_back_labels is not None
50-
else (label_format != "llm_v1")
47+
include_sent_back_labels if include_sent_back_labels is not None else True
5148
)
5249

5350
export_params = ExportParams(
@@ -81,8 +78,6 @@ def export_labels( # pylint: disable=too-many-arguments, too-many-locals
8178
"yolo_v8": YoloExporter,
8279
"pascal_voc": VocExporter,
8380
"geojson": GeoJsonExporter,
84-
"llm_v1": LLMExporter,
85-
"llm_dynamic_v1": LLMExporter,
8681
}
8782
assert set(format_exporter_selector_mapping.keys()) == set(
8883
get_args(LabelFormat)

src/kili/services/export/format/base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from abc import ABC, abstractmethod
88
from datetime import datetime
99
from pathlib import Path
10-
from typing import TYPE_CHECKING, Dict, List, Literal, NamedTuple, Optional, Tuple, Union
10+
from typing import TYPE_CHECKING, Dict, List, NamedTuple, Optional, Tuple, Union
1111

1212
from kili_formats.types import Job
1313

@@ -32,8 +32,6 @@
3232
if TYPE_CHECKING:
3333
from kili.client import Kili
3434

35-
InputType = Literal["IMAGE", "LLM_INSTR_FOLLOWING", "LLM_RLHF", "PDF", "TEXT", "VIDEO"]
36-
3735

3836
class ExportParams(NamedTuple):
3937
"""Contains all parameters that change the result of the export."""

src/kili/services/export/format/llm/__init__.py

Lines changed: 0 additions & 287 deletions
This file was deleted.

src/kili/services/export/format/llm/types.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/kili/services/export/types.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
"coco",
1515
"pascal_voc",
1616
"geojson",
17-
"llm_v1",
18-
"llm_dynamic_v1",
1917
]
2018

2119

tests/unit/llm/services/export/test_llm_dynamic_export.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pytest
22

33
from kili.llm.presentation.client.llm import LlmClientMethods
4-
from tests.unit.services.export.test_llm import expected_export
54

65
mock_json_interface = {
76
"jobs": {

tests/unit/llm/services/export/test_llm_static_export.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pytest
22

33
from kili.llm.presentation.client.llm import LlmClientMethods
4-
from tests.unit.services.export.test_llm import expected_export
54

65
mock_json_interface = {
76
"jobs": {

0 commit comments

Comments
 (0)