From fbff767919677e1a8b9d6c34d9e5c1cbd6277d92 Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Sun, 15 Dec 2024 17:56:48 +0100 Subject: [PATCH] test --- optimum_benchmark/backends/py_txi/backend.py | 6 +++--- optimum_benchmark/backends/py_txi/config.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/optimum_benchmark/backends/py_txi/backend.py b/optimum_benchmark/backends/py_txi/backend.py index 1b02277a..8b978444 100644 --- a/optimum_benchmark/backends/py_txi/backend.py +++ b/optimum_benchmark/backends/py_txi/backend.py @@ -93,10 +93,10 @@ def create_no_weights_model(self) -> None: self.generation_config.save_pretrained(save_directory=self.no_weights_model) def load_model_with_no_weights(self) -> None: - original_volumes, self.config.volumes = self.config.volumes, {self.tmpdir.name: {"bind": "/data", "mode": "rw"}} - original_model, self.config.model = self.config.model, "/data/no_weights_model/" + self.config.volumes[self.tmpdir.name] = {"bind": "/no_weights_data/", "mode": "rw"} + original_model, self.config.model = self.config.model, "/no_weights_data/no_weights_model/" self.load_model_from_pretrained() - self.config.model, self.config.volumes = original_model, original_volumes + self.config.model, self.config.volumes = original_model def load_model_from_pretrained(self) -> None: if self.config.task in TEXT_GENERATION_TASKS: diff --git a/optimum_benchmark/backends/py_txi/config.py b/optimum_benchmark/backends/py_txi/config.py index 9cc23a64..bde8ab43 100644 --- a/optimum_benchmark/backends/py_txi/config.py +++ b/optimum_benchmark/backends/py_txi/config.py @@ -37,7 +37,7 @@ class PyTXIConfig(BackendConfig): metadata={"help": "Dictionary of volumes to mount inside the container."}, ) environment: List[str] = field( - default_factory=lambda: ["HUGGING_FACE_HUB_TOKEN"], + default_factory=lambda: ["HF_TOKEN"], metadata={"help": "List of environment variables to forward to the container from the host."}, )