diff --git a/dargs/notebook.py b/dargs/notebook.py index c60c366..3904bda 100644 --- a/dargs/notebook.py +++ b/dargs/notebook.py @@ -157,7 +157,7 @@ def __init__(self, data: dict, arg: Argument | Variant): def _init_subdata(self): """Initialize sub ArgumentData.""" - if isinstance(self.data, dict) and isinstance(self.arg, Argument): + if isinstance(self.data, dict) and isinstance(self.arg, Argument) and not self.arg.repeat: sub_fields = self.arg.sub_fields.copy() # extend subfiles with sub_variants for vv in self.arg.sub_variants.values(): @@ -175,7 +175,7 @@ def _init_subdata(self): else: self.subdata.append(ArgumentData(self.data[kk], kk)) elif ( - isinstance(self.data, list) + isinstance(self.data, (list, dict)) and isinstance(self.arg, Argument) and self.arg.repeat ):