Skip to content

Commit

Permalink
fix node type not being parsed correctly in Node constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham3121 committed Feb 9, 2024
1 parent 4c38048 commit 459c112
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hagrid/hagrid/orchestra.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def deploy_to_python(
"processes": processes,
"dev_mode": dev_mode,
"tail": tail,
"node_type": node_type_enum,
"node_type": str(node_type_enum),
"node_side_type": node_side_type,
"enable_warnings": enable_warnings,
# new kwargs
Expand Down
3 changes: 3 additions & 0 deletions packages/syft/src/syft/abstract_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class NodeSideType(str, Enum):
LOW_SIDE = "low"
HIGH_SIDE = "high"

def __str__(self) -> str:
return self.value


class AbstractNode:
id: Optional[UID]
Expand Down
3 changes: 3 additions & 0 deletions packages/syft/src/syft/node/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ def named(
client_config=blob_client_config
)

node_type = NodeType(node_type)
node_side_type = NodeSideType(node_side_type)

return cls(
name=name,
id=uid,
Expand Down

0 comments on commit 459c112

Please sign in to comment.