Skip to content

Latest commit

 

History

History
executable file
·
250 lines (156 loc) · 9.01 KB

MachineLearningApi.md

File metadata and controls

executable file
·
250 lines (156 loc) · 9.01 KB

\MachineLearningApi

All URIs are relative to http://api.labelstud.io

Method HTTP request Description
ApiMlCreate Post /api/ml/ Add ML Backend
ApiMlDelete Delete /api/ml/{id} Remove ML Backend
ApiMlInteractiveAnnotatingCreate Post /api/ml/{id}/interactive-annotating Request Interactive Annotation
ApiMlList Get /api/ml/ List ML backends
ApiMlPartialUpdate Patch /api/ml/{id} Update ML Backend
ApiMlRead Get /api/ml/{id} Get ML Backend
ApiMlTrainCreate Post /api/ml/{id}/train Train
ApiMlVersionsRead Get /api/ml/{id}/versions Get model versions

ApiMlCreate

Data ApiMlCreate(ctx, data) Add ML Backend

Add an ML backend to a project using the Label Studio UI or by sending a POST request using the following cURL command: ```bash curl -X POST -H 'Content-type: application/json' https://localhost:8080/api/ml -H 'Authorization: Token abc123'\ --data '{"url": "http://localhost:9090\", "project": {project_id}}'

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
data Data

Return type

Data

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApiMlDelete

ApiMlDelete(ctx, id) Remove ML Backend

Remove an existing ML backend connection by ID. For example, use the following cURL command: ```bash curl -X DELETE https://localhost:8080/api/ml/{ml_backend_ID} -H 'Authorization: Token abc123'

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 A unique integer value identifying this ml backend.

Return type

(empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApiMlInteractiveAnnotatingCreate

ApiMlInteractiveAnnotatingCreate(ctx, data, id) Request Interactive Annotation

Send a request to the machine learning backend set up to be used for interactive preannotations to retrieve a predicted region based on annotator input. See set up machine learning for more.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
data MlInteractiveAnnotatingRequest
id int32 A unique integer value identifying this ML backend.

Return type

(empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApiMlList

[]MlBackend ApiMlList(ctx, optional) List ML backends

List all configured ML backends for a specific project by ID. Use the following cURL command: ```bash curl https://localhost:8080/api/ml?project={project_id} -H 'Authorization: Token abc123'

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *MachineLearningApiApiMlListOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a MachineLearningApiApiMlListOpts struct

Name Type Description Notes
project optional.Int32 Project ID

Return type

[]MlBackend

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApiMlPartialUpdate

MlBackend ApiMlPartialUpdate(ctx, id, data) Update ML Backend

Update ML backend parameters using the Label Studio UI or by sending a PATCH request using the following cURL command: ```bash curl -X PATCH -H 'Content-type: application/json' https://localhost:8080/api/ml/{ml_backend_ID} -H 'Authorization: Token abc123'\ --data '{"url": "http://localhost:9091\"}'

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 A unique integer value identifying this ml backend.
data MlBackend

Return type

MlBackend

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApiMlRead

MlBackend ApiMlRead(ctx, id) Get ML Backend

Get details about a specific ML backend connection by ID. For example, make a GET request using the following cURL command: ```bash curl https://localhost:8080/api/ml/{ml_backend_ID} -H 'Authorization: Token abc123'

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 A unique integer value identifying this ml backend.

Return type

MlBackend

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApiMlTrainCreate

ApiMlTrainCreate(ctx, data, id) Train

After you add an ML backend, call this API with the ML backend ID to start training with already-labeled tasks. Get the ML backend ID by listing the ML backends for a project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
data Data1
id int32 A unique integer value identifying this ML backend.

Return type

(empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApiMlVersionsRead

ApiMlVersionsRead(ctx, id) Get model versions

Get available versions of the model.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Return type

(empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]