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

class OnCreateArtifact

新しい Artifacts が作成された際に発生するイベントです。 例: “my-collection” というコレクション内に新しい Artifacts が作成されたときにトリガーされるイベントを定義します。
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)

method 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
Args:
  • event_type (Literal[CREATE_ARTIFACT]):
  • scope (Union[_ArtifactSequenceScope, _ArtifactPortfolioScope]): イベントのスコープ。Artifacts コレクションである必要があります。
  • filter (Union[And, Or, Nor, Not, Lt, Gt, Lte, Gte, Eq, Ne, In, NotIn, Exists, Regex, Contains, FilterExpr, Dict[str, Any]]): このイベントがトリガーされるために必要な追加条件(ある場合)。
Returns: OnCreateArtifact オブジェクト。