Skip to content

Naive referee

NaiveReferee #

NaiveReferee(required_guesses: int = 10)

Bases: Referee

A simple referee that completes a task after a fixed number of guesses.

This referee implements a straightforward approach to task completion, where the task is considered finished after a predetermined number of guesses have been made, regardless of the content or quality of those guesses.

Attributes:

Name Type Description
required_guesses int

The number of guesses required to complete the task.

Parameters:

Name Type Description Default
required_guesses int

The number of guesses required to complete the task. Defaults to 10.

10
Source code in src/rapidata/rapidata_client/referee/naive_referee.py
def __init__(self, required_guesses: int = 10):
    """Initialize the NaiveReferee.

    Args:
        required_guesses (int, optional): The number of guesses required
            to complete the task. Defaults to 10.
    """
    super().__init__()
    self.required_guesses = required_guesses