AmlCompute 클래스

AzureML 컴퓨팅 리소스.

상속
azure.ai.ml.entities._compute.compute.Compute
AmlCompute

생성자

AmlCompute(*, name: str, description: str | None = None, size: str | None = None, tags: dict | None = None, ssh_public_access_enabled: bool | None = None, ssh_settings: AmlComputeSshSettings | None = None, min_instances: int | None = None, max_instances: int | None = None, network_settings: NetworkSettings | None = None, idle_time_before_scale_down: int | None = None, identity: IdentityConfiguration | None = None, tier: str | None = None, enable_node_public_ip: bool = True, **kwargs: Any)

매개 변수

Name Description
name
필수
str

컴퓨팅 리소스의 이름입니다.

description
필수

컴퓨팅 리소스에 대한 설명입니다.

size
필수

컴퓨팅의 크기입니다. 기본값은 None입니다.

tags
필수

태그 집합입니다. 키/값 쌍으로 정의된 리소스 태그를 포함합니다.

ssh_settings
필수

AzureML 컴퓨팅 클러스터에 액세스하기 위한 SSH 설정입니다.

network_settings
필수

AzureML 컴퓨팅 클러스터에 대한 가상 네트워크 설정입니다.

idle_time_before_scale_down
필수

축소하기 전의 노드 유휴 시간입니다. 기본값은 None입니다.

identity
필수

컴퓨팅 클러스터와 연결된 ID입니다.

tier
필수

Virtual Machine 계층. 허용되는 값은 "Dedicated", "LowPriority"입니다. 기본값은 None입니다.

min_instances
필수

최소 인스턴스 수입니다. 기본값은 None입니다.

max_instances
필수

최대 인스턴스 수입니다. 기본값은 None입니다.

ssh_public_access_enabled
필수

공용 SSH 포트의 상태입니다. 허용되는 값은 다음과 같습니다.

  • False - 클러스터의 모든 노드에서 공용 SSH 포트가 닫혀 있음을 나타냅니다.
  • True - 클러스터의 모든 노드에서 공용 SSH 포트가 열려 있음을 나타냅니다.
  • 없음 - VNet이 정의된 경우 클러스터의 모든 노드에서 공용 SSH 포트가 닫혀 있음을 나타내고, 그렇지 않으면 모든 공용 노드가 열립니다. 클러스터를 만드는 동안에만 None일 수 있습니다. 만든 후에는 True 또는 False가 됩니다. 기본값은 None입니다.
enable_node_public_ip
필수

노드 공용 IP 주소 프로비저닝을 사용하거나 사용하지 않도록 설정합니다. 허용되는 값은 다음과 같습니다.

  • True - 컴퓨팅 노드에 공용 IP가 프로비전됨을 나타냅니다.
  • False - 컴퓨팅 노드에 프라이빗 엔드포인트가 있고 공용 IP가 없음을 나타냅니다. 기본값은 True입니다.

키워드 전용 매개 변수

Name Description
name
필수
description
필수
size
필수
tags
필수
ssh_public_access_enabled
필수
ssh_settings
필수
min_instances
필수
max_instances
필수
network_settings
필수
idle_time_before_scale_down
필수
identity
필수
tier
필수
enable_node_public_ip
기본값: True

예제

AmlCompute 개체 만들기


   from azure.ai.ml.entities import AmlCompute, IdentityConfiguration, ManagedIdentityConfiguration

   aml_compute = AmlCompute(
       name="my-aml-compute",
       min_instances=0,
       max_instances=10,
       idle_time_before_scale_down=100,
       identity=IdentityConfiguration(
           type="UserAssigned",
           user_assigned_identities=[
               ManagedIdentityConfiguration(
                   resource_id="/subscriptions/1234567-abcd-ef12-1234-12345/resourcegroups/our_rg_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/our-agent-aks"
               )
           ],
       ),
   )

메서드

dump

컴퓨팅 콘텐츠를 yaml 형식의 파일로 덤프합니다.

dump

컴퓨팅 콘텐츠를 yaml 형식의 파일로 덤프합니다.

dump(dest: str | PathLike | IO, **kwargs: Any) -> None

매개 변수

Name Description
dest
필수
Union[<xref:PathLike>, str, IO[AnyStr]]

이 컴퓨팅의 콘텐츠를 받을 대상입니다. 로컬 파일의 경로이거나 이미 열려 있는 파일 스트림이어야 합니다. dest가 파일 경로인 경우 새 파일이 만들어지고 파일이 있는 경우 예외가 발생합니다. dest가 열려 있는 파일인 경우 파일이 직접 기록되고 파일을 쓸 수 없는 경우 예외가 발생합니다.'

특성

base_path

리소스의 기본 경로입니다.

반환

형식 Description
str

리소스의 기본 경로입니다.

created_on

컴퓨팅 리소스 만들기 타임스탬프입니다.

반환

형식 Description

컴퓨팅 리소스 만들기 타임스탬프입니다.

creation_context

리소스의 만들기 컨텍스트입니다.

반환

형식 Description

리소스에 대한 만들기 메타데이터입니다.

id

리소스 ID입니다.

반환

형식 Description

리소스의 전역 ID인 ARM(Azure Resource Manager) ID입니다.

provisioning_errors

컴퓨팅 리소스 프로비저닝 오류입니다.

반환

형식 Description

컴퓨팅 리소스 프로비저닝 오류입니다.

provisioning_state

컴퓨팅 리소스의 프로비전 상태입니다.

반환

형식 Description

컴퓨팅 리소스의 프로비전 상태입니다.

type

컴퓨팅 유형입니다.

반환

형식 Description

컴퓨팅 유형입니다.