Skip to content

[core] Remove serialized_allocated_resource_instances from RuntimeEnv creation. - #47118

Merged
rynewang merged 4 commits into
ray-project:masterfrom
rynewang:remove-rea-resources
Aug 16, 2024
Merged

rynewang merged 4 commits into
ray-project:masterfrom
rynewang:remove-rea-resources

Conversation

@rynewang

@rynewang rynewang commented Aug 13, 2024 •

Copy link
Copy Markdown
Contributor

GetOrCreateRuntimeEnvRequest has field serialized_allocated_resource_instances. It does not serve any purpose other than a log in the Runtime Env Agent. Removes it.

Also removes required_resources in WorkerCacheKey and the flag worker_resource_limits_enabled.

Signed-off-by: Ruiyang Wang <[email protected]>
@jjyao

jjyao commented Aug 14, 2024

Copy link
Copy Markdown
Contributor

Past conversation on deleting the code: #16871 (comment)

@jjyao

jjyao commented Aug 14, 2024

Copy link
Copy Markdown
Contributor

I'd vote for removing worker_resource_limits_enabled flag completely for now and add it back later once we actually support it.

Also I feel the implementation can be changed to dynamically inject the allocated resources into container runtime env dict (e.g. {"container": {"image": xxxx, "allocated_resources": {"CPU": 1}}}) before calling PopWorker instead of passing it separately. cc @SongGuyang.

@rkooo567 rkooo567 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's also remove worker_resource_limits_enabled?

@rynewang

Copy link
Copy Markdown
Contributor Author

what is allocated resources btw?

@jjyao

jjyao commented Aug 14, 2024

Copy link
Copy Markdown
Contributor

what is allocated resources btw?

That's allocated resources to the task.

@rynewang

Copy link
Copy Markdown
Contributor Author

worker_resource_limits_enabled removed

Comment thread src/ray/common/task/task_spec.cc Outdated
? required_resources
: absl::flat_hash_map<std::string, double>{}),
: serialized_runtime_env(std::move(serialized_runtime_env)),
required_resources(required_resources),

@jjyao jjyao Aug 15, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Required_resources can also be removed? Based on the previous logic, it's always empty.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's always empty. It describes the resource shape of the task, populated from Python side to CoreWorker:

task_options.resources,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I mean required_resources of WorkerCacheKey is always empty if the flag is off?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed

@rkooo567 rkooo567 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. I will leave required_resources discussion to @jjyao

@rynewang rynewang added the go add ONLY when ready to merge, run all tests label Aug 15, 2024

@jjyao jjyao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice

Signed-off-by: Ruiyang Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants