본문 바로가기
WIKI 기술 지식 베이스

ML Commons Profile API

원문 보기 위키 갱신

출처: 문서

본문

ML Commons Profile API

Profile API 작업은 ML 태스크와 모델에 대한 런타임 정보를 반환해요. Profile 작업은 런타임에 모델 문제를 디버깅하는 데 도움이 될 수 있어요.

반환되는 요청 수

기본적으로 Profile API는 최근 100개의 요청을 모니터링해요. 모니터링 요청 수를 변경하려면 다음 클러스터 설정을 업데이트하세요:

PUT _cluster/settings
{
  "persistent" : {
    "plugins.ml_commons.monitoring_request_count" : 1000000 
  }
}

모든 모니터링 요청을 지우려면 plugins.ml_commons.monitoring_request_count를 0으로 설정하세요.

엔드포인트

GET /_plugins/_ml/profile
GET /_plugins/_ml/profile/models
GET /_plugins/_ml/profile/models/{model_id}
GET /_plugins/_ml/profile/tasks
GET /_plugins/_ml/profile/tasks/{task_id}

경로 파라미터

파라미터 데이터 타입 설명
model_id String 특정 모델의 런타임 데이터를 반환해요. 여러 모델 프로파일을 가져오려면 여러 모델 ID를 쉼표로 구분된 값으로 제공할 수 있어요.
task_id String 특정 태스크의 런타임 데이터를 반환해요. 여러 태스크 프로파일을 가져오려면 여러 태스크 ID를 쉼표로 구분된 값으로 제공할 수 있어요.

요청 본문 필드

모든 프로파일 본문 요청 필드는 선택 사항이에요.

필드 데이터 타입 설명
node_ids String 특정 노드의 모든 태스크와 프로파일을 반환해요.
model_ids String 특정 모델의 런타임 데이터를 반환해요. 여러 모델 ID를 연결해서 여러 모델 프로파일을 반환할 수 있어요.
task_ids String 특정 태스크의 런타임 데이터를 반환해요. 여러 태스크 ID를 연결해서 여러 태스크 프로파일을 반환할 수 있어요.
return_all_tasks Boolean 요청이 모든 태스크를 반환할지 여부를 결정해요. false로 설정하면 태스크 프로파일이 응답에서 제외돼요.
return_all_models Boolean 프로파일 요청이 모든 모델을 반환할지 여부를 결정해요. false로 설정하면 모델 프로파일이 응답에서 제외돼요.

예제 요청: 특정 노드의 모든 태스크와 모델 반환하기

GET /_plugins/_ml/profile
{
  "node_ids": ["KzONM8c8T4Od-NoUANQNGg"],
  "return_all_tasks": true,
  "return_all_models": true
}

{% include copy-curl.html %}

예제 응답

{
  "nodes" : {
    "qTduw0FJTrmGrqMrxH0dcA" : { # node id
      "models" : {
        "WWQI44MBbzI2oUKAvNUt" : { # model id
          "worker_nodes" : [ # routing table
            "KzONM8c8T4Od-NoUANQNGg"
          ]
        }
      }
    },
    ...
    "KzONM8c8T4Od-NoUANQNGg" : { # node id
      "models" : {
        "WWQI44MBbzI2oUKAvNUt" : { # model id
          "model_state" : "DEPLOYED", # model status
          "predictor" : "org.opensearch.ml.engine.algorithms.text_embedding.TextEmbeddingModel@592814c9",
          "worker_nodes" : [ # routing table
            "KzONM8c8T4Od-NoUANQNGg"
          ],
          "predict_request_stats" : { # predict request stats on this node
            "count" : 2, # total predict requests on this node
            "max" : 89.978681, # max latency in milliseconds
            "min" : 5.402,
            "average" : 47.6903405,
            "p50" : 47.6903405,
            "p90" : 81.5210129,
            "p99" : 89.13291418999998
          }
        }
      }
    },
    ...
  }
}

더 알아보기 (Learn more)