Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

사용 가능한 학습기 목록(List Model Studio Trainers) (V2)

Model Studio에서 사용할 수 있는 사전 구성 학습기 목록을 조회합니다. 학습기는 여러 Studio에서 공유하며 각자 알고리즘, 입력과 출력 및 사용자 설정 JSON Schema를 정의합니다.

실제 구성을 만들기 전에 필요한 입력 별칭, 열 유형 명세와 설정 조건을 확인합니다. 실험적 학습기는 experimental로 표시되며 호환되지 않는 변경이 생길 수 있습니다.

이 엔드포인트는 미리보기 기능이며 언제든 변경되거나 제거될 수 있습니다. 사용하려면 preview=true를 지정합니다.

HTTP 요청

GET /api/v2/models/modelStudioTrainers

작업 식별자는 v2.listModelStudioTrainers입니다. OAuth2로 호출하는 타사 애플리케이션에는 api:models-read 권한 범위가 필요합니다. 각 요청에 Authorization: Bearer <접근 토큰>을 전달합니다.

경로 매개변수

지정할 경로 매개변수가 없습니다.

쿼리 매개변수

이름자료형필수 여부의미와 조건예시 값
previewboolean선택미리보기 기능 사용을 활성화합니다.true

요청 본문

요청 본문을 사용하지 않습니다.

응답

응답 형식은 ListModelStudioTrainersResponse입니다.

이름자료형필수 여부의미와 조건예시 값
datalist<ModelStudioTrainer>선택

data의 구조

배열 항목은 ModelStudioTrainer이며 자료형은 object입니다.

학습기 속성과 입력, 출력 및 JSON Schema의 전체 예시는 학습기 명세를 따릅니다.

학습기 목록의 응답 예시입니다.

{
  "data": [
    {
      "outputs": {
        "model": {
          "name": "Output model",
          "optional": false,
          "type": {
            "type": "model",
            "model": {
              "modelApiAliases": [
                {
                  "alias": "input_df",
                  "description": "Input dataset"
                },
                {
                  "alias": "output_df",
                  "description": "Output dataset"
                }
              ]
            }
          }
        }
      },
      "customConfigSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "title": "AutoGluonTabularRegressionConfig",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "eval_metric": {
            "title": "Evaluation metric",
            "default": "mean_squared_error",
            "$ref": "#/$defs/RegressionMetricType"
          },
          "presets": {
            "title": "Training presets",
            "default": "medium_quality",
            "$ref": "#/$defs/PresetsType"
          },
          "refit_full": {
            "title": "Refit on full data",
            "description": "After evaluation, refit the best model on the combined training and test data.",
            "type": "boolean",
            "default": false
          }
        },
        "$defs": {
          "PresetsType": {
            "title": "PresetsType",
            "description": "Pre-built training presets",
            "oneOf": [
              {
                "type": "string",
                "const": "best_quality",
                "description": "Best predictive accuracy, at the cost of training and inference speed."
              },
              {
                "type": "string",
                "const": "medium_quality",
                "description": "Medium predictive accuracy with very fast inference and very fast training time."
              }
            ]
          },
          "RegressionMetricType": {
            "title": "RegressionMetricType",
            "description": "The metric to optimize for when selecting the best model.",
            "oneOf": [
              {
                "type": "string",
                "const": "root_mean_squared_error",
                "description": "Measures the square root of the average squared differences between predicted and actual values."
              },
              {
                "type": "string",
                "const": "mean_squared_error",
                "description": "The average of the squared differences between predicted and actual values."
              }
            ]
          }
        }
      },
      "inputs": {
        "input_df": {
          "name": "Training dataset",
          "description": "Input dataset for training. If no testing dataset is provided, 20% of this dataset will be held out as a test dataset for evaluation.",
          "optional": false,
          "type": {
            "type": "dataset",
            "dataset": {
              "role": "TRAINING",
              "columnsTypeSpecs": {
                "target_column": {
                  "name": "Target column",
                  "isTarget": true,
                  "allowMultiple": false,
                  "optional": false,
                  "supportedTypes": [
                    {
                      "type": "grouped",
                      "grouped": "NUMERIC"
                    }
                  ]
                }
              }
            }
          }
        },
        "test_df": {
          "name": "Test dataset",
          "description": "Input dataset for testing. Used for evaluating the best model only.",
          "optional": true,
          "type": {
            "type": "dataset",
            "dataset": {
              "role": "TEST",
              "columnsTypeSpecs": {}
            }
          }
        }
      },
      "name": "AutoGluon Tabular Regression Trainer",
      "description": "Regression with AutoGluon TabularPredictor",
      "experimental": false,
      "type": "GENERIC",
      "version": "0.388.0",
      "trainerId": "ri.models..trainer.autogluon_tabular_regression"
    }
  ]
}

개별 오류

오류 응답 처리는 공통 API 오류 계약을 따릅니다.

요청 예제

FOUNDRY_HOST에는 https://를 제외한 Foundry 호스트를, FOUNDRY_TOKEN에는 유효한 토큰을 환경 변수로 제공합니다. 예시 식별자와 매개변수 값은 실제 작업 대상에 맞게 바꿉니다.

cURL

curl \
	-H "Authorization: Bearer ${FOUNDRY_TOKEN}" \
	"https://${FOUNDRY_HOST}/api/v2/models/modelStudioTrainers?preview=true"

Python

Requests 라이브러리가 설치된 Python 환경에서 사용합니다.

import os
import requests

HOSTNAME = os.environ["FOUNDRY_HOST"]
TOKEN = os.environ["FOUNDRY_TOKEN"]
headers = {
    "authorization": "Bearer {}".format(TOKEN)
}

response = requests.get('https://{}/api/v2/models/modelStudioTrainers?preview=true'.format(HOSTNAME), headers=headers)
print(response)

Java

Apache HttpClient 4.5 API와 try-with-resources를 사용합니다. 클래스 이름에 맞는 ListModelStudioTrainersExample.java 파일에서 사용합니다.

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;

public class ListModelStudioTrainersExample {
    public static void main(String[] args) throws Exception {
        String HOSTNAME = System.getenv("FOUNDRY_HOST");
        String TOKEN = System.getenv("FOUNDRY_TOKEN");

        try (CloseableHttpClient httpClient = HttpClientBuilder.create().build()) {
            HttpGet request = new HttpGet("https://" + HOSTNAME + "/api/v2/models/modelStudioTrainers?preview=true");
            request.addHeader("authorization", String.format("Bearer %s", TOKEN));
            try (CloseableHttpResponse response = httpClient.execute(request)) {
                System.out.println(response);
            }
        }
    }
}

JavaScript

fetch를 제공하는 Node.js 환경에서 사용합니다. 서비스 사용자 토큰을 브라우저로 전달하지 않습니다.

const HOSTNAME = process.env.FOUNDRY_HOST;
const TOKEN = process.env.FOUNDRY_TOKEN;

fetch(`https://${HOSTNAME}/api/v2/models/modelStudioTrainers?preview=true`, {
    method: 'GET',
    headers: {
        'Authorization': `Bearer ${TOKEN}`,
    }
}).then((response) => {
    console.log(response)
});

PowerShell

$ErrorActionPreference = 'Stop'
$TOKEN = $env:FOUNDRY_TOKEN
$HOSTNAME = $env:FOUNDRY_HOST

$headers = @{
    "authorization" = "Bearer $TOKEN"
}

$response = Invoke-WebRequest -Uri "https://$HOSTNAME/api/v2/models/modelStudioTrainers?preview=true" `
	-Headers $headers

$response.content