Skip to content

[autoscaler] Clean up monitoring loop code#11677

Merged
ericl merged 6 commits intoray-project:masterfrom
ericl:refactor-as2
Oct 30, 2020
Merged

[autoscaler] Clean up monitoring loop code#11677
ericl merged 6 commits intoray-project:masterfrom
ericl:refactor-as2

Conversation

@ericl
Copy link
Copy Markdown
Contributor

@ericl ericl commented Oct 28, 2020

Why are these changes needed?

  • Rename get_all_heartbeats to update_load_metrics
  • Remove unused job pubsub handler
  • Fix up the loop structure

Copy link
Copy Markdown
Contributor

@wuisawesome wuisawesome left a comment

Choose a reason for hiding this comment

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

Looks pretty innocuous so long as the dead code really is dead.

@WangTaoTheTonic
Copy link
Copy Markdown
Contributor

test_multi_mode_2.py uses monitor and it still subscribes XRAY_JOB_PATTERN, which should be removed.

@WangTaoTheTonic
Copy link
Copy Markdown
Contributor

And also get_all_heartbeat is used in other places, which should be renamed.

address, None, redis_password=ray_constants.REDIS_DEFAULT_PASSWORD)
monitor.update_raylet_map(_append_port=True)
monitor.psubscribe(ray.gcs_utils.XRAY_JOB_PATTERN) # TODO: Remove?
monitor.subscribe(ray.ray_constants.AUTOSCALER_RESOURCE_REQUEST_CHANNEL)
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.

Suggested change
monitor.subscribe(ray.ray_constants.AUTOSCALER_RESOURCE_REQUEST_CHANNEL)

We can simply remove this as no autoscaler related message should be handled in this test case.

@ericl
Copy link
Copy Markdown
Contributor Author

ericl commented Oct 29, 2020 via email

Copy link
Copy Markdown
Contributor

@WangTaoTheTonic WangTaoTheTonic left a comment

Choose a reason for hiding this comment

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

LGTM :)

@ericl ericl merged commit f9f372c into ray-project:master Oct 30, 2020
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.

3 participants