메인 콘텐츠로 건너뛰기

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: '_ArtifactSequenceScope | _ArtifactPortfolioScope',
    filter: 'And | Or | Nor | Not | Lt | Gt | Lte | Gte | Eq | Ne | In | NotIn | Exists | Regex | Contains | FilterExpr | dict[str, Any]' = And(())
) → None
매개변수:
  • event_type (Literal[CREATE_ARTIFACT]):
  • scope (Union[_ArtifactSequenceScope, _ArtifactPortfolioScope]): 이벤트의 범위입니다. artifact 컬렉션이어야 합니다.
  • filter (Union[And, Or, Nor, Not, Lt, Gt, Lte, Gte, Eq, Ne, In, NotIn, Exists, Regex, Contains, FilterExpr, Dict[str, Any]]): 있는 경우, 이 이벤트가 트리거되기 위해 충족되어야 하는 추가 조건입니다.
반환값: OnCreateArtifact 객체입니다.