Skip to content

Commit 359fdd0

Browse files
Fix kedro viz --lite compatibility with Kedro 18 (#2102)
This is to get Kedro-viz (mainly kedro viz --lite) to work with Kedro 18 and some Kedro 19 versions based on changes this PR (kedro-org/kedro#3920) introduced. In July, Kedro made the _save and _load methods public. At that time, Kedro-viz did not rely on these methods. However, when we recently merged kedro viz --lite, we introduced an UnavailableDataset class, which is an AbstractDataset. This class now uses the public load and save methods. To maintain backward compatibility with older versions of the dataset, we followed a suggestion made by @deepyaman class MyDataset(...): def _load(...) -> ...: ... load = _load def _save(...) -> ...: ... save = _save Originally posted by @deepyaman in kedro-org/kedro#3920 (comment)
1 parent 490416d commit 359fdd0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

package/kedro_viz/integrations/utils.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ def __init__(
4141
self._data = data
4242
self.metadata = metadata
4343

44-
def load(self, *args, **kwargs):
44+
def _load(self, *args, **kwargs):
4545
pass
4646

47-
def save(self, *args, **kwargs):
47+
def _save(self, *args, **kwargs):
4848
pass
4949

50+
load = _load
51+
save = _save
52+
5053
def _exists(self):
5154
pass
5255

0 commit comments

Comments
 (0)