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

Remove self.dataset_path post_init process (#1243)

* Remove self.dataset_path post_init process

* Update task.py

* Update task.py
parent eca6926b
import abc import abc
import ast import ast
import logging import logging
import os
import random import random
import re import re
from collections.abc import Callable from collections.abc import Callable
...@@ -87,12 +86,6 @@ class TaskConfig(dict): ...@@ -87,12 +86,6 @@ class TaskConfig(dict):
] = None # by default, not used in the code. allows for users to pass arbitrary info to tasks ] = None # by default, not used in the code. allows for users to pass arbitrary info to tasks
def __post_init__(self) -> None: def __post_init__(self) -> None:
if self.dataset_path and os.path.exists(os.path.dirname(self.dataset_path)):
import inspect
from importlib import import_module
self.dataset_path = inspect.getfile(import_module(self.dataset_path))
if self.generation_kwargs is not None: if self.generation_kwargs is not None:
if self.output_type != "generate_until": if self.output_type != "generate_until":
eval_logger.warning( eval_logger.warning(
......
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