Unverified Commit d4b8fc13 authored by achervyakov's avatar achervyakov Committed by GitHub
Browse files

fix until arg processing (#1608)

parent 0d920e82
...@@ -1163,7 +1163,7 @@ class HFLM(TemplateLM): ...@@ -1163,7 +1163,7 @@ class HFLM(TemplateLM):
if "until" in kwargs.keys(): if "until" in kwargs.keys():
until = kwargs.pop("until") until = kwargs.pop("until")
if isinstance(until, str): if isinstance(until, str):
until = [kwargs] until = [until]
elif not isinstance(until, list): elif not isinstance(until, list):
raise ValueError( raise ValueError(
f"Expected `kwargs['until']` to be of type Union[str,list] but got {until}" f"Expected `kwargs['until']` to be of type Union[str,list] but got {until}"
......
...@@ -664,7 +664,7 @@ class NEURON_HF(TemplateLM): ...@@ -664,7 +664,7 @@ class NEURON_HF(TemplateLM):
if "until" in kwargs.keys(): if "until" in kwargs.keys():
until = kwargs.pop("until") until = kwargs.pop("until")
if isinstance(until, str): if isinstance(until, str):
until = [kwargs] until = [until]
elif not isinstance(until, list): elif not isinstance(until, list):
raise ValueError( raise ValueError(
f"Expected `kwargs['until']` to be of type Union[str,list] but got {until}" f"Expected `kwargs['until']` to be of type Union[str,list] but got {until}"
......
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