Documentation Index
Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
View module source on GitHub
class EvaluateContainerWithVariables()
Evaluate container with variables.
This class provides functionality to manage evaluators with variables.
__init__
def __init__(id: str, entity: Entity, log_writer: LogWriter,
for_evaluators: List[str]) -> None
Initialize the evaluate container with variables.
Arguments:
| Name | Type | Description |
|---|
id | str | The ID of the evaluate container. |
entity | Entity | The entity of the evaluate container. |
log_writer | LogWriter | The log writer of the evaluate container. |
for_evaluators | List[str] | The evaluators of the evaluate container. |
with_variables
def with_variables(variables: Dict[str, str])
With variables.
Arguments:
| Name | Type | Description |
|---|
variables | Dict[str, str] | The variables to use for the evaluate container. |
class EvaluateContainer()
Evaluate container.
This class provides functionality to manage evaluators for a specific entity.
Attributes:
| Name | Type | Description |
|---|
entity | Entity | The entity associated with these evaluators. |
writer | LogWriter | The log writer used for committing evaluator actions. |
evaluators | List[str] | A list of evaluator identifiers. |
id | str | A unique identifier for this set of evaluators. |
Methods:
with_variables - Allows adding variables to be used by the evaluators.
__init__
def __init__(id: str, entity: Entity, log_writer: LogWriter) -> None
Initialize the evaluate container.
Arguments:
| Name | Type | Description |
|---|
id | str | The ID of the evaluate container. |
entity | Entity | The entity of the evaluate container. |
log_writer | LogWriter | The log writer of the evaluate container. |
with_variables
def with_variables(variables: Dict[str, str], for_evaluators: List[str])
With variables.
Arguments:
| Name | Type | Description |
|---|
variables | Dict[str, str] | The variables to use for the evaluate container. |
for_evaluators | List[str] | The evaluators of the evaluate container. |
with_evaluators
def with_evaluators(*evaluators: str) -> EvaluateContainerWithVariables
With evaluators.
Arguments:
| Name | Type | Description |
|---|
*evaluators | str | The evaluators to use for the evaluate container. |
Returns:
| Name | Description |
|---|
[EvaluateContainerWithVariables](/sdk/python/references/logger/components/base) | The evaluate container with variables. |
Base container.
This class provides functionality to manage containers for a specific entity.
__init__
def __init__(entity: Entity, config: BaseConfig, writer: LogWriter)
Initialize the base container.
Arguments:
| Name | Type | Description |
|---|
entity | Entity | The entity of the base container. |
config | BaseConfig | The config of the base container. |
writer | LogWriter | The writer of the base container. |
@property
def id() -> str
Get the ID of the base container.
Returns:
| Name | Description |
|---|
str | The ID of the base container. |
evaluate
def evaluate() -> EvaluateContainer
Evaluate the base container.
Returns:
| Name | Description |
|---|
[EvaluateContainer](/sdk/python/references/logger/components/base) | The evaluate container. |
_evaluate_
@staticmethod
def _evaluate_(writer: LogWriter, entity: Entity,
id: str) -> EvaluateContainer
Evaluate the base container.
Arguments:
| Name | Type | Description |
|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
id | str | The ID of the base container. |
def add_metadata(metadata: Dict[str, Any]) -> None
Add metadata to the base container.
Arguments:
| Name | Type | Description |
|---|
metadata | Dict[str, Any] | The metadata to add to the base container. |
@staticmethod
def add_metadata_(writer: LogWriter, entity: Entity, id: str,
metadata: Dict[str, Any]) -> None
Add metadata to the base container.
Arguments:
| Name | Type | Description |
|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
id | str | The ID of the base container. |
metadata | Dict[str, Any] | The metadata to add to the base container. |
add_tag
def add_tag(key: str, value: str)
Add a tag to the base container.
Arguments:
| Name | Type | Description |
|---|
key | str | The key of the tag. |
value | str | The value of the tag. |
_add_tag_
@staticmethod
def _add_tag_(writer: LogWriter, entity: Entity, id: str, key: str,
value: str)
Add a tag to the base container.
Arguments:
| Name | Type | Description |
|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
id | str | The ID of the base container. |
key | str | The key of the tag. |
value | str | The value of the tag. |
end
End the base container.
This method is used to end the base container.
_end_
@staticmethod
def _end_(writer: LogWriter,
entity: Entity,
id: str,
data: Optional[Dict[str, Any]] = None)
End the base container.
Arguments:
| Name | Type | Description |
|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
id | str | The ID of the base container. |
data | Optional[Dict[str, Any]] | The data to add to the base container. |
data
def data() -> Dict[str, Any]
Get the data of the base container.
Returns:
Dict[str, Any]: The data of the base container.
_commit_
@staticmethod
def _commit_(writer: LogWriter,
entity: Entity,
id: str,
action: str,
data: Optional[Dict[str, Any]] = None)
Commit the base container.
Arguments:
| Name | Type | Description |
|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
id | str | The ID of the base container. |
action | str | The action to commit. |
data | Optional[Dict[str, Any]] | The data to commit. |
class EventEmittingBaseContainer(BaseContainer)
_event_
@staticmethod
def _event_(writer: LogWriter,
entity: Entity,
entity_id: str,
id: str,
name: str,
tags: Optional[Dict[str, str]] = None,
metadata: Optional[Dict[str, Any]] = None)
Add an event to the base container.
Arguments:
| Name | Type | Description |
|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
entity_id | str | The ID of the entity. |
id | str | The ID of the event. |
name | str | The name of the event. |
tags | Optional[Dict[str, str]] | The tags of the event. |
metadata | Optional[Dict[str, Any]] | The metadata of the event. |
event
def event(id: str,
name: str,
tags: Optional[Dict[str, str]] = None,
metadata: Optional[Dict[str, Any]] = None)
Add an event to the base container.
Arguments:
| Name | Type | Description |
|---|
id | str | The ID of the event. |
name | str | The name of the event. |
tags | Optional[Dict[str, str]] | The tags of the event. |
metadata | Optional[Dict[str, Any]] | The metadata of the event. |