MCPcopy Create free account
hub / github.com/OpenSparseLLMs/MoM / __contains__

Method __contains__

lm-eval-harness/lm_eval/models/utils.py:68–75  ·  view source on GitHub ↗
(self, values)

Source from the content-addressed store, hash-verified

66
67 # Simple wildcard support (linux filename patterns)
68 def __contains__(self, values) -> bool:
69 for value in values.split(","):
70 if len(fnmatch.filter(self.choices, value)) == 0:
71 eval_logger.info("Available tasks to choose:")
72 for choice in self.choices:
73 eval_logger.info(f" - {choice}")
74 raise ValueError("'{}' is not in task list".format(value))
75 return True
76
77 def __iter__(self) -> Iterator:
78 for choice in self.choices:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected