CodeConfiguration 클래스

점수 매기기 작업에 대한 코드 구성입니다.

상속
azure.ai.ml.entities._mixins.DictMixin
CodeConfiguration

생성자

CodeConfiguration(code: str | PathLike | None = None, scoring_script: str | PathLike | None = None)

매개 변수

Name Description
code
Optional[Union[<xref:azure.ai.ml.entities.Code>, str]]

채점 스크립트를 포함하는 코드 디렉터리입니다. 코드는 Code 개체, 기존 코드 자산의 ARM 리소스 ID, 로컬 경로 또는 원격 위치를 가리키는 "http:", "https:" 또는 "azureml:" URL일 수 있습니다.

기본값: None
scoring_script

코드 디렉터리를 기준으로 하는 채점 스크립트 파일 경로입니다.

기본값: None

예제

BatchDeployment에 대한 CodeConfiguration 만들기


   from azure.ai.ml.entities import BatchDeployment, CodeConfiguration

   deployment = BatchDeployment(
       name="non-mlflow-deployment",
       description="this is a sample non-mlflow deployment",
       endpoint_name="my-batch-endpoint",
       model=model,
       code_configuration=CodeConfiguration(
           code="configs/deployments/model-2/onlinescoring", scoring_script="score1.py"
       ),
       environment="env",
       compute="cpu-cluster",
       instance_count=2,
       max_concurrency_per_instance=2,
       mini_batch_size=10,
       output_file_name="predictions.csv",
   )

메서드

get
has_key
items
keys
update
values

get

get(key: Any, default: Any | None = None) -> Any

매개 변수

Name Description
key
필수
default
기본값: None

has_key

has_key(k: Any) -> bool

매개 변수

Name Description
k
필수

items

items() -> list

keys

keys() -> list

update

update(*args: Any, **kwargs: Any) -> None

values

values() -> list

특성

scoring_script

코드 디렉터리를 기준으로 하는 채점 스크립트 파일 경로입니다.

반환

형식 Description
str