Request service training
    • PDF

    Request service training

    • PDF

    Article summary

    Available in Classic and VPC

    Request that a service with a service type of batch train a one-time dataset.

    Request

    The following describes the request format for the endpoint. The request format is as follows:

    MethodURI
    POST/services/{serviceId}

    Request headers

    For headers common to all AiTEMS APIs, see Common AiTEMS headers.

    Request path parameters

    The following describes the parameters.

    FieldTypeRequiredDescription
    serviceIdStringRequiredService ID
    • Check through Get service list
    • Only IDs of services with type of batch can be entered

    Request body

    The following describes the request body.

    FieldTypeRequiredDescription
    typesArrayRequiredTraining request type
    • personalRecommend | relatedItem | pop
      • personalRecommend: personalized recommendations based on customer service users' past history
      • relatedItem: personalized recommendations based on an item's association history
      • pop: top item recommendations by rank
    descriptionStringOptionalTraining description
    hpConfigObjectRequiredHyperparameter optimization (HPO) settings information
    hpConfig.is_enabledBooleanRequiredHPO configuration status
    • true | false
      • true: HPO configured, optimal training models can be implemented
      • false: HPO not configured, trained by AiTEMS' own internal algorithms
    hpConfig.{option}String, Long, BooleanOptionalConfigured HPO value
    • See HPO for value details

    HPO

    The following describes the configurable HPO values.

    Option nameTypeRequiredTraining typeDescription
    session_max_timestampLongOptionalPersonalized recommendations, related item recommendationsMaximum idle time (in seconds) between actions to consider the same session
    • 10 - 86,400 (default: 1800)
    • Recommended to be set to 1800 or higher
    item_top_nLongOptionalPersonalized recommendations, related item recommendationsMaximum number of products to be used for recommendations
    • Utilize by popularity
    • 1000 - 500,000 (default: 20,000)
    min_item_cutLongOptionalPersonalized recommendations, related item recommendationsProduct minimum appearance count
    • 1 - 1000 (default: 5)
    min_session_lengthLongOptionalPersonalized recommendations, related item recommendationsMinimum number of actions in a session
    • 2 - 1000 (default: 2)
    max_user_recommend_topLongOptionalPersonalized recommendationMaximum number of recommendations per user
    • 1 - 1000 (default: 100)
    max_relate_recommend_topLongOptionalRelated item recommendationMaximum number of related item recommendations per product
    • 1 - 1000 (default: 100)
    remove_history_itemBooleanOptionalPersonalized recommendations, related item recommendationsWhether to remove previously recommended products from personalized recommendations list
    • true | false (default)
      • true: Remove previously recommended products from the recommendations list
      • false: Include previously recommended products in the personalized recommendations list
    group_columnArrayRequiredPopular item recommendationList of popular extract group columns
    • USER_ID, ITEM_ID, and TIMESTAMP can't be selected
    target_columnStringOptionalPopular item recommendationPopular extract target columns
    • USER_ID, ITEM_ID, and TIMESTAMP can't be selected
    • Up to 100 can be entered
    max_group_recommend_topLongOptionalPopular item recommendationMaximum number of popular products per group
    • 1 - 1000 (default: 100)

    Request example

    The following is a sample request.

    curl --location --request POST 'https://aitems.apigw.ntruss.com/api/v1/services/xv94v******' \
    --header 'x-ncp-apigw-timestamp: {Timestamp}' \
    --header 'x-ncp-iam-access-key: {Access Key}' \
    --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
    --header 'Content-Type: application/json' \
    --data '{
        "types": [
            "personalRecommend"
        ],
        "description": "test",
        "hpConfig": {
            "is_enabled": false
        }
    }'
    

    Response

    The following describes the response format.

    Response body

    The following describes the response body.

    FieldTypeRequiredDescription
    serviceIdString-Service ID
    nameString-Service name
    descriptionString-Service description
    statusString-Service status
    • scheduled | scheduledLearning | learnable | learning | deleting | deleted | disable | drafted | requestLearning | datasetRequired
      • scheduled: scheduled
      • scheduledLearning: scheduled training in progress
      • learnable: trainable
      • learning: training in progress
      • deleting: deleting
      • deleted: deleted
      • disable: training unavailable
      • drafted: draft status
      • requestLearning: training requested
      • datasetRequired: no dataset specified after service creation
    datasetsArray-Information of dataset set to service
    hpConfigObject-Hyperparameter optimization (HPO) settings information
    hpConfig.is_enabledBoolean-HPO configuration status
    • true | false
      • true: HPO configured, optimal training models can be implemented
      • false: HPO not configured, trained by AiTEMS' own internal algorithms
    hpConfig.{option}String, Long, Boolean-Configured HPO value
    • See HPO for value details
    infersArray-Training result information
    • Displayed only if type is interval
    createdDateString-Service creation date and time
    updatedDateString-Last update date and time of the service
    typeString-Service type
    • batch | interval
      • batch: one-time training upon execution
      • interval: Retrain at regular intervals after execution
    learningIntervalString-Dataset update cycle
    scheduledDateString-Dataset update scheduling time

    datasets

    The following describes datasets.

    FieldTypeRequiredDescription
    datasetIdString-Dataset ID set to the service
    typeString-Dataset type set to the service
    • personalRecommend | relatedItem | pop
      • personalRecommend: personalized recommendations based on customer service users' past history
      • relatedItem: personalized recommendations based on an item's association history
      • pop: top item recommendations by rank
    nameString-Dataset name set to the service
    schemaNameString-Dataset schema name set to the service
    statusString-Status of dataset set to the service
    • learnable | disable | uploading | updateRequired
      • learnable: training available
      • disable: training unavailable
      • uploading: uploading
      • updatedRequired: updated dataset registration required (automatically registered when training)
    createdDateString-Creation date and time of dataset set to the service
    updatedDateString-Last update date and time of dataset set to the service

    infers

    The following describes infers.

    FieldTypeRequiredDescription
    dataTypeString-Dataset type of the training result
    • personalRecommend | relatedItem | pop
      • personalRecommend: personalized recommendations based on customer service users' past history
      • relatedItem: personalized recommendations based on an item's association history
      • pop: top item recommendations by rank
    trainVersionString-Training result version
    statusString-Training result status
    • enable | waiting | pending | processing | updateFailed | disable
      • enable: update available
      • waiting: waiting for update
      • pending: pending update
      • processing: updating
      • updateFailed: update failed
      • disable: update unavailable
    rowCountString-Result data count
    createdDateString-Data creation date and time
    updatedDateString-Last update date and time of data

    Response status codes

    For response status codes common to all AiTEMS APIs, see Common AiTEMS API response status codes.

    Response example

    The following is a sample example.

    {
        "serviceId": "xv94v******",
        "name": "service1",
        "description": "",
        "status": "learning",
        "datasets": [
            {
                "datasetId": "g8rf6******",
                "type": "item",
                "name": "item_dataset",
                "schemaName": "item_schema",
                "status": "learnable",
                "createdDate": "2024-07-29T16:46:35.968",
                "updatedDate": "2024-07-30T08:57:35.209"
            },
            {
                "datasetId": "bu457******",
                "type": "interaction",
                "name": "interaction_dataset",
                "schemaName": "interaction_schema",
                "status": "learnable",
                "createdDate": "2024-07-30T09:49:19.254",
                "updatedDate": "2024-07-30T09:49:35.364"
            },
            {
                "datasetId": "oeq4i******",
                "type": "user",
                "name": "user_dataset",
                "schemaName": "user_schema",
                "status": "learnable",
                "createdDate": "2024-07-30T08:58:00.662",
                "updatedDate": "2024-07-30T08:58:35.205"
            }
        ],
        "hpConfig": {
            "is_enabled": false
        },
        "infers": [],
        "createdDate": "2024-07-30T09:50:53.521",
        "updatedDate": "2024-07-30T10:32:00.492",
        "type": "batch"
    }
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.