메인 콘텐츠로 건너뛰기

class OnCreateArtifact

새 artifact가 생성될 때입니다. 예시: 컬렉션 “my-collection”에서 새 artifact가 생성될 때 트리거되는 이벤트를 정의합니다:
from wandb import Api
from wandb.automations import OnCreateArtifact

api = Api()
collection = api.artifact_collection(name="my-collection", type_name="model")

event = OnCreateArtifact(scope=collection)

메서드 OnCreateArtifact.__init__

__init__(
    event_type: 'Literal[CREATE_ARTIFACT]' = CREATE_ARTIFACT,
    scope: 'wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope',
    filter: 'wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any]' = And(())
) → None
인수:
  • event_type (Literal[CREATE_ARTIFACT]):
  • scope (wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope): 이벤트의 범위입니다. 아티팩트 컬렉션이어야 합니다.
  • filter (wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any]): 이 이벤트가 트리거되기 위해 필요한 추가 조건이 있는 경우 이를 지정합니다.
반환값: OnCreateArtifact 객체입니다.