Unverified Commit c74ca57c authored by Leo Gao's avatar Leo Gao Committed by GitHub
Browse files

Merge pull request #286 from StephenHogg/255

Fix BUG: TypeError: create_from_arg_string() takes 2 positional arguments but 3 were given
parents e18ef6e1 d895bfe6
...@@ -7,30 +7,30 @@ class DummyLM(LM): ...@@ -7,30 +7,30 @@ class DummyLM(LM):
pass pass
@classmethod @classmethod
def create_from_arg_string(cls, arg_string): def create_from_arg_string(cls, arg_string, additional_config=None):
return cls() return cls()
def loglikelihood(self, requests): def loglikelihood(self, requests):
res = [] res = []
for _ in requests: for _ in requests:
res.append((-random.random(), False)) res.append((-random.random(), False))
return res return res
def greedy_until(self, requests): def greedy_until(self, requests):
res = [] res = []
for ctx, _ in requests: for ctx, _ in requests:
res.append("lol") res.append("lol")
assert ctx.strip() != '' assert ctx.strip() != ""
return res return res
def loglikelihood_rolling(self, requests): def loglikelihood_rolling(self, requests):
res = [] res = []
for _ in requests: for _ in requests:
res.append(-random.random()) res.append(-random.random())
return res return res
\ No newline at end of file
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