Skip to content

Commit

Permalink
Fix typo; update target version to 2.12.4
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-intel committed Jun 5, 2024
1 parent 07cce1f commit b9fffe5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions metaflow/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ def __init__(
attempt: Optional[int] = None,
_object: Optional["MetaflowObject"] = None,
_parent: Optional["MetaflowObject"] = None,
_create_namespace: Optional[str] = None,
_namespace_check: bool = True,
_create_namespace: Optional[str] = None,
):
self._metaflow = Metaflow()
self._parent = _parent
Expand Down Expand Up @@ -385,10 +385,10 @@ def __iter__(self) -> Iterator["MetaflowObject"]:
attempt=self._attempt,
_object=obj,
_parent=self,
_namespace_check=self._namespace_check,
_create_namespace=self._current_namespace
if self._namespace_check
else None,
_namespace_check=self._namespace_check,
)
for obj in unfiltered_children
),
Expand Down Expand Up @@ -500,10 +500,10 @@ def __getitem__(self, id: str) -> "MetaflowObject":
attempt=self._attempt,
_object=obj,
_parent=self,
_current_namespace=self._current_namespace
_namespace_check=self._namespace_check,
_create_namespace=self._current_namespace
if self._namespace_check
else None,
_namespace_check=self._namespace_check,
)
else:
raise KeyError(id)
Expand Down Expand Up @@ -534,7 +534,7 @@ def _unpickle_284(self, data):
pathspec=pathspec, attempt=attempt, _namespace_check=namespace_check
)

def _unpickle_2122(self, data):
def _unpickle_2124(self, data):
if len(data) != 4:
raise MetaflowInternalError(
"Unexpected size of array: {}".format(len(data))
Expand All @@ -543,11 +543,11 @@ def _unpickle_2122(self, data):
self.__init__(
pathspec=pathspec,
attempt=attempt,
_create_namespace=create_namespace,
_namespace_check=namespace_check,
_create_namespace=create_namespace,
)

_UNPICKLE_FUNC = {"2.8.4": _unpickle_284, "2.12.2": _unpickle_2122}
_UNPICKLE_FUNC = {"2.8.4": _unpickle_284, "2.12.4": _unpickle_2124}

def __setstate__(self, state):
"""
Expand All @@ -573,6 +573,7 @@ def __setstate__(self, state):
pathspec=state.get("_pathspec", None),
attempt=state.get("_attempt", None),
_namespace_check=state.get("_namespace_check", False),
_create_namespace=None,
)

def __getstate__(self):
Expand All @@ -589,7 +590,7 @@ def __getstate__(self):
# checking for the namespace even after unpickling since we will know which
# namespace to check.
return {
"version": "2.12.2",
"version": "2.12.4",
"data": [
self.pathspec,
self._attempt,
Expand Down

0 comments on commit b9fffe5

Please sign in to comment.