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

1001_Workspace_Creation_from_JupyterNotebook.ipynb is not functioning properly #1406

Open
ishant162 opened this issue Feb 27, 2025 · 0 comments

Comments

@ishant162
Copy link
Collaborator

ishant162 commented Feb 27, 2025

Describe the bug
Encountering a TypeError while running the WorkspaceExport.export(...) cell in 1001_Workspace_Creation_from_JupyterNotebook.ipynb.

To Reproduce
Steps to reproduce the behavior:

  1. Activate experimental features (fx experimental activate)
  2. Go to openfl-tutorials/experimental/workflow/1001_Workspace_Creation_from_JupyterNotebook.ipynb
  3. Scroll down to last cell containing
WorkspaceExport.export(
    notebook_path='./1001_Workspace_Creation_from_JupyterNotebook.ipynb',
    output_workspace=f"/home/{os.environ['USER']}/generated-workspace"
)
  1. Run the cell
  2. See Error

Expected behavior
The cell should execute without any issues

Error Logs

TypeError                                 Traceback (most recent call last)
Cell In[1], line 4
      1 import os
      2 from openfl.experimental.workflow.workspace_export import WorkspaceExport
----> 4 WorkspaceExport.export(
      5     notebook_path='./1001_Workspace_Creation_from_JupyterNotebook.ipynb',
      6     output_workspace=f"/home/{os.environ['USER']}/generated-workspace"
      7 )
 
File ~/dev_openfl/openfl/openfl/experimental/workflow/workspace_export/export.py:316, in WorkspaceExport.export(cls, notebook_path, output_workspace)
    314 instance.generate_requirements()
    315 instance.generate_plan_yaml()
--> 316 instance.generate_data_yaml()
    317 print_tree(output_workspace, level=2)
 
File ~/dev_openfl/openfl/openfl/experimental/workflow/workspace_export/export.py:449, in WorkspaceExport.generate_data_yaml(self)
    446 # Import flow class
    447 federated_flow_class = getattr(self.exported_script_module, self.flow_class_name)
--> 449 flow_name, runtime = self._find_runtime_instance(federated_flow_class)
    450 data_yaml = self.created_workspace_path.joinpath("plan", "data.yaml").resolve()
    451 data = self._read_or_initialize_yaml(data_yaml)
 
TypeError: cannot unpack non-iterable LocalRuntime object

Desktop:

  • OS: Ubuntu (WSL)
  • OS Version: 22.04.3 LTS
  • Python: 3.10

Additional context
This issue is not present in OpenFL v1.7.x and seems to have been introduced as a result of the changes from #1320.

@ishant162 ishant162 added bug Something isn't working workflow_interface and removed bug Something isn't working labels Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant