From 56f001ce1dddbd643f5f6e502bbf8f32c53f5fdf Mon Sep 17 00:00:00 2001 From: Sungho Park Date: Thu, 7 Mar 2024 05:58:07 +0900 Subject: [PATCH] Update installation commands in openai_completions.py and contributing document and, update wandb_args description (#1536) * Update openai completions and docs/CONTRIBUTING.md * Update wandb args description * Update docs/interface.md --------- Co-authored-by: Hailey Schoelkopf <65563625+haileyschoelkopf@users.noreply.github.com> --- docs/CONTRIBUTING.md | 2 +- docs/interface.md | 2 +- lm_eval/models/openai_completions.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 671f819cd6..8b9ef616dc 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -19,7 +19,7 @@ LM Evaluation Harness uses [ruff](https://github.com/astral-sh/ruff) for linting You can install linters and dev tools via -```pip install lm_eval[dev]``` +```pip install lm_eval[dev]``` or ```pip install -e ".[dev]"``` Then, run diff --git a/docs/interface.md b/docs/interface.md index 72c30f028d..093be08292 100644 --- a/docs/interface.md +++ b/docs/interface.md @@ -48,7 +48,7 @@ This mode supports a number of command-line arguments, the details of which can * `--seed`: Set seed for python's random, numpy and torch. Accepts a comma-separated list of 3 values for python's random, numpy, and torch seeds, respectively, or a single integer to set the same seed for all three. The values are either an integer or 'None' to not set the seed. Default is `0,1234,1234` (for backward compatibility). E.g. `--seed 0,None,8` sets `random.seed(0)` and `torch.manual_seed(8)`. Here numpy's seed is not set since the second value is `None`. E.g, `--seed 42` sets all three seeds to 42. -* `--wandb_args`: Tracks logging to Weights and Biases for evaluation runs and includes args passed to `wandb.init`, such as `project` and `job_type`. Full list (here.)[https://docs.wandb.ai/ref/python/init] +* `--wandb_args`: Tracks logging to Weights and Biases for evaluation runs and includes args passed to `wandb.init`, such as `project` and `job_type`. Full list (here.)[https://docs.wandb.ai/ref/python/init]. e.g., ```--wandb_args project=test-project,name=test-run``` ## External Library Usage diff --git a/lm_eval/models/openai_completions.py b/lm_eval/models/openai_completions.py index 7d20b584d0..a622eeeaaf 100644 --- a/lm_eval/models/openai_completions.py +++ b/lm_eval/models/openai_completions.py @@ -105,7 +105,7 @@ def __init__( except ModuleNotFoundError: raise Exception( "attempted to use 'openai' LM type, but package `openai` or `tiktoken` are not installed. \ - please install these via `pip install lm-eval[openai]` or `pip install -e .[openai]`", + please install these via `pip install lm-eval[openai]` or `pip install -e .\"[openai]\"`", ) self.model = model self.base_url = base_url