

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Neptune ML의 Gremlin 추론 쿼리
<a name="machine-learning-gremlin-inference-queries"></a>

[Neptune ML 기능](machine-learning.md#machine-learning-capabilities)에 설명된 대로 Neptune ML은 다음과 같은 종류의 추론 작업을 수행할 수 있는 훈련 모델을 지원합니다.
+ **노드 분류**   –   버텍스 속성의 범주형 특성을 예측합니다.
+ **노드 회귀**   –   버텍스의 수치적 속성을 예측합니다.
+ **엣지 분류**   –   엣지 속성의 범주형 특성을 예측합니다.
+ **엣지 회귀**   –   엣지의 수치적 속성을 예측합니다.
+ **연결 예측**   –   소스 노드와 송신 엣지가 주어지면 대상 노드를 예측하거나, 대상 노드와 수신 엣지가 주어지면 소스 노드를 예측합니다.

[GroupLens Research](https://grouplens.org/datasets/movielens/)에서 제공하는 [MovieLens 10만 데이터 세트](https://grouplens.org/datasets/movielens/100k/)를 사용하는 예제를 통해 이러한 다양한 작업을 설명할 수 있습니다. 이 데이터 세트는 영화, 사용자, 사용자별 영화 평점으로 구성되어 있으며, 이를 바탕으로 다음과 같은 속성 그래프를 생성했습니다.

![\[MovieLens 10만 데이터 세트를 사용한 샘플 영화 속성 그래프\]](http://docs.aws.amazon.com/ko_kr/neptune/latest/userguide/images/movie_property_graph_example.png)


**노드 분류**: 위 데이터 세트에서 `Genre`는 `included_in` 엣지로 `Movie` 버텍스 유형에 연결된 버텍스 유형입니다. 그러나 데이터 세트를 조정하여 `Genre`를 버텍스 유형의 `Movie`에 대한 [범주형](https://en.wikipedia.org/wiki/Categorical_variable) 특성으로 만든다면, 지식 그래프에 추가된 새로운 영화에 대한 `Genre` 추론 문제는 노드 분류 모델을 사용하여 해결할 수 있습니다.

**노드 회귀**: `timestamp` 및 `score`와 같은 속성을 갖는 버텍스 유형 `Rating`을 고려하면 노드 회귀 모델을 사용하여 `Rating`에 대한 수치 값 `Score`를 추론하는 문제를 해결할 수 있습니다.

**엣지 분류**: 마찬가지로, `Rated` 엣지의 경우 `Love`, `Like`, `Dislike`, `Neutral`, `Hate` 중 하나의 값을 가질 수 있는 속성 `Scale`이 있으면 새 영화/평점에 대한 `Rated` 엣지의 `Scale`을 추론하는 문제는 엣지 분류 모델을 사용하여 해결할 수 있습니다.

**엣지 회귀**: 마찬가지로, 동일한 `Rated` 엣지에 대해 평점의 수치적 값을 포함하는 속성 `Score`가 있는 경우 엣지 회귀 모델을 통해 이를 유추할 수 있습니다.

**연결 예측**: 특정 영화를 평가할 가능성이 가장 높은 상위 10명의 사용자 찾기, 특정 사용자가 평가할 가능성이 가장 높은 상위 10개 영화 찾기 등과 같은 문제는 연결 예측에 속합니다.

**참고**  
Neptune ML 사용 사례의 경우 각 사용 사례를 직접 이해할 수 있도록 설계된 매우 풍부한 노트북 세트가 있습니다. Neptune [ML CloudFormation 템플릿을](machine-learning-quick-start.md) 사용하여 Neptune ML 클러스터를 생성할 때 Neptune 클러스터와 함께 이러한 노트북을 생성할 수 있습니다. 이러한 노트북은 [github](https://github.com/aws/graph-notebook/tree/main/src/graph_notebook/notebooks/04-Machine-Learning)에서도 사용할 수 있습니다.

**Topics**
+ [Gremlin 추론 쿼리에 사용되는 Neptune ML 조건자](machine-learning-gremlin-inference-query-predicates.md)
+ [Neptune ML의 Gremlin 노드 분류 쿼리](machine-learning-gremlin-vertex-classification-queries.md)
+ [Neptune ML의 Gremlin 노드 회귀 쿼리](machine-learning-gremlin-vertex-regression-queries.md)
+ [Neptune ML의 Gremlin 엣지 분류 쿼리](machine-learning-gremlin-edge-classification-queries.md)
+ [Neptune ML의 Gremlin 엣지 회귀 쿼리](machine-learning-gremlin-edge-regression.md)
+ [Neptune ML의 연결 예측 모델을 사용한 Gremlin 연결 예측 쿼리](machine-learning-gremlin-link-prediction-queries.md)
+ [Neptune ML Gremlin 추론 쿼리의 예외 목록](machine-learning-gremlin-exceptions.md)

# Gremlin 추론 쿼리에 사용되는 Neptune ML 조건자
<a name="machine-learning-gremlin-inference-query-predicates"></a>

## `Neptune#ml.deterministic`
<a name="machine-learning-gremlin-inference-neptune-ml-deterministic-predicate"></a>

이 조건자는 유도 추론 쿼리, 즉 [`Neptune#ml.inductiveInference`](#machine-learning-gremlin-inference-neptune-ml-inductiveInference) 조건자가 포함된 쿼리에 사용할 수 있는 옵션입니다.

유도 추론을 사용하는 경우 Neptune 엔진은 훈련된 GNN 모델을 평가하는 데 적합한 하위 그래프를 생성하며, 이 하위 그래프의 요구 사항은 최종 모델의 파라미터에 따라 달라집니다. 구체적으로, `num-layer` 파라미터는 대상 노드 또는 엣지로부터의 순회 홉 수를 결정하고 `fanouts` 파라미터는 각 홉에서 샘플링할 인접 디바이스 수를 지정합니다([HPO 파라미터](machine-learning-customizing-hyperparams.md) 참조).

기본적으로 유도 추론 쿼리는 Neptune이 주변 환경을 무작위로 구축하는 비결정적 모드에서 실행됩니다. 예측할 때 이 일반적인 무작위 이웃 샘플링으로 인해 예측이 달라지는 경우가 있습니다.

유도 추론 쿼리에 `Neptune#ml.deterministic`을 포함하면 Neptune 엔진이 결정적 방식으로 이웃 샘플링을 시도하여 동일한 쿼리를 여러 번 간접 호출해도 매번 동일한 결과가 반환되도록 합니다. 하지만 분산 시스템의 기본 그래프와 아티팩트를 변경해도 여전히 변동이 발생할 수 있기 때문에 결과가 완전히 결정적이라고 보장할 수는 없습니다.

다음과 같이 쿼리에 `Neptune#ml.deterministic` 조건자를 포함하세요.

```
.with("Neptune#ml.deterministic")
```

`Neptune#ml.inductiveInference`를 포함하지 않은 쿼리에 `Neptune#ml.deterministic` 조건자가 포함되어 있으면 그냥 무시됩니다.

## `Neptune#ml.disableInductiveInferenceMetadataCache`
<a name="machine-learning-gremlin-disableInductiveInferenceMetadataCache-predicate"></a>

이 조건자는 유도 추론 쿼리, 즉 [`Neptune#ml.inductiveInference`](#machine-learning-gremlin-inference-neptune-ml-inductiveInference) 조건자가 포함된 쿼리에 사용할 수 있는 옵션입니다.

유도 추론 쿼리의 경우 Neptune은 Amazon S3에 저장된 메타데이터 파일을 사용하여 주변 환경을 구축하는 동안 홉 수와 팬아웃을 결정합니다. Neptune은 일반적으로 Amazon S3에서 파일을 반복적으로 가져오는 것을 방지하기 위해 이 모델 메타데이터를 캐싱합니다. 쿼리에 `Neptune#ml.disableInductiveInferenceMetadataCache` 조건자를 포함하여 캐싱을 비활성화할 수 있습니다. Neptune이 Amazon S3에서 직접 메타데이터를 가져오면 더 느릴 수 있지만, 재훈련 또는 변환 후 SageMaker AI 엔드포인트가 업데이트되어 캐시가 오래된 경우에는 도움이 됩니다.

다음과 같이 쿼리에 `Neptune#ml.disableInductiveInferenceMetadataCache` 조건자를 포함하세요.

```
.with("Neptune#ml.disableInductiveInferenceMetadataCache")
```

Jupyter Notebook에서 샘플 쿼리가 어떻게 보이는지는 다음과 같습니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "ep1")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .with("Neptune#ml.disableInductiveInferenceMetadataCache")
 .V('101').properties("rating")
 .with("Neptune#ml.regression")
 .with("Neptune#ml.inductiveInference")
```

## `Neptune#ml.endpoint`
<a name="machine-learning-gremlin-inference-neptune-ml-endpoint-predicate"></a>

`Neptune#ml.endpoint` 조건자는 필요한 경우 추론 엔드포인트를 지정하는 `with()` 단계에서 사용됩니다.

```
 .with("Neptune#ml.endpoint", "the model's SageMaker AI inference endpoint")
```

`id` 또는 URL을 통해 엔드포인트를 식별할 수 있습니다. 예제:

```
 .with( "Neptune#ml.endpoint", "node-classification-movie-lens-endpoint" )
```

또는 다음과 같습니다.

```
 .with( "Neptune#ml.endpoint", "https://runtime.sagemaker.us-east-1.amazonaws.com/endpoints/node-classification-movie-lens-endpoint/invocations" )
```

**참고**  
Neptune DB 클러스터 파라미터 그룹의 [`neptune_ml_endpoint` 파라미터](machine-learning-cluster-setup.md#machine-learning-set-inference-endpoint-cluster-parameter)를 엔드포인트 `id` 또는 URL로 설정하는 경우 각 쿼리에 `Neptune#ml.endpoint` 조건자를 포함할 필요가 없습니다.

## `Neptune#ml.iamRoleArn`
<a name="machine-learning-gremlin-inference-neptune-ml-iamRoleArn-predicate"></a>

`Neptune#ml.iamRoleArn`은 필요한 경우 SageMaker AI 실행 IAM 역할의 ARN을 지정하는 `with()` 단계에서 사용됩니다.

```
 .with("Neptune#ml.iamRoleArn", "the ARN for the SageMaker AI execution IAM role")
```

SageMaker AI 실행 IAM 역할을 만드는 방법에 대한 자세한 내용은 [사용자 지정 NeptuneSageMakerIAMRole 역할 생성](machine-learning-manual-setup.md#ml-manual-setup-sm-role)을 참조하세요.

**참고**  
Neptune DB 클러스터 파라미터 그룹의 [`neptune_ml_iam_role` 파라미터](machine-learning-cluster-setup.md#machine-learning-enabling-create-param-group)를 SageMaker AI 실행 IAM 역할의 ARN으로 설정하는 경우 각 쿼리에 `Neptune#ml.iamRoleArn` 조건자를 포함할 필요가 없습니다.

## Neptune\$1ml.inductiveInference
<a name="machine-learning-gremlin-inference-neptune-ml-inductiveInference"></a>

Gremlin에서는 변환 추론 기능이 기본적으로 활성화되어 있습니다. [실시간 유도 추론](machine-learning-overview-evolving-data.md#inductive-vs-transductive-inference) 쿼리를 만들려면 다음과 같이 `Neptune#ml.inductiveInference` 조건자를 포함하세요.

```
.with("Neptune#ml.inductiveInference")
```

동적 그래프인 경우 유도 추론이 최선의 선택인 경우가 많지만, 그래프가 정적이면 변환 추론이 더 빠르고 효율적입니다.

## `Neptune#ml.limit`
<a name="machine-learning-gremlin-inference-neptune-ml-limit-predicate"></a>

`Neptune#ml.limit` 조건자는 엔터티당 반환되는 결과 수를 필요에 따라 제한합니다.

```
 .with( "Neptune#ml.limit", 2 )
```

기본적으로 제한은 1이고 설정할 수 있는 최대 수는 100입니다.

## `Neptune#ml.threshold`
<a name="machine-learning-gremlin-inference-neptune-ml-threshold-predicate"></a>

`Neptune#ml.threshold` 조건자는 필요에 따라 결과 점수에 대한 차단 임계값을 설정합니다.

```
 .with( "Neptune#ml.threshold", 0.5D )
```

이렇게 하면 점수가 지정된 임계값 미만인 결과를 모두 무시할 수 있습니다.

## `Neptune#ml.classification`
<a name="machine-learning-gremlin-inference-neptune-ml-classification-predicate"></a>

`Neptune#ml.classification` 조건자는 노드 분류 모델의 SageMaker AI 엔드포인트에서 속성을 가져와야 함을 설정하는 `properties()` 단계에 연결됩니다.

```
 .properties( "property key of the node classification model" ).with( "Neptune#ml.classification" )
```

## `Neptune#ml.regression`
<a name="machine-learning-gremlin-inference-neptune-ml-regression-predicate"></a>

`Neptune#ml.regression` 조건자는 노드 회귀 모델의 SageMaker AI 엔드포인트에서 속성을 가져와야 함을 설정하는 `properties()` 단계에 연결됩니다.

```
 .properties( "property key of the node regression model" ).with( "Neptune#ml.regression" )
```

## `Neptune#ml.prediction`
<a name="machine-learning-gremlin-inference-neptune-ml-prediction-predicate"></a>

`Neptune#ml.prediction` 조건자는 연결 예측 쿼리임을 확인하는 `in()` 및 `out()` 단계에 연결됩니다.

```
 .in("edge label of the link prediction model").with("Neptune#ml.prediction").hasLabel("target node label")
```

## `Neptune#ml.score`
<a name="machine-learning-gremlin-inference-neptune-ml-score-predicate"></a>

`Neptune#ml.score` 조건자는 Gremlin 노드 또는 엣지 분류 쿼리에서 기계 학습 신뢰도 점수를 가져오는 데 사용됩니다. 노드 또는 엣지 분류 쿼리에 대한 ML 신뢰도 점수를 얻으려면 `properties()` 단계에서 `Neptune#ml.score` 조건자를 쿼리 조건자와 함께 전달해야 합니다.

[기타 노드 분류 예제](machine-learning-gremlin-vertex-classification-queries.md#machine-learning-gremlin-node-class-other-queries)가 포함된 노드 분류 예와 [엣지 분류 섹션](machine-learning-gremlin-edge-classification-queries.md)에서 엣지 분류 예제를 찾을 수 있습니다.

# Neptune ML의 Gremlin 노드 분류 쿼리
<a name="machine-learning-gremlin-vertex-classification-queries"></a>

Neptune ML의 Gremlin 노드 분류의 경우:
+ 모델은 버텍스의 한 속성에 대해 훈련됩니다. 이 속성의 고유한 값 세트를 노드 클래스 세트 또는 간단히 클래스라고 합니다.
+ 버텍스 속성의 노드 클래스 또는 범주형 속성 값은 노드 분류 모델에서 유추할 수 있습니다. 이는 이 속성이 아직 버텍스에 연결되지 않은 경우에 유용합니다.
+ 노드 분류 모델에서 하나 이상의 클래스를 가져오려면 조건자 `Neptune#ml.classification`과 함께 `with()` 단계를 사용하여 `properties()` 단계를 구성해야 합니다. 출력 형식은 버텍스 속성일 때 예상할 수 있는 것과 비슷합니다.

**참고**  
노드 분류는 문자열 속성 값에서만 작동합니다. 즉, 문자열에 해당하는 항목인 `"0"` 및 `"1"`은 지원되지만, `0` 또는 `1`과 같은 숫자 속성 값은 지원되지 않습니다. 마찬가지로, 부울 속성 값 `true` 및 `false`도 작동하지 않지만, `"true"` 및 `"false"`는 작동합니다.

다음은 샘플 노드 분류 쿼리입니다.

```
g.with( "Neptune#ml.endpoint","node-classification-movie-lens-endpoint" )
 .with( "Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role" )
 .with( "Neptune#ml.limit", 2 )
 .with( "Neptune#ml.threshold", 0.5D )
 .V( "movie_1", "movie_2", "movie_3" )
 .properties("genre").with("Neptune#ml.classification")
```

이 쿼리의 출력은 다음과 같습니다.

```
==>vp[genre->Action]
==>vp[genre->Crime]
==>vp[genre->Comedy]
```

위 쿼리에서는 `V()` 및 `properties()` 단계가 다음과 같이 사용됩니다.

이 `V()` 단계에는 노드 분류 모델에서 클래스를 가져오려는 버텍스 세트가 포함됩니다.

```
 .V( "movie_1", "movie_2", "movie_3" )
```

`properties()` 단계에는 모델이 훈련된 키가 포함되어 있으며, 노드 분류 ML 추론 쿼리임을 나타내는 `.with("Neptune#ml.classification")`가 있습니다.

여러 속성 키는 현재 `properties().with("Neptune#ml.classification")` 단계에서 지원되지 않습니다. 예를 들어, 다음과 같은 쿼리로 인해 예외가 발생합니다.

```
g.with("Neptune#ml.endpoint", "node-classification-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V( "movie_1", "movie_2", "movie_3" )
 .properties("genre", "other_label").with("Neptune#ml.classification")
```

구체적인 오류 메시지는 [Neptune ML 예외 목록](machine-learning-gremlin-exceptions.md)을 참조하세요.

`properties().with("Neptune#ml.classification")` 단계는 다음 단계 중 하나와 함께 사용할 수 있습니다.
+ `value()`
+ `value().is()`
+ `hasValue()`
+ `has(value,"")`
+ `key()`
+ `key().is()`
+ `hasKey()`
+ `has(key,"")`
+ `path()`

## 기타 노드 분류 쿼리
<a name="machine-learning-gremlin-node-class-other-queries"></a>

추론 엔드포인트와 해당 IAM 역할을 모두 DB 클러스터 파라미터 그룹에 저장한 경우 노드 분류 쿼리는 다음과 같이 간단하게 나타날 수 있습니다.

```
g.V("movie_1", "movie_2", "movie_3").properties("genre").with("Neptune#ml.classification")
```

다음 `union()` 단계를 사용하여 쿼리에 버텍스 속성과 클래스를 혼합할 수 있습니다.

```
g.with("Neptune#ml.endpoint","node-classification-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V( "movie_1", "movie_2", "movie_3" )
 .union(
   properties("genre").with("Neptune#ml.classification"),
   properties("genre")
 )
```

다음과 같이 무한 쿼리를 만들 수도 있습니다.

```
g.with("Neptune#ml.endpoint","node-classification-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V()
 .properties("genre").with("Neptune#ml.classification")
```

다음 `as()` 단계와 함께 `select()` 단계를 사용하여 버텍스와 노드 클래스를 검색할 수 있습니다.

```
g.with("Neptune#ml.endpoint","node-classification-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V( "movie_1", "movie_2", "movie_3" ).as("vertex")
 .properties("genre").with("Neptune#ml.classification").as("properties")
 .select("vertex","properties")
```

다음 예제에 나와 있는 것처럼 노드 클래스를 기준으로 필터링할 수도 있습니다.

```
g.with("Neptune#ml.endpoint", "node-classification-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V( "movie_1", "movie_2", "movie_3" )
 .properties("genre").with("Neptune#ml.classification")
 .has(value, "Horror")

g.with("Neptune#ml.endpoint","node-classification-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V( "movie_1", "movie_2", "movie_3" )
 .properties("genre").with("Neptune#ml.classification")
 .has(value, P.eq("Action"))

g.with("Neptune#ml.endpoint","node-classification-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V( "movie_1", "movie_2", "movie_3" )
 .properties("genre").with("Neptune#ml.classification")
 .has(value, P.within("Action", "Horror"))
```

`Neptune#ml.score` 조건자를 사용하여 노드 분류 신뢰도 점수를 얻을 수 있습니다.

```
 g.with("Neptune#ml.endpoint","node-classification-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V( "movie_1", "movie_2", "movie_3" )
 .properties("genre", "Neptune#ml.score").with("Neptune#ml.classification")
```

응답은 다음과 같습니다.

```
==>vp[genre->Action]
==>vp[Neptune#ml.score->0.01234567]
==>vp[genre->Crime]
==>vp[Neptune#ml.score->0.543210]
==>vp[genre->Comedy]
==>vp[Neptune#ml.score->0.10101]
```

## 노드 분류 쿼리에서 유도 추론 사용
<a name="machine-learning-gremlin-node-class-inductive"></a>

Jupyter Notebook의 기존 그래프에 다음과 같이 새 노드를 추가한다고 가정해 보겠습니다.

```
%%gremlin
g.addV('label1').property(id,'101').as('newV')
 .V('1').as('oldV1')
 .V('2').as('oldV2')
 .addE('eLabel1').from('newV').to('oldV1')
 .addE('eLabel2').from('oldV2').to('newV')
```

그런 다음 유도 추론 쿼리를 사용하여 새 노드를 반영하는 장르 및 신뢰도 점수를 얻을 수 있습니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "nc-ep")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .V('101').properties("genre", "Neptune#ml.score")
 .with("Neptune#ml.classification")
 .with("Neptune#ml.inductiveInference")
```

하지만 쿼리를 여러 번 실행하면 결과가 약간 다를 수 있습니다.

```
# First time
==>vp[genre->Action]
==>vp[Neptune#ml.score->0.12345678]

# Second time
==>vp[genre->Action]
==>vp[Neptune#ml.score->0.21365921]
```

동일한 쿼리를 결정적으로 만들 수 있습니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "nc-ep")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .V('101').properties("genre", "Neptune#ml.score")
 .with("Neptune#ml.classification")
 .with("Neptune#ml.inductiveInference")
 .with("Neptune#ml.deterministic")
```

그러면 결과는 매번 거의 동일하게 나타납니다.

```
# First time
==>vp[genre->Action]
==>vp[Neptune#ml.score->0.12345678]
# Second time
==>vp[genre->Action]
==>vp[Neptune#ml.score->0.12345678]
```

# Neptune ML의 Gremlin 노드 회귀 쿼리
<a name="machine-learning-gremlin-vertex-regression-queries"></a>

노드 회귀는 각 노드의 회귀 모델에서 유추된 값이 수치라는 점을 제외하면 노드 분류와 유사합니다. 다음과 같은 차이점을 제외하고 노드 분류와 동일한 Gremlin 쿼리를 노드 회귀에 사용할 수 있습니다.
+ 다시 말하지만, Neptune ML에서 노드는 버텍스를 나타냅니다.
+ `properties()` 단계는 `properties().with("Neptune#ml.classification")` 대신 `properties().with("Neptune#ml.regression")` 형식을 취합니다.
+ `"Neptune#ml.limit`"와 `"Neptune#ml.threshold"` 조건자는 적용할 수 없습니다.
+ 값을 기준으로 필터링할 때는 숫자 값을 지정해야 합니다.

다음은 샘플 버텍스 분류 쿼리입니다.

```
g.with("Neptune#ml.endpoint","node-regression-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::0123456789:role/sagemaker-role")
 .V("movie_1","movie_2","movie_3")
 .properties("revenue").with("Neptune#ml.regression")
```

다음 예제에 나와 있는 것처럼 회귀 모델을 사용하여 추론된 값을 기준으로 필터링할 수 있습니다.

```
g.with("Neptune#ml.endpoint","node-regression-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V("movie_1","movie_2","movie_3")
 .properties("revenue").with("Neptune#ml.regression")
 .value().is(P.gte(1600000))

g.with("Neptune#ml.endpoint","node-regression-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V("movie_1","movie_2","movie_3")
 .properties("revenue").with("Neptune#ml.regression")
 .hasValue(P.lte(1600000D))
```

## 노드 회귀 쿼리에서 유도 추론 사용
<a name="machine-learning-gremlin-node-regress-inductive"></a>

Jupyter Notebook의 기존 그래프에 다음과 같이 새 노드를 추가한다고 가정해 보겠습니다.

```
%%gremlin
g.addV('label1').property(id,'101').as('newV')
 .V('1').as('oldV1')
 .V('2').as('oldV2')
 .addE('eLabel1').from('newV').to('oldV1')
 .addE('eLabel2').from('oldV2').to('newV')
```

그런 다음 유도 추론 쿼리를 사용하여 새 노드를 고려한 평점을 얻을 수 있습니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "nr-ep")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .V('101').properties("rating")
 .with("Neptune#ml.regression")
 .with("Neptune#ml.inductiveInference")
```

쿼리는 결정적이지 않기 때문에 여러 번 실행하면 주변 환경에 따라 다소 다른 결과가 반환될 수 있습니다.

```
# First time
==>vp[rating->9.1]

# Second time
==>vp[rating->8.9]
```

좀 더 일관된 결과가 필요한 경우 쿼리를 결정적으로 만들면 됩니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "nc-ep")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .V('101').properties("rating")
 .with("Neptune#ml.regression")
 .with("Neptune#ml.inductiveInference")
 .with("Neptune#ml.deterministic")
```

이제 결과는 매번 거의 동일하게 나타납니다.

```
# First time
==>vp[rating->9.1]

# Second time
==>vp[rating->9.1]
```

# Neptune ML의 Gremlin 엣지 분류 쿼리
<a name="machine-learning-gremlin-edge-classification-queries"></a>

Neptune ML의 Gremlin 엣지 분류의 경우:
+ 모델은 엣지의 한 속성에 대해 훈련됩니다. 이 속성의 고유한 값 세트를 클래스 세트라고 합니다.
+ 엣지의 클래스 또는 범주형 속성 값은 엣지 분류 모델에서 유추할 수 있으며, 이는 이 속성이 아직 엣지에 연결되지 않은 경우에 유용합니다.
+ 엣지 분류 모델에서 하나 이상의 클래스를 가져오려면 조건자 `"Neptune#ml.classification"`과 함께 `with()` 단계를 사용하여 `properties()` 단계를 구성해야 합니다. 출력 형식은 엣지 속성일 때 예상할 수 있는 것과 비슷합니다.

**참고**  
엣지 분류는 문자열 속성 값에서만 작동합니다. 즉, 문자열에 해당하는 항목인 `"0"` 및 `"1"`은 지원되지만, `0` 또는 `1`과 같은 숫자 속성 값은 지원되지 않습니다. 마찬가지로, 부울 속성 값 `true` 및 `false`도 작동하지 않지만, `"true"` 및 `"false"`는 작동합니다.

다음은 `Neptune#ml.score` 조건자를 사용하여 신뢰도 점수를 요청하는 엣지 분류 쿼리의 예제입니다.

```
g.with("Neptune#ml.endpoint","edge-classification-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .E("relationship_1","relationship_2","relationship_3")
 .properties("knows_by", "Neptune#ml.score").with("Neptune#ml.classification")
```

응답은 다음과 같습니다.

```
==>p[knows_by->"Family"]
==>p[Neptune#ml.score->0.01234567]
==>p[knows_by->"Friends"]
==>p[Neptune#ml.score->0.543210]
==>p[knows_by->"Colleagues"]
==>p[Neptune#ml.score->0.10101]
```

## Gremlin 엣지 분류 쿼리의 구문
<a name="machine-learning-gremlin-edge-classification-syntax"></a>

`User`가 헤드 및 테일 노드이고 `Relationship`이 이들을 연결하는 엣지인 단순 그래프의 경우 엣지 분류 쿼리의 예제는 다음과 같습니다.

```
g.with("Neptune#ml.endpoint","edge-classification-social-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .E("relationship_1","relationship_2","relationship_3")
 .properties("knows_by").with("Neptune#ml.classification")
```

이 쿼리의 출력은 다음과 같습니다.

```
==>p[knows_by->"Family"]
==>p[knows_by->"Friends"]
==>p[knows_by->"Colleagues"]
```

위 쿼리에서는 `E()` 및 `properties()` 단계가 다음과 같이 사용됩니다.
+ 이 `E()` 단계에는 엣지 분류 모델에서 클래스를 가져오려는 엣지 세트가 포함됩니다.

  ```
  .E("relationship_1","relationship_2","relationship_3")
  ```
+ `properties()` 단계에는 모델이 훈련된 키가 포함되어 있으며, 엣지 분류 ML 추론 쿼리임을 나타내는 `.with("Neptune#ml.classification")`가 있습니다.

여러 속성 키는 현재 `properties().with("Neptune#ml.classification")` 단계에서 지원되지 않습니다. 예를 들어, 다음 쿼리를 실행하면 예외가 발생합니다.

```
g.with("Neptune#ml.endpoint","edge-classification-social-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .E("relationship_1","relationship_2","relationship_3")
 .properties("knows_by", "other_label").with("Neptune#ml.classification")
```

구체적인 오류 메시지는 [Neptune ML Gremlin 추론 쿼리의 예외 목록](machine-learning-gremlin-exceptions.md)을 참조하세요.

`properties().with("Neptune#ml.classification")` 단계는 다음 단계 중 하나와 함께 사용할 수 있습니다.
+ `value()`
+ `value().is()`
+ `hasValue()`
+ `has(value,"")`
+ `key()`
+ `key().is()`
+ `hasKey()`
+ `has(key,"")`
+ `path()`

## 엣지 분류 쿼리에서 유도 추론 사용
<a name="machine-learning-gremlin-edge-class-inductive"></a>

Jupyter Notebook의 기존 그래프에 다음과 같이 새 엣지를 추가한다고 가정해 보겠습니다.

```
%%gremlin
g.V('1').as('fromV')
.V('2').as('toV')
.addE('eLabel1').from('fromV').to('toV').property(id, 'e101')
```

그런 다음 유도 추론 쿼리를 사용하여 새 엣지를 고려한 척도를 얻을 수 있습니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "ec-ep")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .E('e101').properties("scale", "Neptune#ml.score")
 .with("Neptune#ml.classification")
 .with("Neptune#ml.inductiveInference")
```

쿼리는 결정적이지 않기 때문에 무작위 주변 환경에 따라 여러 번 실행하면 결과가 약간 달라질 수 있습니다.

```
# First time
==>vp[scale->Like]
==>vp[Neptune#ml.score->0.12345678]

# Second time
==>vp[scale->Like]
==>vp[Neptune#ml.score->0.21365921]
```

좀 더 일관된 결과가 필요한 경우 쿼리를 결정적으로 만들면 됩니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "ec-ep")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .E('e101').properties("scale", "Neptune#ml.score")
 .with("Neptune#ml.classification")
 .with("Neptune#ml.inductiveInference")
 .with("Neptune#ml.deterministic")
```

이제 쿼리를 실행할 때마다 결과는 거의 동일합니다.

```
# First time
==>vp[scale->Like]
==>vp[Neptune#ml.score->0.12345678]

# Second time
==>vp[scale->Like]
==>vp[Neptune#ml.score->0.12345678]
```

# Neptune ML의 Gremlin 엣지 회귀 쿼리
<a name="machine-learning-gremlin-edge-regression"></a>

엣지 회귀는 ML 모델에서 유추된 값이 수치라는 점을 제외하면 엣지 분류와 유사합니다. 엣지 회귀의 경우 Neptune ML은 분류와 동일한 쿼리를 지원합니다.

주목해야 할 주요 사항은 다음과 같습니다.
+ 이 사용 사례에 맞게 `properties()` 단계를 구성하려면 ML 조건자 `"Neptune#ml.regression"`을 사용해야 합니다.
+ 이 사용 사례에는 `"Neptune#ml.limit"` 및 `"Neptune#ml.threshold"` 조건자를 적용할 수 없습니다.
+ 값을 필터링하려면 값을 숫자로 지정해야 합니다.

## Gremlin 엣지 회귀 쿼리 구문
<a name="machine-learning-gremlin-edge-regression-syntax"></a>

`User`가 헤드 노드이고, `Movie`가 테일 노드이며, `Rated`가 이들을 연결하는 엣지인 단순 그래프의 경우 `Rated` 엣지에 대한 숫자 평점 값(여기에서는 점수라고 함)을 찾는 엣지 회귀 쿼리의 예제는 다음과 같습니다.

```
g.with("Neptune#ml.endpoint","edge-regression-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .E("rating_1","rating_2","rating_3")
 .properties("score").with("Neptune#ml.regression")
```

ML 회귀 모델에서 추론된 값을 기준으로 필터링할 수도 있습니다. `"rating_1"`, `"rating_2"`, `"rating_3"`으로 식별된 기존의 `Rated` 엣지(`User`에서 `Movie`까지)의 경우, 해당 평점에 대해 엣지 속성 `Score`가 없다면 다음과 같은 쿼리를 사용하여 9보다 크거나 같은 엣지에 대한 `Score`를 추론할 수 있습니다.

```
g.with("Neptune#ml.endpoint","edge-regression-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .E("rating_1","rating_2","rating_3")
 .properties("score").with("Neptune#ml.regression")
 .value().is(P.gte(9))
```

## 엣지 회귀 쿼리에서 유도 추론 사용
<a name="machine-learning-gremlin-edge-regression-inductive"></a>

Jupyter Notebook의 기존 그래프에 다음과 같이 새 엣지를 추가한다고 가정해 보겠습니다.

```
%%gremlin
g.V('1').as('fromV')
.V('2').as('toV')
.addE('eLabel1').from('fromV').to('toV').property(id, 'e101')
```

그런 다음 유도 추론 쿼리를 사용하여 새 엣지를 고려한 점수를 얻을 수 있습니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "er-ep")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .E('e101').properties("score")
 .with("Neptune#ml.regression")
 .with("Neptune#ml.inductiveInference")
```

쿼리는 결정적이지 않기 때문에 무작위 주변 환경에 따라 여러 번 실행하면 결과가 약간 달라질 수 있습니다.

```
# First time
==>ep[score->96]

# Second time
==>ep[score->91]
```

좀 더 일관된 결과가 필요한 경우 쿼리를 결정적으로 만들면 됩니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "er-ep")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .E('e101').properties("score")
 .with("Neptune#ml.regression")
 .with("Neptune#ml.inductiveInference")
 .with("Neptune#ml.deterministic")
```

이제 쿼리를 실행할 때마다 결과는 거의 동일합니다.

```
# First time
==>ep[score->96]

# Second time
==>ep[score->96]
```

# Neptune ML의 연결 예측 모델을 사용한 Gremlin 연결 예측 쿼리
<a name="machine-learning-gremlin-link-prediction-queries"></a>

연결 예측 모델은 다음과 같은 문제를 해결할 수 있습니다.
+ **헤드 노드 예측**: 버텍스와 엣지 유형이 주어졌을 때, 해당 버텍스는 어떤 버텍스에서 연결될 가능성이 높은가요?
+ **테일 노드 예측**: 버텍스와 엣지 레이블이 주어졌을 때, 해당 버텍스는 어떤 버텍스와 연결될 가능성이 있나요?

**참고**  
엣지 예측은 Neptune ML에서 아직 지원되지 않습니다.

아래 예제에서는 엣지 `Rated`로 연결된 버텍스 `User` 및 `Movie`가 있는 간단한 그래프를 생각해 보세요.

다음은 영화 `"movie_1"`, `"movie_2"`, `"movie_3"`에 평점을 매길 가능성이 가장 높은 상위 5명의 사용자를 예측하는 데 사용되는 샘플 헤드 노드 예측 쿼리입니다.

```
g.with("Neptune#ml.endpoint","node-prediction-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .with("Neptune#ml.limit", 5)
 .V("movie_1", "movie_2", "movie_3")
 .in("rated").with("Neptune#ml.prediction").hasLabel("user")
```

다음은 테일 노드 예측에 대한 유사한 예로서, 사용자 `"user_1"`이 평점을 매길 가능성이 높은 상위 5개 영화를 예측하는 데 사용됩니다.

```
g.with("Neptune#ml.endpoint","node-prediction-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V("user_1")
 .out("rated").with("Neptune#ml.prediction").hasLabel("movie")
```

엣지 레이블과 예측된 버텍스 레이블이 모두 필요합니다. 둘 중 하나를 생략하면 예외가 발생합니다. 예를 들어, 예측된 버텍스 레이블이 없는 다음 쿼리는 예외가 발생합니다.

```
g.with("Neptune#ml.endpoint","node-prediction-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V("user_1")
 .out("rated").with("Neptune#ml.prediction")
```

마찬가지로, 엣지 레이블이 없는 다음 쿼리에서도 예외가 발생합니다.

```
g.with("Neptune#ml.endpoint","node-prediction-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V("user_1")
 .out().with("Neptune#ml.prediction").hasLabel("movie")
```

이러한 예외가 반환하는 특정 오류 메시지는 [Neptune ML 예외 목록](machine-learning-gremlin-exceptions.md)을 참조하세요.

## 기타 연결 예측 쿼리
<a name="machine-learning-gremlin-other-link-prediction-queries"></a>

`select()` 단계를 `as(`) 단계와 함께 사용하여 예측된 버텍스를 입력 버텍스와 함께 출력할 수 있습니다.

```
g.with("Neptune#ml.endpoint","node-prediction-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V("movie_1").as("source")
 .in("rated").with("Neptune#ml.prediction").hasLabel("user").as("target")
 .select("source","target")

g.with("Neptune#ml.endpoint","node-prediction-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V("user_1").as("source")
 .out("rated").with("Neptune#ml.prediction").hasLabel("movie").as("target")
 .select("source","target")
```

다음과 같이 무한 쿼리를 만들 수 있습니다.

```
g.with("Neptune#ml.endpoint","node-prediction-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V("user_1")
 .out("rated").with("Neptune#ml.prediction").hasLabel("movie")

g.with("Neptune#ml.endpoint","node-prediction-movie-lens-endpoint")
 .with("Neptune#ml.iamRoleArn","arn:aws:iam::0123456789:role/sagemaker-role")
 .V("movie_1")
 .in("rated").with("Neptune#ml.prediction").hasLabel("user")
```

## 연결 예측 쿼리에서 유도 추론 사용
<a name="machine-learning-gremlin-link-predict-inductive"></a>

Jupyter Notebook의 기존 그래프에 다음과 같이 새 노드를 추가한다고 가정해 보겠습니다.

```
%%gremlin
g.addV('label1').property(id,'101').as('newV1')
 .addV('label2').property(id,'102').as('newV2')
 .V('1').as('oldV1')
 .V('2').as('oldV2')
 .addE('eLabel1').from('newV1').to('oldV1')
 .addE('eLabel2').from('oldV2').to('newV2')
```

그런 다음 유도 추론 쿼리를 사용하여 새 노드를 고려하면서 헤드 노드를 예측할 수 있습니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "lp-ep")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .V('101').out("eLabel1")
 .with("Neptune#ml.prediction")
 .with("Neptune#ml.inductiveInference")
 .hasLabel("label2")
```

결과:

```
==>V[2]
```

마찬가지로, 유도 추론 쿼리를 사용하여 새 노드를 고려하면서 테일 노드를 예측할 수 있습니다.

```
%%gremlin
g.with("Neptune#ml.endpoint", "lp-ep")
 .with("Neptune#ml.iamRoleArn", "arn:aws:iam::123456789012:role/NeptuneMLRole")
 .V('102').in("eLabel2")
 .with("Neptune#ml.prediction")
 .with("Neptune#ml.inductiveInference")
 .hasLabel("label1")
```

결과:

```
==>V[1]
```

# Neptune ML Gremlin 추론 쿼리의 예외 목록
<a name="machine-learning-gremlin-exceptions"></a>

 이는 Neptune ML Gremlin 추론 쿼리를 실행할 때 발생할 수 있는 포괄적인 예외 목록입니다. 이러한 예외는 지정된 IAM 역할 또는 엔드포인트의 문제부터 지원되지 않는 Gremlin 단계 및 쿼리당 ML 추론 쿼리 수 제한에 이르기까지 다양한 문제를 다룹니다. 각 항목에는 문제를 설명하는 자세한 메시지가 포함되어 있습니다.
+ **`BadRequestException`**   –   제공된 역할의 보안 인증 정보를 로드할 수 없습니다.

  *Message*: `Unable to load credentials for role: the specified IAM Role ARN.`
+ **`BadRequestException`** – 지정된 IAM 역할은 SageMaker AI 엔드포인트를 간접적으로 호출할 권한이 없습니다.

  *Message*: `User: the specified IAM Role ARN is not authorized to perform: sagemaker:InvokeEndpoint on resource: the specified endpoint.`
+ **`BadRequestException`**   –   지정된 엔드포인트가 존재하지 않습니다.

  *Message*: `Endpoint the specified endpoint not found.`
+ **`InternalFailureException`**   –   Amazon S3에서 Neptune ML 실시간 유도 추론 메타데이터를 가져올 수 없습니다.

  *Message*: `Unable to fetch Neptune ML - Real-Time Inductive Inference metadata from S3. Check the permissions of the S3 bucket or if the Neptune instance can connect to S3.`
+ **`InternalFailureException`**   –   Neptune ML은 Amazon S3에서의 실시간 유도 추론을 위한 메타데이터 파일을 찾을 수 없습니다.

  *Message*: `Neptune ML cannot find the metadata file for Real-Time Inductive Inference in S3.`
+ **`InvalidParameterException`**   –   지정된 엔드포인트가 구문상 유효하지 않습니다.

  *Message*: `Invalid endpoint provided for external service query.`
+ **`InvalidParameterException`**   –   지정된 SageMaker 실행 IAM 역할 ARN이 구문상 유효하지 않습니다.

  *Message*: `Invalid IAM role ARN provided for external service query.`
+ **`InvalidParameterException`**   –   쿼리의 `properties()` 단계에서 여러 속성 키가 지정됩니다.

  *Message*: `ML inference queries are currently supported for one property key.`
+ **`InvalidParameterException`**   –   쿼리에 여러 개의 엣지 레이블이 지정됩니다.

  *Message*: `ML inference are currently supported only with one edge label.`
+ **`InvalidParameterException`**   –   쿼리에 버텍스 레이블 제약 조건이 여러 개 지정됩니다.

  *Message*: `ML inference are currently supported only with one vertex label constraint.`
+ **`InvalidParameterException`**   –   `Neptune#ml.classification` 조건자와 `Neptune#ml.regression` 조건자가 모두 동일한 쿼리에 있습니다.

  *Message*: `Both regression and classification ML predicates cannot be specified in the query.`
+ **`InvalidParameterException`**   –   연결 예측 쿼리의 `in()` 또는 `out()` 단계에서 둘 이상의 엣지 레이블이 지정되었습니다.

  *Message*: `ML inference are currently supported only with one edge label.`
+ **`InvalidParameterException`**   –   Neptune\$1ml.score에 둘 이상의 속성 키가 지정되었습니다.

  *Message*: `Neptune ML inference queries are currently supported for one property key and one Neptune#ml.score property key.`
+ **`MissingParameterException`**   –   엔드포인트가 쿼리에 지정되지 않았거나 DB 클러스터 파라미터로 지정되지 않았습니다.

  *Message*: `No endpoint provided for external service query.`
+ **``MissingParameterException** – SageMaker AI 실행 IAM 역할이 쿼리에 지정되지 않았거나 DB 클러스터 파라미터로 지정되지 않았습니다.

  *Message*: `No IAM role ARN provided for external service query.`
+ **`MissingParameterException`**   –   쿼리의 `properties()` 단계에서 속성 키가 누락되었습니다.

  *Message*: `Property key needs to be specified using properties() step for ML inference queries.`
+ **`MissingParameterException`**   –   연결 예측 쿼리의 `in()` 또는 `out()` 단계에서 엣지 레이블이 지정되지 않았습니다.

  *Message*: `Edge label needs to be specified while using in() or out() step for ML inference queries.`
+ **`MissingParameterException`**   –   Neptune\$1ml.score에는 속성 키가 지정되지 않았습니다.

  *Message*: `Property key needs to be specified along with Neptune#ml.score property key while using the properties() step for Neptune ML inference queries.`
+ **`UnsupportedOperationException`**   –   이 `both()` 단계는 연결 예측 쿼리에 사용됩니다.

  *Message*: `ML inference queries are currently not supported with both() step.`
+ **`UnsupportedOperationException`**   –   연결 예측 쿼리의 `in()` 또는 `out()` 단계와 함께 `has()` 단계에서 예측된 버텍스 레이블이 지정되지 않았습니다.

  *Message*: `Predicted vertex label needs to be specified using has() step for ML inference queries.`
+ **`UnsupportedOperationException`**   –   Gremlin ML 유도 추론 쿼리는 현재 최적화되지 않은 단계에서 지원되지 않습니다.

  *Message*: `Neptune ML - Real-Time Inductive Inference queries are currently not supported with Gremlin steps which are not optimized for Neptune. Check the Neptune User Guide for a list of Neptune-optimized steps.`
+ **`UnsupportedOperationException`**   –   Neptune ML 추론 쿼리는 현재 `repeat` 단계 내에서 지원되지 않습니다.

  *Message*: `Neptune ML inference queries are currently not supported inside a repeat step.`
+ **`UnsupportedOperationException`**   –   현재 Gremlin 쿼리당 지원되는 Neptune ML 추론 쿼리는 하나뿐입니다.

  *Message*: `Neptune ML inference queries are currently supported only with one ML inference query per gremlin query.`