Skip to content

Commit 7874f60

Browse files
committed
Merge branch 'dev'
2 parents 201b139 + d77c487 commit 7874f60

File tree

6 files changed

+313
-35
lines changed

6 files changed

+313
-35
lines changed

md-docs/api/python/client.md

Lines changed: 173 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,53 @@ Empty values will not be updated.
126126

127127
`UpdateCompanyException`
128128

129+
### .get_all_company_subscription_plans
130+
```python
131+
.get_all_company_subscription_plans()
132+
```
133+
134+
---
135+
Returns all subscription plans associated with the user company.
136+
137+
**Allowed Roles**
138+
139+
- `COMPANY_OWNER`
140+
- `COMPANY_ADMIN`
141+
142+
143+
**Returns**
144+
145+
* **subscription_plan_list** : `List[SubscriptionPlanInfo]`
146+
147+
148+
**Raises**
149+
150+
`SDKClientException`
151+
152+
### .get_active_subscription_plan
153+
```python
154+
.get_active_subscription_plan()
155+
```
156+
157+
---
158+
Returns the current active subscription plan associated with the user
159+
company. Returns None if no active subscription plan found.
160+
161+
**Allowed Roles**
162+
163+
- `COMPANY_OWNER`
164+
- `COMPANY_ADMIN`
165+
166+
167+
**Returns**
168+
169+
* **subscription_plan** : `SubscriptionPlanInfo | None`
170+
171+
172+
**Raises**
173+
174+
`SDKClientException`
175+
129176
### .create_project
130177
```python
131178
.create_project(
@@ -269,7 +316,8 @@ Project ID Name
269316
project_id: str, name: str, tags: list[str], task_type: TaskType,
270317
data_structure: DataStructure, cost_info: (TaskCostInfoUnion|None) = None,
271318
optional_target: bool = False, text_language: (TextLanguage|None) = None,
272-
positive_class: (str|int|bool|None) = None
319+
positive_class: (str|int|bool|None) = None,
320+
rag_contexts_separator: (str|None) = None
273321
)
274322
```
275323

@@ -300,6 +348,8 @@ Create a task inside the project.
300348
language used in the task.
301349
* **positive_class** : required for binary classification tasks,
302350
it specifies the positive class of the target.
351+
* **rag_contexts_separator** : Separator used to separate rag contexts
352+
from different sources. If missing then only one source exists.
303353

304354

305355
**Returns**
@@ -1329,6 +1379,98 @@ the retraining report
13291379

13301380
`GetRetrainingReportException`
13311381

1382+
### .compute_rag_evaluation_report
1383+
```python
1384+
.compute_rag_evaluation_report(
1385+
task_id: str, report_name: str, from_timestamp: float, to_timestamp: float
1386+
)
1387+
```
1388+
1389+
---
1390+
Compute the RAG evaluation report for a given task.
1391+
1392+
This request starts an operation pipeline that is
1393+
executed by ML cube Platform.
1394+
Thus, the method returns the identifier of the job that you can
1395+
monitor to know its status and proceed with the other work
1396+
using the method `wait_job_completion(job_id)`
1397+
1398+
**Allowed Roles:**
1399+
- At least `PROJECT_EDIT` for that project
1400+
- `COMPANY_OWNER`
1401+
- `COMPANY_ADMIN`
1402+
1403+
1404+
**Args**
1405+
1406+
* **task_id** : the identifier of the task
1407+
* **report_name** : the name of the report
1408+
* **from_timestamp** : start timestamp of the samples to evaluate
1409+
* **to_timestamp** : end timestamp of the samples to evaluate
1410+
1411+
1412+
**Returns**
1413+
1414+
* **job_id** : `str` identifier of the submitted job
1415+
1416+
1417+
**Raises**
1418+
1419+
ComputeRagEvaluationReportException
1420+
1421+
### .get_rag_evaluation_reports
1422+
```python
1423+
.get_rag_evaluation_reports(
1424+
task_id: str
1425+
)
1426+
```
1427+
1428+
---
1429+
For a given task id, get the computed RAG evaluation reports.
1430+
1431+
**Allowed Roles:**
1432+
- At least `PROJECT_VIEW` for that project
1433+
- `COMPANY_OWNER`
1434+
- `COMPANY_ADMIN`
1435+
1436+
1437+
**Args**
1438+
1439+
* **task_id** : the identifier of the task
1440+
1441+
1442+
**Returns**
1443+
1444+
* **rag_eval_reports** : list[TaskRagEvalReportItem]
1445+
1446+
1447+
### .export_rag_evaluation_report
1448+
```python
1449+
.export_rag_evaluation_report(
1450+
report_id: str, folder: str, file_name: str
1451+
)
1452+
```
1453+
1454+
---
1455+
Export a RAG evaluation report to a file.
1456+
1457+
**Allowed Roles:**
1458+
- At least `PROJECT_VIEW` for that project
1459+
- `COMPANY_OWNER`
1460+
- `COMPANY_ADMIN`
1461+
1462+
1463+
**Args**
1464+
1465+
* **report_id** : the identifier of the report
1466+
* **folder** : the folder where the report will be saved
1467+
* **file_name** : the name of the file where the report will be saved
1468+
1469+
1470+
**Returns**
1471+
1472+
None
1473+
13321474
### .get_monitoring_status
13331475
```python
13341476
.get_monitoring_status(
@@ -1548,14 +1690,41 @@ Get a detection event rule by id.
15481690
* **rule** : `DetectionEventRule`
15491691

15501692

1693+
**Raises**
1694+
1695+
`SDKClientException`
1696+
1697+
### .set_detection_event_user_feedback
1698+
```python
1699+
.set_detection_event_user_feedback(
1700+
detection_id: str, user_feedback: bool
1701+
)
1702+
```
1703+
1704+
---
1705+
Get a detection event rule by id.
1706+
1707+
**Allowed Roles:**
1708+
1709+
- At least `WORK_ON_PROJECT` for that project
1710+
- `COMPANY_OWNER`
1711+
- `COMPANY_ADMIN`
1712+
1713+
1714+
**Args**
1715+
1716+
* **detection_id** : id of the detection event
1717+
* **user_feedback** : user feedback
1718+
1719+
15511720
**Raises**
15521721

15531722
`SDKClientException`
15541723

15551724
### .create_detection_event_rule
15561725
```python
15571726
.create_detection_event_rule(
1558-
name: str, task_id: str, severity: DetectionEventSeverity,
1727+
name: str, task_id: str, severity: (DetectionEventSeverity|None),
15591728
detection_event_type: DetectionEventType, monitoring_target: MonitoringTarget,
15601729
actions: list[DetectionEventAction],
15611730
monitoring_metric: (MonitoringMetric|None) = None, model_name: (str|None) = None
@@ -1587,7 +1756,8 @@ Create a detection event rule.
15871756
* **monitoring_metric** : additional metric extracted from
15881757
monitoring target that is monitored
15891758
* **severity** : the level of severity of the detection event
1590-
that this rule should respond to.
1759+
that this rule should respond to. None means any
1760+
severity is matched.
15911761
* **actions** : the list of actions to execute, in order,
15921762
when the conditions of the rule are matched.
15931763

md-docs/api/python/enums.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,24 @@ MonitoringTarget()
295295
----
296296

297297

298+
## ProductKeyStatus
299+
```python
300+
ProductKeyStatus()
301+
```
302+
303+
304+
---
305+
Status of a product key
306+
307+
Fields
308+
------
309+
NEW = generated but not yet used product key
310+
VALIDATING = validation requested from client
311+
IN_USE = validated product key, client activated
312+
313+
----
314+
315+
298316
## RetrainTriggerType
299317
```python
300318
RetrainTriggerType()
@@ -340,6 +358,23 @@ StoringDataType()
340358
----
341359

342360

361+
## SubscriptionType
362+
```python
363+
SubscriptionType()
364+
```
365+
366+
367+
---
368+
Type of subscription plan of a company
369+
370+
Fields
371+
------
372+
CLOUD: subscription plan for web app or sdk access
373+
EDGE: subscription plan for edge deployment
374+
375+
----
376+
377+
343378
## SuggestionType
344379
```python
345380
SuggestionType()

md-docs/api/python/exceptions.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,18 @@ AddTargetDataException
6161
----
6262

6363

64+
## ComputeRagEvaluationReportException
65+
```python
66+
ComputeRagEvaluationReportException()
67+
```
68+
69+
70+
---
71+
ComputeRagEvaluationReportException
72+
73+
----
74+
75+
6476
## ComputeRetrainingReportException
6577
```python
6678
ComputeRetrainingReportException()
@@ -145,6 +157,18 @@ CreateTaskException
145157
----
146158

147159

160+
## GetRagEvaluationReportException
161+
```python
162+
GetRagEvaluationReportException()
163+
```
164+
165+
166+
---
167+
GetRagEvaluationReportException
168+
169+
----
170+
171+
148172
## GetRetrainingReportException
149173
```python
150174
GetRetrainingReportException()

md-docs/api/python/models.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ An event created during the detection process.
285285
* **model_id** : Optional[str]
286286
* **model_name** : Optional[str]
287287
* **model_version** : Optional[str]
288+
* **user_feedback** : Optional[bool]
288289

289290

290291
----
@@ -926,6 +927,39 @@ type = DetectionEventActionType.SLACK_NOTIFICATION
926927
----
927928

928929

930+
## SubscriptionPlanInfo
931+
```python
932+
SubscriptionPlanInfo()
933+
```
934+
935+
936+
---
937+
Data model for a subscription plan
938+
Permission limit set to None means no limit is set
939+
Expiration date set to None means no expiration is set
940+
Product key data are set only if a product key is associated to the
941+
subscription plan
942+
943+
944+
**Attributes**
945+
946+
* **subscription_id** : str
947+
* **type** : SubscriptionType
948+
* **max_tasks** : int | None
949+
* **max_users** : int | None
950+
* **monitoring** : bool
951+
* **explainability** : bool
952+
* **retraining** : bool
953+
* **is_active** : bool
954+
* **start_date** : date
955+
* **expiration_date** : date | None
956+
* **product_key** : str | None
957+
* **product_key_status** : ProductKeyStatus | None
958+
959+
960+
----
961+
962+
929963
## Suggestion
930964
```python
931965
Suggestion()
@@ -1012,6 +1046,16 @@ regression in terms of business costs due to errors
10121046
----
10131047

10141048

1049+
## TaskRagEvalReportItem
1050+
```python
1051+
TaskRagEvalReportItem()
1052+
```
1053+
1054+
1055+
1056+
----
1057+
1058+
10151059
## TeamsNotificationAction
10161060
```python
10171061
TeamsNotificationAction()

0 commit comments

Comments
 (0)