Skip to content

Commit c511d7e

Browse files
feat(LAB-3743): disallow copying LLM projects
1 parent 207a687 commit c511d7e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/kili/services/copy_project/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from kili.adapters.kili_api_gateway.project.types import CopyProjectInput
1010
from kili.domain.asset import AssetFilters
1111
from kili.domain.label import LabelFilters
12-
from kili.domain.project import ProjectId
12+
from kili.domain.project import InputTypeEnum, ProjectId
1313

1414
if TYPE_CHECKING:
1515
from kili.client import Kili
@@ -67,6 +67,15 @@ def copy_project( # pylint: disable=too-many-arguments
6767
if src_project["dataConnections"] and copy_assets:
6868
raise NotImplementedError("Copying projects with cloud storage is not supported.")
6969

70+
if src_project["inputType"] in [
71+
InputTypeEnum.LLM_INSTR_FOLLOWING,
72+
InputTypeEnum.LLM_RLHF,
73+
InputTypeEnum.LLM_STATIC,
74+
]:
75+
raise NotImplementedError(
76+
f"Copying projects with input type {src_project['inputType']} is not supported."
77+
)
78+
7079
logger.info("Copying new project...")
7180

7281
new_project_id = self.kili.kili_api_gateway.copy_project(

0 commit comments

Comments
 (0)