Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move dynamic default values to instance time #189

Open
osilkin98 opened this issue Nov 22, 2024 · 0 comments
Open

Move dynamic default values to instance time #189

osilkin98 opened this issue Nov 22, 2024 · 0 comments

Comments

@osilkin98
Copy link

MMLU Evaluation currently has the following code block:

    def __init__(
        self,
        model_path,
        tasks_dir: Optional[str],
        tasks: list[str],
        model_dtype="bfloat16",
        few_shots: int = 5,
        batch_size: Optional[Union[int, str]] = "auto",
        device: str = ("cuda" if torch.cuda.is_available() else "cpu"),
    ) -> None:

However; since device is taking a default which relies on a dynamic value, it would best to instead set it to None and compute the default when __init__ is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant