"vscode:/vscode.git/clone" did not exist on "434a6f9d46aef19d50306adc6e7cba20538db989"
Commit b2f6bce8 authored by Leo Gao's avatar Leo Gao
Browse files

Fix fewshot_context method handling

parent c3bec45f
......@@ -2,6 +2,7 @@ import os
import re
import collections
import functools
import inspect
class ExitCodeError(Exception):
......@@ -148,7 +149,7 @@ def positional_deprecated(fn):
"""
@functools.wraps(fn)
def _wrapper(*args, **kwargs):
if len(args) != 0:
if len(args) != 1 if inspect.ismethod(fn) else 0:
print(f"WARNING: using {fn.__name__} with positional arguments is "
"deprecated and will be disallowed in a future version of "
"lm-evaluation-harness!")
......
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