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

class OnLinkArtifact

新しい Artifact がコレクションにリンクされたときに発生するイベントです。 例: “my-collection” という名前のコレクションに、“prod” という エイリアス で Artifact がリンクされたときにトリガーされるイベントを定義します。
from wandb import Api
from wandb.automations import OnLinkArtifact, ArtifactEvent

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

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

method OnLinkArtifact.__init__

__init__(
    event_type: 'Literal[LINK_ARTIFACT]' = LINK_ARTIFACT,
    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
Args:
  • event_type (Literal[LINK_ARTIFACT]):
  • 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]]): このイベントをトリガーするために必要な追加条件(ある場合)。
Returns: OnLinkArtifact オブジェクト。