Skip to content

Commit

Permalink
Make sure _FrozenDataSets get created only once
Browse files Browse the repository at this point in the history
  • Loading branch information
limdauto committed Oct 12, 2021
1 parent e040c4a commit 5599115
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kedro/io/data_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ def __init__(
>>> io = DataCatalog(data_sets={'cars': cars})
"""
self._data_sets = dict(data_sets or {})
self.datasets = _FrozenDatasets(self._data_sets)
self.layers = layers

self._transformers = {k: list(v) for k, v in (transformers or {}).items()}
Expand All @@ -205,6 +204,7 @@ def __init__(
# import the feed dict
if feed_dict:
self.add_feed_dict(feed_dict)
self.datasets = _FrozenDatasets(self._data_sets)

@property
def _logger(self):
Expand Down Expand Up @@ -524,7 +524,6 @@ def add(
)
self._data_sets[data_set_name] = data_set
self._transformers[data_set_name] = list(self._default_transformers)
self.datasets = _FrozenDatasets(self._data_sets)

def add_all(
self, data_sets: Dict[str, AbstractDataSet], replace: bool = False
Expand Down

0 comments on commit 5599115

Please sign in to comment.