Retrieving training
    • PDF

    Retrieving training

    • PDF

    Article Summary

    Available in Classic and VPC

    Retrieves the desired training information from the list of generated trainings. The training ID needed to call the training retrieval API can be found in the response body of the training generation API.

    Requests

    Describes the request format. The request format is as follows:

    MethodURI
    GET/tuning/v2/tasks/{taskId}

    Header

    The following describes the header.

    FieldRequirement statusDescription
    X-NCP-APIGW-TIMESTAMPYTime elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    If the time differs from that of the API Gateway server by 5 minutes or more, then the request is considered invalid
    x-ncp-apigw-timestamp:{Timestamp}
    X-NCP-IAM-ACCESS-KEYYAccess key ID issued from NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Main Account Access Key}
    X-NCP-APIGW-SIGNATURE-V2YSignature encrypted with the access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    X-NCP-CLOVASTUDIO-REQUEST-IDNRequest ID for each request
    Content-TypeYmultipart/form-data

    Path parameters

    The following describes the parameters.

    FieldTypeRequirement statusDescription
    taskIDstringYTraining ID

    Syntax

    The following is an example of syntax.

    curl --location --request GET 'https://clovastudio.apigw.ntruss.com/tuning/v2/tasks/{taskId}' \
    --header 'Content-Type: application/json' \
    --header 'X-NCP-APIGW-TIMESTAMP: <api_gw_time>' \
    --header 'X-NCP-IAM-ACCESS-KEY: <iam_access_key>' \
    --header 'X-NCP-APIGW-SIGNATURE-V2: <api_gw_sig>' \
    --header 'X-NCP-CLOVASTUDIO-REQUEST-ID: <request_id>'
    

    Responses

    Describes the responses format.

    Header

    The following describes the header.

    HeaderRequirement statusDescription
    Content-Type-application/json

    Body

    The following describes the body.

    FieldTypeRequirement statusDescription
    resultobject-Response result
    result.idstring-Training ID
    result.namestring-Training name
    result.modelstring-Tuning model name
    result.methodenum-Tuning method
  • LoRA
  • result.taksTypestring-Training type
  • GENERATION: generation
  • CLASSIFICATION: classification
  • result.trainEpochsinterger-Number of epochs to train the model
    result.learningRatedouble-Training rate: the level or degree to which model parameters are re-trained when tuning
    result.statusenum-Training progress status
  • WAIT
  • RUNNING
  • FAILED
  • SUCCEEDED
  • result.status.statusInfoarray-Training progress details
    result.status.statusInfo.labelarray-User data label, if training type is classification (null, if training type is GENERATION)
    result.status.statusInfo.dataRowsint-Number of data
    result.status.statusInfo.numOfTokensint-Number of data tokens
    result.status.statusInfo.currStepint-Current number of training steps
    result.status.statusInfo.totalTrainStepsint-Total number of training steps
    result.status.statusInfo.currEpochint-Current epochs
    result.status.statusInfo.totalTrainEpochsint-Total training epochs
    result.status.statusInfo.estimatedTimeint-Estimated duration (average 1 epoch time * total training epochs)
    result.status.statusInfo.trainLossdouble-Amount of training loss
    result.status.statusInfo.sendWeightSuccessboolean-Whether to save the training results
    result.status.statusInfo.endDatetimestring-End date of the training
    result.status.statusInfo.failureReasonstring-Reason for training failure
    • file.read: file recognition failed
    • file.privacy: private information exists in the file
    • file.harmful: harmful information exists in the file
    • resource.timeout: response timeout due to GPU acquisition failure. Retry required
    • result.store: failed to store training results
    • db.timeout: response timeout due to DB connection failure. Retry required
    result.status.createdClientTypeenum-Client type that requested the training
  • API: API client
  • WEB: web client
  • result.status.createdDatestring-Training generation date (ISO 8601 format)
    result.status.updatedDatestring-Training editing date (ISO 8601 format)

    Syntax

    The following is an example of syntax.

    {
        "status": {
            "code": "20000",
            "message": "OK"
        },
            "result": {
            "id": "oi55o2ej",
            "name": "230709-202307",
            "model": "HCX-002",
            "method": "LoRA",
            "taskType": "GENERATION",
            "trainEpochs": 8,
            "learningRate": 1.0E-4,
            "status": "FAILED",
            "statusInfo": {
                "label": null,
                "dataRows": null,
                "numOfTokens": null,
                "currStep": null,
                "totalTrainSteps": null,
                "currEpoch": null,
                "totalTrainEpochs": null,
                "estimatedTime": null,
                "trainLoss": null,
                "sendWeightSuccess": null,
                "failureReason": "resource.timeout"
            },
            "createdClientType": "WEB",
            "createdDate": "2023-08-20T20:23:08+0900",
            "updatedDate": "2023-08-21T10:31:40+0900"
        }
    }
    

    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.