Skip to content

Commit b5e1d14

Browse files
Update docs
1 parent 13d1391 commit b5e1d14

File tree

1 file changed

+47
-3
lines changed

1 file changed

+47
-3
lines changed

md-docs/api/python/client.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
## ML3PlatformClient
55
```python
66
ML3PlatformClient(
7-
url: str, api_key: str
7+
url: str, api_key: str, timeout: int = 60
88
)
99
```
1010

1111

1212
---
1313
Client class is the single point of interaction with ML cube
1414
Platform APIs, it is initialized providing the `url` and the User
15-
`api_key`.
15+
`api_key`. Optionally, you can specify the `timeout` for the
16+
operations.
1617
Every operation is performed verifying the API Key and the
1718
permissions associated to the User that own that key.
1819

@@ -741,6 +742,43 @@ using the method `wait_job_completion(job_id)`
741742
* **job_id** : `str` job identifier of the pipeline in execution
742743

743744

745+
**Raises**
746+
747+
`UpdateModelVersionException`
748+
749+
### .update_model_version
750+
```python
751+
.update_model_version(
752+
model_id: str, new_model_version: str
753+
)
754+
```
755+
756+
---
757+
Update model version with empty reference data.
758+
It is similar to create model but it does not actually create
759+
a different Model but a new version of the existent one.
760+
After this request, it is possible to upload data with
761+
add_historical_data. To start monitoring is required to set the
762+
reference of this new model with set_reference request.
763+
764+
**Allowed Roles:**
765+
766+
- At least `PROJECT_EDIT` for that project
767+
- `COMPANY_OWNER`
768+
- `COMPANY_ADMIN`
769+
770+
771+
**Args**
772+
773+
* **model_id** : the identifier of the model
774+
* **new_model_version** : the new version of the model
775+
776+
777+
**Returns**
778+
779+
* **model_id** : `str` job identifier of new model id
780+
781+
744782
**Raises**
745783

746784
`UpdateModelVersionException`
@@ -887,7 +925,8 @@ Show data schema of associated with a task
887925
### .add_historical_data
888926
```python
889927
.add_historical_data(
890-
task_id: str, inputs: Data, target: (Data|None) = None
928+
task_id: str, inputs: Data, target: (Data|None) = None,
929+
predictions: (list[tuple[str, Data]]|None) = None
891930
)
892931
```
893932

@@ -914,6 +953,11 @@ using the method `wait_job_completion(job_id)`
914953
It can be None if you upload other kinds of data
915954
* **target** : data object that contains target data.
916955
It can be None if you upload other kinds of data
956+
* **predictions** : list of data objects that contain prediction data.
957+
Each element is a tuple with model_id and data object.
958+
It can be None if you upload other kinds of data.
959+
Predictions are mandatory for RAG tasks while not
960+
permitted for the other TaskType.
917961

918962

919963
**Returns**

0 commit comments

Comments
 (0)