# MLOps event

> MLOps event - An MLOps Event Object: An object representing an important MLOps activity that
> happened. For example, health, service issues with the DataRobot deployment or a prediction
> environment or a particular phase in a long operation (like creation of deployment or processing
> training data) is completed or errored.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-05-06T18:17:09.838908+00:00` (UTC).

## Primary page

- [MLOps event](https://docs.datarobot.com/en/docs/api/reference/sdk/mlops_event.html): Full documentation for this topic (HTML).

## Sections on this page

- [classdatarobot.mlops.events.MLOpsEvent](https://docs.datarobot.com/en/docs/api/reference/sdk/mlops_event.html#datarobot.mlops.events.MLOpsEvent): In-page section heading.
- [classmethodreport_moderation_event(event_type, timestamp=None, title=None, message=None, deployment_id=None, org_id=None, guard_name=None, metric_name=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/mlops_event.html#datarobot.mlops.events.MLOpsEvent.report_moderation_event): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html): Linked from this page.
- [API reference](https://docs.datarobot.com/en/docs/api/reference/index.html): Linked from this page.

## Documentation content

### class datarobot.mlops.events.MLOpsEvent

An MLOps Event Object: An object representing an important MLOps activity that
happened.  For example, health, service issues with the DataRobot deployment
or a prediction environment or a particular phase in a long operation (like
creation of deployment or processing training data) is completed or errored.

This class allows the client to report such event to the DataRobot service.

> [!NOTE] Notes
> DataRobot backend support lots of events and all these events are categorized
> into different categories.  This class does not yet support ALL events, but
> we will gradually add support for them
> 
> Supported Event Categories:
> : - moderation

#### classmethod report_moderation_event(event_type, timestamp=None, title=None, message=None, deployment_id=None, org_id=None, guard_name=None, metric_name=None)

Reports a moderation event

- Parameters:
- Return type: None
- Raises: ValueError – If event_type is not one of the moderation event types.
      If fails to create the event.

> [!NOTE] Examples
> ```
> >>> from datarobot.mlops.events import MLOpsEvent
> >>> MLOpsEvent.report_moderation_event(
> ...     event_type="moderationMetricCreationError",
> ...     title="Failed to create moderation metric",
> ...     message="Maximum number of custom metrics reached",
> ...     deployment_id="5c939e08962d741e34f609f0",
> ...     metric_name="Blocked Prompts",
> ... )
> ```
