Skip to content

Rework Plans/Procedures to store non-simplified Operation objects#2883

Closed
karlhigley wants to merge 10 commits intoOpenMined:masterfrom
karlhigley:refactor/plan-operations
Closed

Rework Plans/Procedures to store non-simplified Operation objects#2883
karlhigley wants to merge 10 commits intoOpenMined:masterfrom
karlhigley:refactor/plan-operations

Conversation

@karlhigley
Copy link
Contributor

This will make it easier to serialize them to multiple formats (like msgpack and Protobuf.)

@karlhigley karlhigley force-pushed the refactor/plan-operations branch from 395dbd0 to fbdcc2d Compare January 4, 2020 15:27
@karlhigley karlhigley added Type: Refactor 🔨 A complete overhaul of a file, feature, or codebase plans labels Jan 10, 2020
if owner.id in from_ids:
owner.id = to_ids[from_ids.index(owner.id)]

if owner.id_at_location in from_ids:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think owner have no id_at_location

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The owner can be a PointerTensor, so it can have an id_at_location property, but may not always. As written, this code may fail with non-pointer tensors. 🤔

operation, from_ids_simplified, to_ids_simplified
)
# replace ids in the owner
owner = operation.cmd_owner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the type of operation now? I can't find the definition here it must be in the unchanged files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an Operation object.

@karlhigley
Copy link
Contributor Author

Superseded by #2912 and #2910. Closing, but will revisit.

@karlhigley karlhigley closed this Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Refactor 🔨 A complete overhaul of a file, feature, or codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants