From 5599115b8980db8360e2b660e8fe7b974638fcb0 Mon Sep 17 00:00:00 2001 From: Lim Hoang Date: Tue, 12 Oct 2021 23:15:08 +0100 Subject: [PATCH] Make sure _FrozenDataSets get created only once --- kedro/io/data_catalog.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kedro/io/data_catalog.py b/kedro/io/data_catalog.py index 2baf24dd23..b88280a227 100644 --- a/kedro/io/data_catalog.py +++ b/kedro/io/data_catalog.py @@ -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()} @@ -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): @@ -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