Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

[Chore][Core/Dashboard] Remove TrainHead's dependency on DataOrganizer#51739

Conversation

MortalHappiness
Copy link
Member

@MortalHappinessMortalHappiness commentedMar 27, 2025
edited
Loading

Why are these changes needed?

This PR removesTrainHead's dependency onDataOrganizer.

  • Addednocache query string support to theaiohttp_cache decorator. If it's set to"1", the cache will be bypassed.
  • Fixed thetest_aiohttp_cache test:
    • Replaced the use ofCounter withset, which makes more sense here.
    • Removed thewhile loop in the test since we don't need to retry for this.
    • Added a test case for thenocache query string.
  • Addedids query string support toActorHead. We can now useGET /logical/actors?ids=id1,id2,id3 to fetch info for multiple actors. Also added a test for this.
  • UpdatedTrainHead to stop callingDataOrganizer.get_actor_infos directly. It now makes an HTTP request toActorHead, which will callDataOrganizer.get_actor_infos on its behalf.

Related issue number

N/A

Checks

  • I've signed off every commit(by using the -s flag, i.e.,git commit -s) in this PR.
  • I've runscripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed forhttps://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it indoc/source/tune/api/ under the
      corresponding.rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures athttps://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
… infosSigned-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
@MortalHappinessMortalHappiness added the goadd ONLY when ready to merge, run all tests labelMar 27, 2025
@MortalHappinessMortalHappiness changed the title[Chore][Core/Dashboard] Break TrainHead's dependency on DataOrganizer[Chore][Core/Dashboard] Remove TrainHead's dependency on DataOrganizerMar 27, 2025
@MortalHappinessMortalHappiness marked this pull request as ready for reviewMarch 27, 2025 04:38
actor_ids_qs_str = ",".join(actor_ids)
url = f"http://{self.http_host}:{self.http_port}/logical/actors?ids={actor_ids_qs_str}&nocache=1"
async with self._http_session.get(url) as resp:
assert resp.status == 200, f"Failed to get actor info: {resp.status}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets' not use assert, but returns the 500 to the end user

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It already returns 500 because this will raiseAssertionError. This function is called by other http route handlers. And if this error is not caught, the route handler will return 500 internal server error response.

Copy link
Collaborator

Choose a reason for hiding this comment

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

assert is used to catch program logical errors. Lets raise a different error instead.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Updated. Useresp.raise_for_status() instead.

actor_infos = await DataOrganizer.get_actor_infos(
actor_ids=[train_run.controller_actor_id],
)
actor_infos = await self._get_actor_infos([train_run.controller_actor_id])
Copy link
Collaborator

Choose a reason for hiding this comment

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

is the format the same between what returns from http and what returns from DataOrganizer directly?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yes. They are the same.

Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
@jjyaojjyao merged commit891ba52 intoray-project:masterMar 28, 2025
5 checks passed
justinrmiller pushed a commit to justinrmiller/ray that referenced this pull requestMar 30, 2025
ray-project#51739)Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>Signed-off-by: Justin Miller <justinrmiller@gmail.com>
pavelkushtia pushed a commit to pavelkushtia/ray that referenced this pull requestApr 6, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jjyaojjyaojjyao approved these changes

Assignees

@jjyaojjyao

Labels
goadd ONLY when ready to merge, run all tests
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@MortalHappiness@jjyao

[8]ページ先頭

©2009-2025 Movatter.jp