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

Make the Launcher extends FLComponent #2875

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

yhwen
Copy link
Collaborator

@yhwen yhwen commented Aug 29, 2024

Fixes # .

Description

Make the Launcher extends FLComponent. Print out the class loading error for module scan.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Quick tests passed locally by running ./runtest.sh.
  • In-line docstrings updated.
  • Documentation updated.

@@ -28,7 +29,7 @@ class LauncherRunStatus:
NOT_RUNNING = "not_running"


class Launcher(ABC):
class Launcher(FLComponent, ABC):
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the motivation of this change?

Previously I assume users might be writing their own launcher without knowing NVFlare specific concepts.

But maybe that assumption is not correct.

Copy link
Collaborator

Choose a reason for hiding this comment

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

second that, whats the motivation of change

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will enable the Launcher implementation class be able to handle the NVFlare events. Also be able to create the instance by "name".

Copy link
Collaborator

@chesterxgchen chesterxgchen Aug 29, 2024

Choose a reason for hiding this comment

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

seems we are changing the component to accommodate the scan utility, and to keep the "name" feature. why not just change the name to path. are we do too much to accommodate the utility tool ? I rather not to do the change

Copy link
Collaborator

Choose a reason for hiding this comment

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

We could. On the other hand, I think the SubprocessLauncher should have been a FLComponent any way so that it will benefit from things like event handler.

Anyway, this is no big deal. I think we can call it done after this. Any other classes missing from the table will be added via "path".

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok make sense

Copy link
Collaborator

Choose a reason for hiding this comment

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

About YT's comment, I don't think making Launcher a FLComponent conflicts with the idea that "users might be writing their own launcher without knowing NVFlare specific concepts". User still will be able to write whatever launcher they want, just now that their launcher can now also benefit from NVFLARE's event handling mechanism.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Besides, YT's statement seems to indicate that knowing NVFLARE specific concepts is a bad thing. I have a serious problem with this!

Knowing and understanding NVFLARE specific concepts is a wonderful thing, as long as we do not force the user to learn them before doing anything.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds good, I agree that as long as we do not force them, then it is good.

Apologize that my phrase was not accurate.

What I mean is we don't want users to be overwhelmed with our complicated (yet great) systems specifics to begin with any customization they might want to do.

This change LGTM.

In that argument, we could make some other components FLComponent as well in later release.

Copy link
Collaborator

@chesterxgchen chesterxgchen left a comment

Choose a reason for hiding this comment

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

suggest not make such change

Copy link
Collaborator

@yanchengnv yanchengnv left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -28,7 +29,7 @@ class LauncherRunStatus:
NOT_RUNNING = "not_running"


class Launcher(ABC):
class Launcher(FLComponent, ABC):
Copy link
Collaborator

Choose a reason for hiding this comment

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

About YT's comment, I don't think making Launcher a FLComponent conflicts with the idea that "users might be writing their own launcher without knowing NVFlare specific concepts". User still will be able to write whatever launcher they want, just now that their launcher can now also benefit from NVFLARE's event handling mechanism.

@@ -28,7 +29,7 @@ class LauncherRunStatus:
NOT_RUNNING = "not_running"


class Launcher(ABC):
class Launcher(FLComponent, ABC):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Besides, YT's statement seems to indicate that knowing NVFLARE specific concepts is a bad thing. I have a serious problem with this!

Knowing and understanding NVFLARE specific concepts is a wonderful thing, as long as we do not force the user to learn them before doing anything.

@YuanTingHsieh
Copy link
Collaborator

/build

@yhwen yhwen merged commit a4cff1a into NVIDIA:main Aug 29, 2024
16 checks passed
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 this pull request may close these issues.

4 participants