- Evaluation Tracking: Complete lifecycle tracking of evaluation runs
- Status Management: Real-time status updates (PENDING, IN_PROGRESS, COMPLETED, etc.)
- Dataset Integration: Linked to specific datasets for evaluation
- Result Storage: Comprehensive storage of results, metrics, and error information
- Error Handling: Detailed error tracking with traceback information
- Creation: Create experiment with dataset and application references
- Execution: Experiment runs evaluation against the dataset
- Monitoring: Track status and progress in real-time
- Completion: Retrieve results, metrics, and analysis
- Cleanup: Archive or delete completed experiments
Example
Experiments are permanent records of evaluation runs. Once created, the name
cannot be changed, but metadata and description can be updated. Failed
experiments retain error information for debugging and analysis.
id
name
status
created_at
updated_at
created_by
updated_by
project
application
dataset
description
error_reason
error_message
traceback
duration_ms
metadata
get_app_url()
Get the application URL for this experimentReturns
str
classmethod get_by_id()
Retrieve an experiment by its unique identifier. Fetches an experiment from the Fiddler platform using its UUID. This is the most direct way to retrieve an experiment when you know its ID.Parameters
The unique identifier (UUID) of the experiment to retrieve.
Can be provided as a UUID object or string representation.
Returns
The experiment instance with all metadata and configuration.
Raises
- NotFound – If no experiment exists with the specified ID.
- ApiError – If there’s an error communicating with the Fiddler API.
Example
This method makes an API call to fetch the latest experiment state from the server.
The returned experiment instance reflects the current state in Fiddler.
classmethod get_by_name()
Retrieve an experiment by name within an application. Finds and returns an experiment using its name within the specified application. This is useful when you know the experiment name and application but not its UUID. Experiment names are unique within an application, making this a reliable lookup method.Parameters
The name of the experiment to retrieve. Experiment names are unique
within an application and are case-sensitive.
The UUID of the application containing the experiment.
Can be provided as a UUID object or string representation.
Returns
The experiment instance matching the specified name.
Raises
- NotFound – If no experiment exists with the specified name in the application.
- ApiError – If there’s an error communicating with the Fiddler API.
Example
Experiment names are case-sensitive and must match exactly. Use this method
when you have a known experiment name from configuration or user input.
classmethod list()
List all experiments in an application. Retrieves all experiments that the current user has access to within the specified application. Returns an iterator for memory efficiency when dealing with many experiments.Parameters
The UUID of the application to list experiments from.
Can be provided as a UUID object or string representation.
The UUID of the dataset to list experiments from.
Can be provided as a UUID object or string representation.
Yields
Experiment – Experiment instances for all accessible experiments in the application.
Raises
ApiError – If there’s an error communicating with the Fiddler API.Returns
Iterator[Experiment]
Example
This method returns an iterator for memory efficiency. Convert to a list
with list(Experiment.list(application_id)) if you need to iterate multiple times or get
the total count. The iterator fetches experiments lazily from the API.
classmethod create()
Create a new experiment in an application. Creates a new experiment within the specified application on the Fiddler platform. The experiment must have a unique name within the application and will be linked to the specified dataset for evaluation. Note: It is not recommended to use this method directly. Instead, use the evaluate method. Creating and managing an experiment without evaluate wrapper is extremely advance usecase and should be avoided.Parameters
Experiment name, must be unique within the application.
The UUID of the application to create the experiment in.
Can be provided as a UUID object or string representation.
The UUID of the dataset to use for evaluation.
Can be provided as a UUID object or string representation.
Optional human-readable description of the experiment.
Optional custom metadata dictionary for additional experiment information.
Returns
The newly created experiment instance with server-assigned fields.
Raises
- Conflict – If an experiment with the same name already exists in the application.
- ValidationError – If the experiment configuration is invalid (e.g., invalid name format).
- ApiError – If there’s an error communicating with the Fiddler API.
Example
After successful creation, the experiment instance is returned with
server-assigned metadata. The experiment is immediately available
for execution and monitoring. The initial status will be PENDING.
classmethod get_or_create()
Get an existing experiment by name or create a new one if it doesn’t exist. This is a convenience method that attempts to retrieve an experiment by name within an application, and if not found, creates a new experiment with that name. Useful for idempotent experiment setup in automation scripts and deployment pipelines.Parameters
The name of the experiment to retrieve or create.
The UUID of the application to search/create the experiment in.
Can be provided as a UUID object or string representation.
The UUID of the dataset to use for evaluation.
Can be provided as a UUID object or string representation.
Optional human-readable description of the experiment.
Optional custom metadata dictionary for additional experiment information.
Returns
Either the existing experiment with the specified name,
or a newly created experiment if none existed.
Raises
- ValidationError – If the experiment name format is invalid.
- ApiError – If there’s an error communicating with the Fiddler API.
Example
This method is idempotent - calling it multiple times with the same name
and application_id will return the same experiment. It logs when creating a new
experiment for visibility in automation scenarios.
update()
Update experiment description, metadata, and status. Updates the experiment’s description, metadata, and/or status. This method allows you to modify the experiment’s configuration after creation, including updating the experiment status and error information for failed experiments.Parameters
Optional new description for the experiment. If provided,
replaces the existing description. Set to empty string to clear.
Optional new metadata dictionary for the experiment. If provided,
replaces the existing metadata completely. Use empty dict to clear.
Optional new status for the experiment. Can be used to update
experiment status (e.g., PENDING, RUNNING, COMPLETED, FAILED).
Required when status is FAILED. The reason for the experiment failure.
Required when status is FAILED. Detailed error message for the failure.
Required when status is FAILED. Stack trace information for debugging.
Optional duration in milliseconds for the experiment execution
Returns
The updated experiment instance with new metadata and configuration.
Raises
- ValueError – If no update parameters are provided (all are None) or if status is FAILED but error_reason, error_message, or traceback are missing.
- ValidationError – If the update data is invalid (e.g., invalid metadata format).
- ApiError – If there’s an error communicating with the Fiddler API.
Example
This method performs a complete replacement of the specified fields.
For partial updates, retrieve current values, modify them, and pass
the complete new values. The experiment name and ID cannot be changed.
When updating status to FAILED, all error-related parameters are required.
delete()
Delete the experiment. Permanently deletes the experiment and all associated data from the Fiddler platform. This action cannot be undone and will remove all experiment results, metrics, and metadata.Raises
ApiError – If there’s an error communicating with the Fiddler API.Example
This operation is irreversible. Once deleted, the experiment and all its
associated data cannot be recovered. Consider archiving experiments instead
of deleting them if you need to preserve historical data.
add_items()
Add outputs of LLM/Agent/Application against dataset items to the experiment. Adds outputs of LLM/Agent/Application (task or target function) against dataset items to the experiment, representing individual test case outcomes. Each item contains the outputs of LLM/Agent/Application results, timing information, and status for a specific dataset item.Parameters
List of NewExperimentItem instances containing outputs of LLM/Agent/Application against dataset items.
Each item should include:
- dataset_item_id: UUID of the dataset item being evaluated
- outputs: Dictionary containing the outputs of the task function against dataset item
- duration_ms: Duration of the execution in milliseconds:
- status: Status of the outputs of the task function / scoring against dataset item (PENDING, COMPLETED, FAILED, etc.)
- error_reason: Reason for failure, if applicable
- error_message: Detailed error message, if applicable
Returns
List of UUIDs for the newly created experiment items.
Raises
- ValueError – If the items list is empty.
- ValidationError – If any item data is invalid (e.g., missing required fields).
- ApiError – If there’s an error communicating with the Fiddler API.
Example
This method is typically used after running evaluations to store the results
in the experiment. Each item represents the evaluation of a single dataset
item and contains all relevant timing, output, and status information.
get_items()
Retrieve all experiment result items from the experiment. Fetches all experiment result items (outputs, timing, status) that were generated by the task function against dataset items. Returns an iterator for memory efficiency when dealing with large experiments containing many result items.Returns
Iterator of
ExperimentItem instances for all result items in the experiment.
Raises
ApiError – If there’s an error communicating with the Fiddler API.Example
This method returns an iterator for memory efficiency. Convert to a list
with list(experiment.get_items()) if you need to iterate multiple times or get
the total count. The iterator fetches items lazily from the API.
add_results()
Add evaluation results to the experiment. Adds complete evaluation results to the experiment, including both the experiment item data (outputs, timing, status) and all associated evaluator scores. This method is typically used after running evaluations to store the complete results of the evaluation process for a batch of dataset items. This method will only append the results to the experiment. Note: It is not recommended to use this method directly. Instead, use the evaluate method. Creating and managing an experiment without evaluate wrapper is extremely advance usecase and should be avoided.Parameters
List of ExperimentItemResult instances containing:
- experiment_item: NewExperimentItem with outputs, timing, and status
- scores: List of Score objects from evaluators for this item
Returns
Results are added to the experiment on the server.
Raises
- ValueError – If the items list is empty.
- ValidationError – If any item data is invalid (e.g., missing required fields).
- ApiError – If there’s an error communicating with the Fiddler API.
Example
This method is typically called after running evaluations to store complete
results. The results include both the experiment item data and all evaluator
scores, providing a complete record of the evaluation process.