mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[Fix] Use a copy of the config object in Task (#174)
This commit is contained in:
parent
d5d4f47371
commit
e6194df29e
@ -1,3 +1,4 @@
|
|||||||
|
import copy
|
||||||
import os
|
import os
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from typing import List
|
from typing import List
|
||||||
@ -25,6 +26,7 @@ class BaseTask:
|
|||||||
output_subdir: str = None
|
output_subdir: str = None
|
||||||
|
|
||||||
def __init__(self, cfg: ConfigDict):
|
def __init__(self, cfg: ConfigDict):
|
||||||
|
cfg = copy.deepcopy(cfg)
|
||||||
self.cfg = cfg
|
self.cfg = cfg
|
||||||
self.model_cfgs = cfg['models']
|
self.model_cfgs = cfg['models']
|
||||||
self.dataset_cfgs = cfg['datasets']
|
self.dataset_cfgs = cfg['datasets']
|
||||||
|
Loading…
Reference in New Issue
Block a user