Skip to content

Commit f43477a

Browse files
committed
add test for optimum intel
1 parent 7ead1d6 commit f43477a

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

.github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ jobs:
5959
- name: Run entire pipeline quickly without any data
6060
# Checking RunSpecs with openai/davinci should be comprehensive enough
6161
run: source venv/bin/activate && helm-run --suite test -m 100 --skip-instances --models-to-run openai/davinci --exit-on-error
62+
run: source venv/bin/activate && helm-run --run-entries boolq:model=stanford-crfm/BioMedLM --enable-huggingface-models stanford-crfm/BioMedLM --suite v1 --max-eval-instances 10 --openvino

src/helm/clients/huggingface_client.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,17 @@ def __init__(
8282
except ModuleNotFoundError as e:
8383
handle_module_not_found_error(e, ["openvino"])
8484

85-
model_file = Path(pretrained_model_name_or_path) / "openvino_model.xml"
86-
if model_file.exists():
87-
export = False
88-
else:
89-
export = True
90-
9185
self.device = "cpu"
9286
# Security issue: currently we trust remote code by default.
9387
# We retain this temporarily to maintain reverse compatibility.
9488
# TODO: Delete if-else and don't set trust_remote_code=True
9589
if "trust_remote_code" in kwargs:
9690
self.model = OVModelForCausalLM.from_pretrained(
97-
pretrained_model_name_or_path, export=export, **kwargs
91+
pretrained_model_name_or_path, export=True, **kwargs
9892
).to(self.device)
9993
else:
10094
self.model = OVModelForCausalLM.from_pretrained(
101-
pretrained_model_name_or_path, export=export, trust_remote_code=True, **kwargs
95+
pretrained_model_name_or_path, export=True, trust_remote_code=True, **kwargs
10296
).to(self.device)
10397
else:
10498
# Security issue: currently we trust remote code by default.

0 commit comments

Comments
 (0)