Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/windows_quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
###### \# Windows Quick Start for AlpacaEval



###### \## Installation





pip install -e .





######  ##Verify installation



alpaca\_eval evaluate\_from\_model --help



###### Notes



* Python 3.11 is recommended for best compatibility.
* Always use a virtual environment to avoid dependency conflicts.
* On Windows, make sure the environment is activated before running commands.



Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
,win_rate,standard_error,n_wins,n_wins_base,n_draws,n_total,discrete_win_rate,mode,avg_length,length_controlled_winrate,lc_standard_error
NullModel,76.91979180386511,0.9090102449662572,676,129,0,805,83.97515527950311,community,872,86.45780691307947,0.14180005113427935
NullModel,76.91979180386511,0.9090102449662572,676,129,0,805,83.97515527950311,community,872,86.45780691307947,0.1418000511342793
SelfMoA_gemma-2-9b-it-WPO-HB,77.58955217385297,1.231940914887347,640,165,0,805,79.5031055900621,community,3261,78.53928111481099,0.3042788133382446
Shopee-SlimMoA-v1,75.6142865980535,1.27062740591947,621,184,0,805,77.1428571428572,community,1994,77.4515432873834,0.430175221492396
blendaxai-gm-l6-vo31,69.11033492869565,1.3280735654354865,562,242,1,805,69.87577639751554,community,1809,76.91981221023656,0.5725365663132986
Expand Down
9 changes: 5 additions & 4 deletions src/alpaca_eval/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
import numpy as np
import numpy.typing as npt
import pandas as pd
import pkg_resources
from importlib import metadata
from packaging.version import parse as parse_version
import tqdm
import yaml

Expand Down Expand Up @@ -241,7 +242,7 @@ def check_imports(modules: Sequence[str], to_use: str = "this fnction"):

def check_pkg_atleast_version(package, atleast_version):
curr_version = get_package_version(package)
return pkg_resources.parse_version(curr_version) > pkg_resources.parse_version(atleast_version)
return parse_version(curr_version) > parse_version(atleast_version)


def load_or_convert_to_dataframe(df=Union[AnyPath, AnyData, Callable, list, tuple], **kwargs):
Expand Down Expand Up @@ -662,8 +663,8 @@ def _string_to_dict(to_convert):


def get_package_version(package_name: str) -> str:
"""Get the version of a package."""
return pkg_resources.get_distribution(package_name).version
"""Get version of a package using importlib.metadata (no pkg_resources)."""
return metadata.version(package_name)


def get_multi_package_version(package_names: Sequence[str]) -> str:
Expand Down
Loading