"test/git@developer.sourcefind.cn:jerrrrry/infinicore.git" did not exist on "27777ee172ad48555efd67bd5be2a172eb658ce9"
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): ...@@ -154,6 +154,7 @@ class HFLM(TemplateLM):
else torch.device(device) 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 # TODO: update this to be less of a hack once subfolder is fixed in HF
revision = revision + ("/" + subfolder if subfolder is not None else "") revision = revision + ("/" + subfolder if subfolder is not None else "")
...@@ -333,10 +334,9 @@ class HFLM(TemplateLM): ...@@ -333,10 +334,9 @@ class HFLM(TemplateLM):
del max_memory_all_gpus["cpu"] del max_memory_all_gpus["cpu"]
if not hasattr(self, "accelerator"): if not hasattr(self, "accelerator"):
max_memory_per_gpu_map = { max_memory_per_gpu_map = {
k: v k: v for k, v in max_memory_all_gpus.items()
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 # use only 1 / num_processes of the GPUs if we are running under accelerate launch
max_memory_per_gpu_map = { max_memory_per_gpu_map = {
k: v k: v
......
...@@ -231,6 +231,7 @@ class NEURON_HF(TemplateLM): ...@@ -231,6 +231,7 @@ class NEURON_HF(TemplateLM):
" For inf2.48xlarge, set it to `24`." " 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 # TODO: update this to be less of a hack once subfolder is fixed in HF
revision = revision + ("/" + subfolder if subfolder is not None else "") 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