メインコンテンツへスキップ
GitHub ソース

class OnAddArtifactAlias

アーティファクトに新しいエイリアスが割り当てられたときに発生するイベントです。 例: エイリアス “prod” がコレクション “my-collection” 内の任意のアーティファクトに 割り当てられたときに毎回トリガーされるイベントを定義します:
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 オブジェクト。