"Doc/vscode:/vscode.git/clone" did not exist on "aaa34fb674c7640e7467e046b739f598108eaa6f"
Unverified Commit 7ff13e9e authored by Hailey Schoelkopf's avatar Hailey Schoelkopf Committed by GitHub
Browse files

fix revision type (#2184)

parent d8506db0
......@@ -154,6 +154,7 @@ class HFLM(TemplateLM):
else torch.device(device)
)
revision = str(revision) # cast to string if not already one
# TODO: update this to be less of a hack once subfolder is fixed in HF
revision = revision + ("/" + subfolder if subfolder is not None else "")
......@@ -333,10 +334,9 @@ class HFLM(TemplateLM):
del max_memory_all_gpus["cpu"]
if not hasattr(self, "accelerator"):
max_memory_per_gpu_map = {
k: v
for k, v in max_memory_all_gpus.items()
k: v for k, v in max_memory_all_gpus.items()
}
else:
else:
# use only 1 / num_processes of the GPUs if we are running under accelerate launch
max_memory_per_gpu_map = {
k: v
......
......@@ -231,6 +231,7 @@ class NEURON_HF(TemplateLM):
" For inf2.48xlarge, set it to `24`."
)
revision = str(revision) # cast to string if not already one
# TODO: update this to be less of a hack once subfolder is fixed in HF
revision = revision + ("/" + subfolder if subfolder is not None else "")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment