Conversation
Signed-off-by: abrar <abrar@anyscale.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a useful feature to trigger reconfigure on replica rank changes, controlled by a new environment variable. The implementation is mostly solid, and the new tests cover the functionality well. However, I've identified a potential backward compatibility issue where the change to the reconfigure method's signature could break existing user deployments. I've suggested a fix to inspect the method signature to avoid this. I also found a minor inaccuracy in a test comment that I've proposed correcting for clarity.
| # NOTE(edoakes): there is the possibility of a race condition in user code if | ||
| # they don't have any form of concurrency control between `reconfigure` and | ||
| # other methods. See https://github.com/ray-project/ray/pull/42159. | ||
|
|
|
Logic and flag makes sense. I'll let @zcin and others more familiar with the codebase to review the actual implementation. |
Signed-off-by: abrar <abrar@anyscale.com>
Signed-off-by: abrar <abrar@anyscale.com>
|
|
||
| # NOTE(abrar): The only way to subscribe to rank changes is to provide some user config. | ||
| # We can relax this in the future as more usecases arise for rank. I am reluctant to | ||
| # introduce behavior change for a feature we might not need. |
There was a problem hiding this comment.
| # introduce behavior change for a feature we might not need. | |
| # introduce behavior change for a feature we might not need. |
Are we explicitly mentioning this as we might remove the rank feature if not needed in the future? If so, maybe should be more explicit about how it potentially can be removed?
There was a problem hiding this comment.
might remove the rank feature if not needed in the future?
Not really, i am saying that we can call reconfigure even if user_config is not provided in future.
This change ensures that `reconfigure` is invoked with both `user_config` and `rank` under the following conditions: 1. The user has implemented `reconfigure`, and redeploys with an updated `user_config`. 2. The user has implemented `reconfigure`, the replica rank changes, user has rank as param in the `reconfigure` method signature, and `deployment_config` contains a `user_config`. Reconfigure is also invoked at replica startup if, user has implemented `reconfigure` and has provided some `user_config` fixes ray-project#57048 --------- Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: Pavitra Bhalla <pavitra@rayai.com>
This change ensures that `reconfigure` is invoked with both `user_config` and `rank` under the following conditions: 1. The user has implemented `reconfigure`, and redeploys with an updated `user_config`. 2. The user has implemented `reconfigure`, the replica rank changes, user has rank as param in the `reconfigure` method signature, and `deployment_config` contains a `user_config`. Reconfigure is also invoked at replica startup if, user has implemented `reconfigure` and has provided some `user_config` fixes ray-project#57048 --------- Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: Josh Kodi <joshkodi@gmail.com>
This change ensures that `reconfigure` is invoked with both `user_config` and `rank` under the following conditions: 1. The user has implemented `reconfigure`, and redeploys with an updated `user_config`. 2. The user has implemented `reconfigure`, the replica rank changes, user has rank as param in the `reconfigure` method signature, and `deployment_config` contains a `user_config`. Reconfigure is also invoked at replica startup if, user has implemented `reconfigure` and has provided some `user_config` fixes ray-project#57048 --------- Signed-off-by: abrar <abrar@anyscale.com>
This change ensures that `reconfigure` is invoked with both `user_config` and `rank` under the following conditions: 1. The user has implemented `reconfigure`, and redeploys with an updated `user_config`. 2. The user has implemented `reconfigure`, the replica rank changes, user has rank as param in the `reconfigure` method signature, and `deployment_config` contains a `user_config`. Reconfigure is also invoked at replica startup if, user has implemented `reconfigure` and has provided some `user_config` fixes #57048 --------- Signed-off-by: abrar <abrar@anyscale.com>
This change ensures that `reconfigure` is invoked with both `user_config` and `rank` under the following conditions: 1. The user has implemented `reconfigure`, and redeploys with an updated `user_config`. 2. The user has implemented `reconfigure`, the replica rank changes, user has rank as param in the `reconfigure` method signature, and `deployment_config` contains a `user_config`. Reconfigure is also invoked at replica startup if, user has implemented `reconfigure` and has provided some `user_config` fixes ray-project#57048 --------- Signed-off-by: abrar <abrar@anyscale.com>
This change ensures that `reconfigure` is invoked with both `user_config` and `rank` under the following conditions: 1. The user has implemented `reconfigure`, and redeploys with an updated `user_config`. 2. The user has implemented `reconfigure`, the replica rank changes, user has rank as param in the `reconfigure` method signature, and `deployment_config` contains a `user_config`. Reconfigure is also invoked at replica startup if, user has implemented `reconfigure` and has provided some `user_config` fixes ray-project#57048 --------- Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: xgui <xgui@anyscale.com>
This change ensures that `reconfigure` is invoked with both `user_config` and `rank` under the following conditions: 1. The user has implemented `reconfigure`, and redeploys with an updated `user_config`. 2. The user has implemented `reconfigure`, the replica rank changes, user has rank as param in the `reconfigure` method signature, and `deployment_config` contains a `user_config`. Reconfigure is also invoked at replica startup if, user has implemented `reconfigure` and has provided some `user_config` fixes #57048 --------- Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
This change ensures that `reconfigure` is invoked with both `user_config` and `rank` under the following conditions: 1. The user has implemented `reconfigure`, and redeploys with an updated `user_config`. 2. The user has implemented `reconfigure`, the replica rank changes, user has rank as param in the `reconfigure` method signature, and `deployment_config` contains a `user_config`. Reconfigure is also invoked at replica startup if, user has implemented `reconfigure` and has provided some `user_config` fixes ray-project#57048 --------- Signed-off-by: abrar <abrar@anyscale.com>
This change ensures that `reconfigure` is invoked with both `user_config` and `rank` under the following conditions: 1. The user has implemented `reconfigure`, and redeploys with an updated `user_config`. 2. The user has implemented `reconfigure`, the replica rank changes, user has rank as param in the `reconfigure` method signature, and `deployment_config` contains a `user_config`. Reconfigure is also invoked at replica startup if, user has implemented `reconfigure` and has provided some `user_config` fixes ray-project#57048 --------- Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: Aydin Abiar <aydin@anyscale.com>
This change ensures that `reconfigure` is invoked with both `user_config` and `rank` under the following conditions: 1. The user has implemented `reconfigure`, and redeploys with an updated `user_config`. 2. The user has implemented `reconfigure`, the replica rank changes, user has rank as param in the `reconfigure` method signature, and `deployment_config` contains a `user_config`. Reconfigure is also invoked at replica startup if, user has implemented `reconfigure` and has provided some `user_config` fixes ray-project#57048 --------- Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: Future-Outlier <eric901201@gmail.com>
This change ensures that
reconfigureis invoked with bothuser_configandrankunder the following conditions:reconfigure, and redeploys with an updateduser_config.reconfigure, the replica rank changes, user has rank as param in thereconfiguremethod signature, anddeployment_configcontains auser_config.Reconfigure is also invoked at replica startup if, user has implemented
reconfigureand has provided someuser_configfixes #57048