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

Issue observed in experimental aggregator based workflow #989

Closed
ishant162 opened this issue Jun 10, 2024 · 3 comments
Closed

Issue observed in experimental aggregator based workflow #989

ishant162 opened this issue Jun 10, 2024 · 3 comments
Assignees

Comments

@ishant162
Copy link
Collaborator

Describe the bug
Running Experimental aggregator based workflow workspace 101_torch_cnn_mnist leads to an unexpected ImportError Exception.

To Reproduce
Steps to reproduce the behavior:

  1. Create workspace using fx workspace create --prefix my_workspace --template 101_torch_cnn_mnist
  2. Complete workspace creation using fx commands by following steps described in the last cell of this tutorial
  3. Run aggregator using fx aggregator start
  4. See error ImportError: cannot import name 'Aggregator' from partially initialized module 'openfl.experimental.component.aggregator'

Expected behavior
Workspace should run successfully without any error.

Desktop (please complete the following information):

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

Error logs
Import_error_logs.txt

Additional context
The issue appears to have arisen due to the code changes introduced in PR #980
@MasterSkepticista Can you please look into this?

@MasterSkepticista
Copy link
Collaborator

MasterSkepticista commented Jun 10, 2024

Hi @ishant162, this is due to a circular import error which needs fixes as and when they are encountered. This is done as a wider refactor effort on using absolute instead of relative imports.

Refer to the discussion in #980 on refactor of imports.

Can you raise a PR with the following change? (ensure it passes your test)

# openfl/experimental/component/aggregator/__init__.py
# Change
from openfl.experimental.component.aggregator import Aggregator

# To
from openfl.experimental.component.aggregator.aggregator import Aggregator

@ishant162 ishant162 self-assigned this Jun 11, 2024
@ishant162
Copy link
Collaborator Author

@MasterSkepticista, Thank you for the information. I will proceed with raising a PR to incorporate the suggested changes.

@ishant162
Copy link
Collaborator Author

Fixed in #974

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants