Rapidata leaderboard manager
RapidataLeaderboardManager #
A manager for leaderboards.
Used to create and retrieve leaderboards.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
openapi_service
|
OpenAPIService
|
The OpenAPIService instance for API interaction. |
required |
Source code in src/rapidata/rapidata_client/leaderboard/rapidata_leaderboard_manager.py
create_new_leaderboard #
create_new_leaderboard(
name: str,
instruction: str,
prompts: list[str],
show_prompt: bool = False,
) -> RapidataLeaderboard
Creates a new leaderboard with the given name, instruction, and prompts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
leaderboard_name
|
The name of the leaderboard. Will be used to identify the leaderboard on the overview. |
required | |
instruction
|
str
|
The instruction for the leaderboard. Will determine how the models will be evaluated. |
required |
prompts
|
list[str]
|
The prompts for the leaderboard. Will be registered for the leaderboard and able to be retrieved again later. |
required |
show_prompt
|
bool
|
Whether to show the prompt to the users when they are evaluating the models. |
False
|
Source code in src/rapidata/rapidata_client/leaderboard/rapidata_leaderboard_manager.py
get_leaderboard_by_id #
get_leaderboard_by_id(
leaderboard_id: str,
) -> RapidataLeaderboard
Retrieves a leaderboard by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
leaderboard_id
|
str
|
The ID of the leaderboard. |
required |
Source code in src/rapidata/rapidata_client/leaderboard/rapidata_leaderboard_manager.py
find_leaderboards #
find_leaderboards(
name: str = "", amount: int = 10
) -> list[RapidataLeaderboard]
Find your recent leaderboards given criteria. If nothing is provided, it will return the most recent leaderboard.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the leaderboard - matching leaderboard will contain the name. Defaults to "" for any leaderboard. |
''
|
amount
|
int
|
The amount of leaderboards to return. Defaults to 10. |
10
|