-
Notifications
You must be signed in to change notification settings - Fork 23
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
Setup ProxyActor Config [1/N] #132
Conversation
Signed-off-by: paer <[email protected]>
Signed-off-by: paer <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: paer <[email protected]>
Signed-off-by: paer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fed/api.py
Outdated
cross_silo_serializing_allowed_list: Dict = None, | ||
cross_silo_send_options: Dict = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cross_silo_send_options
equals actor options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the "cross_silo" prefix may be more clear to user, what do u think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming is ok, but cross_silo_send_options
== actor.options is worth discussing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At high level, I don't think it's a good idea to allow users setting the options for proxies, as:
It's not that all options should be exposed to users. For instances:
- Why we need expose
name
? max_concurrency
is what rayfed should control under the hood.
What I recommend is to expose the specific APIs.
+1. |
Make sense, I'll use a class to only expose certain options |
Move this to PR description? |
Signed-off-by: paer <[email protected]>
Signed-off-by: paer <[email protected]>
Signed-off-by: paer <[email protected]>
Signed-off-by: paer <[email protected]>
Signed-off-by: paer <[email protected]>
Signed-off-by: paer <[email protected]> Conflicts: fed/barriers.py
Signed-off-by: paer <[email protected]>
Signed-off-by: paer <[email protected]>
@@ -131,6 +133,14 @@ def init( | |||
cross_silo_serializing_allowed_list: The package or class list allowed for | |||
serializing(deserializating) cross silos. It's used for avoiding pickle | |||
deserializing execution attack when crossing solis. | |||
cross_silo_send_resource_label: Customized resource label, the SendProxyActor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are trying to limit the user facing proxy configs, maybe exposing ProxyActorConfig would give us more extensibility?If we would like to add another config, this might look tedious, also, send_max_retries could merge into ProxyActorConfig?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1.
And I vote for a name ProxyConfig
, which not exposing more details on the ray actor implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for the advice~ @fengsp @jovany-wang
That's also what I plan to do in [2/N]: merge cross-silo RPC related config into ProxyActorConfig, and then expose it as a parameter of fed.init
.
[1/N] is just trying to enable placing the ProxyActor according to its resource label.
@jovany-wang ProxyConfig
is indeed a better name when exposing it to users 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, this PR LGTM.
And you may need file an issue to trace the related coming items.
Sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is the first step of #134
This PR provides
cross_silo_send_resource_label
andcross_silo_recv_resource_label
config infed.init
and convert them to the "resources" field of ActorClass.options.