Passer au contenu principal

class OnLinkArtifact

Un nouvel artifact est associé à une collection. Exemples : Définissez un événement qui se déclenche lorsqu’un artifact est associé à la collection “my-collection” avec l’alias “prod” :
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"),
)

méthode 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
Arguments :
  • event_type (Literal[LINK_ARTIFACT]) :
  • scope (Union[_ArtifactSequenceScope, _ArtifactPortfolioScope, ProjectScope]) : Portée de l’événement.
  • 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 que cet événement se déclenche.
Retourne : Un objet OnLinkArtifact.