Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] parse compression pipeline from plan.yaml during fx model save #1152

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openfl/interface/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from click import confirm, group, option, pass_context, style

from openfl.federated import Plan
from openfl.pipelines import NoCompressionPipeline
from openfl.protocols import utils
from openfl.utilities.click_types import InputSpec
from openfl.utilities.dataloading import get_dataloader
Expand Down Expand Up @@ -168,13 +167,14 @@ def get_model(
)
data_loader = get_dataloader(plan, prefer_minimal=True, input_shape=input_shape)
task_runner = plan.get_task_runner(data_loader=data_loader)
tensor_pipe = plan.get_tensor_pipe()

model_protobuf_path = Path(model_protobuf_path).resolve()
logger.info("Loading OpenFL model protobuf: 🠆 %s", model_protobuf_path)

model_protobuf = utils.load_proto(model_protobuf_path)

tensor_dict, _ = utils.deconstruct_model_proto(model_protobuf, NoCompressionPipeline())
tensor_dict, _ = utils.deconstruct_model_proto(model_protobuf, tensor_pipe)

# This may break for multiple models.
# task_runner.set_tensor_dict will need to handle multiple models
Expand Down
Loading