메인 콘텐츠로 건너뛰기

class OnAddArtifactAlias

artifact에 새 alias가 지정됩니다. 예시: collection “my-collection”의 임의의 artifact에 alias “prod”가 지정될 때마다 트리거되는 이벤트를 정의합니다:
from wandb import Api
from wandb.automations import OnAddArtifactAlias, ArtifactEvent

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

event = OnAddArtifactAlias(
    scope=collection,
    filter=ArtifactEvent.alias.eq("prod"),
)

방법 OnAddArtifactAlias.__init__

__init__(
    event_type: 'Literal[ADD_ARTIFACT_ALIAS]' = ADD_ARTIFACT_ALIAS,
    scope: '_ArtifactSequenceScope | _ArtifactPortfolioScope | ProjectScope',
    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[ADD_ARTIFACT_ALIAS]):
  • scope (Union[_ArtifactSequenceScope, _ArtifactPortfolioScope, ProjectScope]): 이 이벤트의 범위입니다.
  • filter (Union[And, Or, Nor, Not, Lt, Gt, Lte, Gte, Eq, Ne, In, NotIn, Exists, Regex, Contains, FilterExpr, Dict[str, Any]]): 이 이벤트를 트리거하는 데 필요한 추가 조건(있는 경우)입니다.
반환값: OnAddArtifactAlias 객체입니다.