메인 콘텐츠로 건너뛰기

클래스 OnAddArtifactTag

아티팩트 버전에 새 태그가 부여됩니다. 예시: 컬렉션 “my-collection”의 아티팩트 버전에 태그 “prod”가 부여될 때마다 트리거되는 이벤트를 정의합니다:
from wandb import Api
from wandb.automations import OnAddArtifactTag, ArtifactEvent

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

event = OnAddArtifactTag(
    scope=collection,
    filter=ArtifactEvent.tag.eq("prod"),
)

방법 OnAddArtifactTag.__init__

__init__(
    event_type: 'Literal[ADD_ARTIFACT_TAG]' = ADD_ARTIFACT_TAG,
    scope: 'wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope',
    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[ADD_ARTIFACT_TAG]):
  • scope (wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope): 이벤트의 범위입니다.
  • 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]): 이 이벤트가 트리거되기 위해 필요한 추가 조건이 있다면 이를 지정합니다.
반환값: OnAddArtifactTag 객체입니다.