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

return version of benchmark #189

Open
recursix opened this issue Oct 18, 2024 · 0 comments
Open

return version of benchmark #189

recursix opened this issue Oct 18, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@recursix
Copy link
Collaborator

recursix commented Oct 18, 2024

Could we implement this?

Benchmark.get_version() -> str

meant to replace this code:

def _get_benchmark_version(benchmark: bgym.Benchmark) -> str:
    benchmark_name = benchmark.name

    if hasattr(benchmark, "get_version"):
        return benchmark.get_version()

    # in the mean time
    if benchmark_name.startswith("miniwob"):
        return metadata.distribution("browsergym.miniwob").version
    elif benchmark_name.startswith("workarena"):
        return metadata.distribution("browsergym.workarena").version
    elif benchmark_name.startswith("webarena"):
        return metadata.distribution("browsergym.webarena").version
    elif benchmark_name.startswith("visualwebarena"):
        return metadata.distribution("browsergym.visualwebarena").version
    elif benchmark_name.startswith("weblinx"):
        try:
            return metadata.distribution("weblinx_browsergym").version
        except metadata.PackageNotFoundError:
            return "0.0.1rc1"
    else:
        raise ValueError(f"Unknown benchmark {benchmark_name}")
@recursix recursix assigned recursix and gasse and unassigned recursix Oct 18, 2024
@gasse gasse added the enhancement New feature or request label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants