Rapidata benchmark manager
RapidataBenchmarkManager #
A manager for benchmarks.
Used to create and retrieve benchmarks.
A benchmark is a collection of leaderboards.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
openapi_service
|
OpenAPIService
|
The OpenAPIService instance for API interaction. |
required |
Source code in src/rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py
create_new_benchmark #
create_new_benchmark(
name: str,
identifiers: list[str],
prompts: Optional[list[str | None]] = None,
prompt_assets: Optional[list[str | None]] = None,
tags: Optional[list[list[str] | None]] = None,
) -> RapidataBenchmark
Creates a new benchmark with the given name, identifiers, prompts, and media assets. Everything is matched up by the indexes of the lists.
prompts or prompt_assets must be provided.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the benchmark. |
required |
identifiers
|
list[str]
|
The identifiers of the prompts/assets/tags that will be used to match up the media |
required |
prompts
|
Optional[list[str | None]]
|
The prompts that will be registered for the benchmark. |
None
|
prompt_assets
|
Optional[list[str | None]]
|
The prompt assets that will be registered for the benchmark. |
None
|
tags
|
Optional[list[list[str] | None]]
|
The tags that will be associated with the prompts to use for filtering the leaderboard results. They will NOT be shown to the users. |
None
|
Source code in src/rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py
get_benchmark_by_id #
get_benchmark_by_id(id: str) -> RapidataBenchmark
Returns a benchmark by its ID.
Source code in src/rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py
find_benchmarks #
find_benchmarks(
name: str = "", amount: int = 10
) -> list[RapidataBenchmark]
Returns a list of benchmarks by their name.