Unverified Commit 574f94d0 authored by Lintang Sutawika's avatar Lintang Sutawika Committed by GitHub
Browse files

Update task.py

parent 1554066c
...@@ -41,6 +41,22 @@ ALL_OUTPUT_TYPES = [ ...@@ -41,6 +41,22 @@ ALL_OUTPUT_TYPES = [
eval_logger = logging.getLogger("lm-eval") eval_logger = logging.getLogger("lm-eval")
@dataclass
class GroupConfig(dict):
group: str = None
task: Union[str, list] = None
weight_by_size: bool = False
def __getitem__(self, item):
return getattr(self, item)
def __setitem__(self, item, value):
return setattr(self, item, value)
def to_dict(self):
return asdict(self)
@dataclass @dataclass
class TaskConfig(dict): class TaskConfig(dict):
# task naming/registry # task naming/registry
......
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