BetaRoutinesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

AIProjectClient's

<xref:routines> attribute.

Constructor

BetaRoutinesOperations(*args, **kwargs)

Methods

create_or_update

Create or update a routine.

Creates a new routine or replaces an existing routine with the supplied definition.

delete

Delete a routine.

Deletes the specified routine.

disable

Disable a routine.

Disables the specified routine so it no longer runs.

dispatch

Queue an asynchronous routine dispatch.

Queues an asynchronous dispatch for the specified routine.

enable

Enable a routine.

Enables the specified routine so it can be dispatched.

get

Get a routine.

Retrieves the specified routine and its current configuration.

list

List routines.

Returns the routines available in the current project.

list_runs

List prior runs for a routine.

Returns prior runs recorded for the specified routine.

create_or_update

Create or update a routine.

Creates a new routine or replaces an existing routine with the supplied definition.

async create_or_update(routine_name: str, *, content_type: str = 'application/json', description: str | None = None, enabled: bool | None = None, triggers: dict[str, _models.RoutineTrigger] | None = None, action: _models.RoutineAction | None = None, **kwargs: Any) -> _models.Routine

Parameters

Name Description
routine_name
Required
str

The unique name of the routine. Required.

body
<xref:JSON> or IO[bytes]

Is either a JSON type or a IO[bytes] type. Required.

Keyword-Only Parameters

Name Description
description
str

A human-readable description of the routine. Default value is None.

Default value: None
enabled

Whether the routine is enabled. Default value is None.

Default value: None
triggers

The triggers configured for the routine. In v1, exactly one trigger entry is supported. Default value is None.

Default value: None
action

The action executed when the routine fires. Default value is None.

Default value: None

Returns

Type Description

Routine. The Routine is compatible with MutableMapping

Exceptions

Type Description

delete

Delete a routine.

Deletes the specified routine.

async delete(routine_name: str, **kwargs: Any) -> None

Parameters

Name Description
routine_name
Required
str

The unique name of the routine. Required.

Returns

Type Description

None

Exceptions

Type Description

disable

Disable a routine.

Disables the specified routine so it no longer runs.

async disable(routine_name: str, **kwargs: Any) -> Routine

Parameters

Name Description
routine_name
Required
str

The unique name of the routine. Required.

Returns

Type Description

Routine. The Routine is compatible with MutableMapping

Exceptions

Type Description

dispatch

Queue an asynchronous routine dispatch.

Queues an asynchronous dispatch for the specified routine.

async dispatch(routine_name: str, *, content_type: str = 'application/json', payload: _models.RoutineDispatchPayload | None = None, **kwargs: Any) -> _models.DispatchRoutineResult

Parameters

Name Description
routine_name
Required
str

The unique name of the routine. Required.

body
<xref:JSON> or IO[bytes]

Is either a JSON type or a IO[bytes] type. Required.

Keyword-Only Parameters

Name Description
payload

A direct action-input override sent downstream when testing a routine. Default value is None.

Default value: None

Returns

Type Description

DispatchRoutineResult. The DispatchRoutineResult is compatible with MutableMapping

Exceptions

Type Description

enable

Enable a routine.

Enables the specified routine so it can be dispatched.

async enable(routine_name: str, **kwargs: Any) -> Routine

Parameters

Name Description
routine_name
Required
str

The unique name of the routine. Required.

Returns

Type Description

Routine. The Routine is compatible with MutableMapping

Exceptions

Type Description

get

Get a routine.

Retrieves the specified routine and its current configuration.

async get(routine_name: str, **kwargs: Any) -> Routine

Parameters

Name Description
routine_name
Required
str

The unique name of the routine. Required.

Returns

Type Description

Routine. The Routine is compatible with MutableMapping

Exceptions

Type Description

list

List routines.

Returns the routines available in the current project.

list(*, limit: int | None = None, before: str | None = None, order: str | None = None, **kwargs: Any) -> AsyncItemPaged[Routine]

Keyword-Only Parameters

Name Description
limit
int

The maximum number of routines to return. Default value is None.

Default value: None
before
str

Unsupported. Reserved for future backward pagination support. Default value is None.

Default value: None
order
str

The ordering direction. Supported values are asc and desc. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of Routine

Exceptions

Type Description

list_runs

List prior runs for a routine.

Returns prior runs recorded for the specified routine.

list_runs(routine_name: str, *, filter: str | None = None, limit: int | None = None, before: str | None = None, order: str | None = None, **kwargs: Any) -> AsyncItemPaged[RoutineRun]

Parameters

Name Description
routine_name
Required
str

The unique name of the routine. Required.

Keyword-Only Parameters

Name Description
filter
str

An optional MLflow search-runs filter expression applied within the routine's experiment. Default value is None.

Default value: None
limit
int

The maximum number of runs to return. Default value is None.

Default value: None
before
str

Unsupported. Reserved for future backward pagination support. Default value is None.

Default value: None
order
str

The ordering direction. Supported values are asc and desc. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of RoutineRun

Exceptions

Type Description