Passer au contenu principal

class OnCreateArtifact

Un nouvel artifact est créé. Exemples : Définissez un événement qui se déclenche lorsqu’un nouvel artifact est créé dans la collection “my-collection” :
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)

méthode 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
Arguments :
  • event_type (Literal[CREATE_ARTIFACT]):
  • scope (Union[_ArtifactSequenceScope, _ArtifactPortfolioScope]) : La portée de l’événement : il doit s’agir d’une collection d’Artifacts.
  • filter (Union[And, Or, Nor, Not, Lt, Gt, Lte, Gte, Eq, Ne, In, NotIn, Exists, Regex, Contains, FilterExpr, Dict[str, Any]]) : Conditions supplémentaires, le cas échéant, requises pour déclencher cet événement.
Retourne : Un objet OnCreateArtifact.