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

[BUG] Running a Flower app as a Flare job fails due to bad path to custom dir #3169

Closed
taleinat opened this issue Jan 23, 2025 · 1 comment · Fixed by #3168
Closed

[BUG] Running a Flower app as a Flare job fails due to bad path to custom dir #3169

taleinat opened this issue Jan 23, 2025 · 1 comment · Fixed by #3168
Labels
bug Something isn't working

Comments

@taleinat
Copy link
Contributor

Describe the bug
When running a Flower app as a Flare job, the Flower subprocess fails to find required files (specifically pyproject.toml). This is due to the path to its custom directory being passed incorrectly to the Flower subprocess: The subprocess is run with the "app dir" as is CWD, but the "custom dir" is passed as a relative path which is relative to the Flare client's CWD.

To Reproduce
Steps to reproduce the behavior:

  1. Create a project running a Flower app as a Flare job. (versions specified below)
  2. Try running a job.
  3. See the failure in the client logs.

Expected behavior
The job should initialize successfully rather than crash.

Screenshots
Following is an excerpt from the NVFlare client logs:

[FLWR-CA@my_client] ERROR:     ClientApp raised an exception
[FLWR-CA@my_client] Traceback (most recent call last):
[FLWR-CA@my_client]   File "/venv/lib/python3.12/site-packages/flwr/client/app.py", line 531, in start_client_internal
[FLWR-CA@my_client]     client_app: ClientApp = load_client_app_fn(
[FLWR-CA@my_client]                             ^^^^^^^^^^^^^^^^^^^
[FLWR-CA@my_client]   File "/venv/lib/python3.12/site-packages/flwr/client/clientapp/utils.py", line 67, in _load
[FLWR-CA@my_client]     config = get_project_config(runtime_app_dir)
[FLWR-CA@my_client]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[FLWR-CA@my_client]   File "/venv/lib/python3.12/site-packages/flwr/common/config.py", line 73, in get_project_config
[FLWR-CA@my_client]     raise FileNotFoundError(
[FLWR-CA@my_client] FileNotFoundError: Cannot find pyproject.toml in /home/localuser/client/bdfbd400-da2f-4853-adf9-eb366e3164b4/app_my_client_1/startup/../bdfbd400-da2f-4853-adf9-eb366e3164b4/app_my_client/custom

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Python version: 3.12
  • NVFlare version: 2.5.1

Additional context
Flower version: 1.12

@taleinat taleinat added the bug Something isn't working label Jan 23, 2025
@taleinat taleinat changed the title [BUG] [BUG] Running a Flower app as a Flare job fails due to bad path to custom dir Jan 23, 2025
@chesterxgchen
Copy link
Collaborator

thanks Tal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants