Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Dec 15, 2024
1 parent 6fb84c6 commit 310f9ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion optimum_benchmark/backends/py_txi/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ 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_volumes, self.config.volumes = self.config.volumes, {self.tmpdir.name: {"bind": "/data", "mode": "rwm"}}
original_model, self.config.model = self.config.model, "/data/no_weights_model/"
self.load_model_from_pretrained()
self.config.model, self.config.volumes = original_model, original_volumes
Expand Down
4 changes: 2 additions & 2 deletions optimum_benchmark/backends/py_txi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ class PyTXIConfig(BackendConfig):
metadata={"help": "Dictionary of ports to expose from the container."},
)
volumes: Dict[str, Any] = field(
default_factory=lambda: {HUGGINGFACE_HUB_CACHE: {"bind": "/data", "mode": "rw"}},
default_factory=lambda: {HUGGINGFACE_HUB_CACHE: {"bind": "/data", "mode": "rwm"}},
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."},
)

Expand Down

0 comments on commit 310f9ef

Please sign in to comment.