Skip to content

Commit

Permalink
[WWB]: Some fixes (openvinotoolkit#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKoff88 authored Oct 17, 2024
1 parent efaf0c8 commit 1778e50
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/causal_lm_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- master
- 'releases/**'

permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/llm_bench-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 ${{ env.LLM_BENCH_PYPATH }} --config=${{ env.LLM_BENCH_PYPATH }}/setup.cfg
python -m flake8 ${{ env.WWB_PATH }} --config=${{ env.LLM_BENCH_PYPATH }}/setup.cfg
- name: Create code style diff for samples
if: failure()
run: |
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions tools/who_what_benchmark/whowhatbench/wwb.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class GenAIModelWrapper:

def __init__(self, model, model_dir):
self.model = model
self.config = AutoConfig.from_pretrained(model_dir)
self.config = AutoConfig.from_pretrained(model_dir, trust_remote_code=True)

def __getattr__(self, attr):
if attr in self.__dict__:
Expand Down Expand Up @@ -199,7 +199,7 @@ def parse_args():
type=str,
choices=["text", "text-to-image"],
default="text",
help="Indicated the model type, e.g. 'text' - for LLMs, 't2im' - for text-to-image pipelines.",
help="Indicated the model type, e.g. 'text' - for causal text generation, 'text-to-image' - for image generation.",
)
parser.add_argument(
"--data-encoder",
Expand Down Expand Up @@ -335,6 +335,7 @@ def diff_strings(a: str, b: str, *, use_loguru_colors: bool = False) -> str:
def genai_gen_answer(model, tokenizer, question, max_new_tokens, skip_question):
config = openvino_genai.GenerationConfig()
config.max_new_tokens = max_new_tokens
config.do_sample = False
out = model.generate(question, config)
return out

Expand Down

0 comments on commit 1778e50

Please sign in to comment.