Unverified Commit e6194df2 authored by Tong Gao's avatar Tong Gao Committed by GitHub
Browse files

[Fix] Use a copy of the config object in Task (#174)

parent d5d4f473
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: ...@@ -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']
......
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