Implementation:Cohere ai Cohere python Finetuning Event
| Knowledge Sources | |
|---|---|
| Domains | SDK, Fine_Tuning |
| Last Updated | 2026-02-15 14:00 GMT |
Overview
The Event class represents a lifecycle event that occurs during the training and deployment of a fine-tuned model.
Description
Event is a Pydantic-based data class that captures a change in status for a fine-tuned model. Each event records which user initiated the change (or is empty if system-initiated), the resulting status of the model, and the timestamp when the event occurred. The class extends UncheckedBaseModel and supports both Pydantic v1 and v2 configurations.
Usage
Use this class to inspect the history of status changes for a fine-tuned model. Events are typically returned as part of the fine-tuned model response and allow you to track progress through states such as queued, fine-tuning, deploying, ready, failed, or deleted.
Code Reference
Source Location
- Repository: Cohere Python SDK
- File:
src/cohere/finetuning/finetuning/types/event.py
Signature
class Event(UncheckedBaseModel):
"""
A change in status of a fine-tuned model.
"""
user_id: typing.Optional[str] = pydantic.Field(default=None)
status: typing.Optional[Status] = pydantic.Field(default=None)
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
Import
from cohere.finetuning.finetuning.types import Event
I/O Contract
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
user_id |
typing.Optional[str] |
No | None |
ID of the user who initiated the event. Empty if initiated by the system. |
status |
typing.Optional[Status] |
No | None |
Status of the fine-tuned model. One of: "STATUS_UNSPECIFIED", "STATUS_FINETUNING", "STATUS_DEPLOYING_API", "STATUS_READY", "STATUS_FAILED", "STATUS_DELETED", "STATUS_TEMPORARILY_OFFLINE", "STATUS_PAUSED", "STATUS_QUEUED".
|
created_at |
typing.Optional[datetime.datetime] |
No | None |
Timestamp when the event happened. |
Usage Examples
Inspecting an Event instance
from cohere.finetuning.finetuning.types import Event
from datetime import datetime
# Typically returned from the API, but can be constructed directly
event = Event(
user_id="user-abc-123",
status="STATUS_FINETUNING",
created_at=datetime(2026, 2, 15, 10, 30, 0),
)
print(event.user_id) # "user-abc-123"
print(event.status) # "STATUS_FINETUNING"
print(event.created_at) # 2026-02-15 10:30:00
System-initiated event
from cohere.finetuning.finetuning.types import Event
from datetime import datetime
# System-initiated events have no user_id
system_event = Event(
status="STATUS_READY",
created_at=datetime(2026, 2, 15, 12, 0, 0),
)
print(system_event.user_id) # None
print(system_event.status) # "STATUS_READY"
print(system_event.created_at) # 2026-02-15 12:00:00
Related Pages
- Environment:Cohere_ai_Cohere_python_Python_SDK_Runtime
- Cohere_ai_Cohere_python_Finetuning_BaseModel_Type - Base model configuration for fine-tuning
- Cohere_ai_Cohere_python_TrainingStepMetrics - Evaluation metrics at a training step
- Cohere_ai_Cohere_python_WandbConfig - Weights & Biases integration configuration