Train the Model

post

/utility/train

Trains the model based on the configurations set by you and the data acquired by the data service.

In the request body, the contents of additional_data depend on the storage_type value:

  • When storage_type is set to object_storage, the additional_data object must include the bucket and namespace fields.
  • When storage_type is set to pvc, the additional_data object must include the path field set to the path of the metadata.json file.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Match All
Specifies the input parameters for the request.
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • type
    Specifies the input parameters for the request.
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : type
Type: object
Specifies the input parameters for the request.
Show Source
Nested Schema : algorithm
Type: array
Specifies the list of algorithms to train.
Show Source
Nested Schema : storage_details
Type: array
Provides the storage location and access details for the stored data.
Show Source
Nested Schema : Algorithms
Match All
Defines an algorithm and its training configuration.
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Algorithms-allOf[1]
    Defines an algorithm and its training configuration.
Nested Schema : Algorithms-allOf[1]
Type: object
Defines an algorithm and its training configuration.
Show Source
Nested Schema : hyper_parameters
Type: object
Additional Properties Allowed: true
Specifies hyperparameters to override the default values. Available parameters vary by algorithm.
Nested Schema : StorageDetails
Match All
Defines the queries to run and the join conditions used to combine them.
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • StorageDetails-allOf[1]
    Defines the queries to run and the join conditions used to combine them.
Nested Schema : StorageDetails-allOf[1]
Type: object
Defines the queries to run and the join conditions used to combine them.
Show Source
Nested Schema : storage_connection_details
Type: array
Specifies the connection parameters for the storage location.
Show Source
Nested Schema : items
Type: object
Additional Properties Allowed: true
Examples

Back to Top

Response

200 Response

The request was completed successfully.
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : TrainResponse
Match All
Specifies the output returned by the operation.
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • TrainResponse-allOf[1]
    Specifies the output returned by the operation.
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : TrainResponse-allOf[1]
Type: object
Specifies the output returned by the operation.
Show Source

400 Response

The request could not be processed because it contains missing or invalid information.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

401 Response

The request is not authorized.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

403 Response

The user does not have authorization to perform this request.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

404 Response

The requested resource cannot be found.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

405 Response

The method is not allowed.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

409 Response

The request could not be processed due to a conflict with the existing state of the resource.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

500 Response

The system has encountered an internal server error.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

501 Response

The request was not implemented.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

503 Response

The service is unavailable.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "CacheRequest":"#/components/schemas/CacheRequest", "FetchRequest":"#/components/schemas/FetchRequest", "CollectRequest":"#/components/schemas/CollectRequest", "QueryBuilder":"#/components/schemas/QueryBuilder", "QueryList":"#/components/schemas/QueryList", "JoinConditions":"#/components/schemas/JoinConditions", "StorageDetails":"#/components/schemas/StorageDetails", "CollectResponse":"#/components/schemas/CollectResponse", "FetchResponse":"#/components/schemas/FetchResponse", "CacheResponse":"#/components/schemas/CacheResponse", "Error":"#/components/schemas/Error" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
Back to Top

Examples

This example shows the cURL command for sending a Train the Model request:

curl -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_TOKEN" -H "Accept: application/json" -X POST -d @file.json 'http://hostname:port/utility/train'

where:

  • your_token is your client application's OAuth 2.0 access token.

  • file.json is the JSON file that specifies the details of the data to collect.

  • hostname is the host name for the application server.

  • port is the port for the application server.

Example of Request Body

Following is a sample request body.

{
  "@type": "TrainRequest",
  "algorithm": [
    {
      "@type": "Algorithms",
      "algo": "knn",
      "model_dir": "model/",
      "model_name": "recommend_knn",
      "hyper_parameters": {
        "k_value": 5
      }
    },
    {
      "@type": "Algorithms",
      "algo": "cosine",
      "model_dir": "model/",
      "model_name": "recommend_cosine",
      "hyper_parameters": {
        "k_value": 5
      }
    },
    {
      "@type": "Algorithms",
      "algo": "dnn",
      "model_dir": "model/",
      "model_name": "dnn",
      "hyper_parameters": {
        "test_size": 0.2,
        "epochs": 150,
        "batch_size": 16,
        "loss": "categorical_crossentropy",
        "optimizer": "rmsprop",
        "learning_rate": 0.001,
        "final_activation": "softmax"
      }
    }
  ],
  "sample": true,
  "storage_details": [
    {
      "@type": "StorageDetails",
      "storage_type": "object_storage",
      "required_data": [
        "account_data",
        "balance_group_data",
        "service_data",
        "purchased_product_data",
        "product_data",
        "deal_data",
        "plan_data",
        "rate_data",
        "event_data",
        "deal_data_2",
        "over_usage_data",
        "usage_details"
      ],
      "additional_details": {
        "bucket": "sample-for-dataflow",
        "namespace": "adcdefghijk"
      }
    }
  ]
}

Example of Response Body

If successful, the response code 200 is returned with a response body. For example:

[
  {
    "@type": "TrainResponse",
    "status": "Training Complete"
  }
]
Back to Top