Skip to content

Add LaunchResult #66

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

Closed
apoorvkh opened this issue Sep 28, 2024 · 2 comments · Fixed by #69
Closed

Add LaunchResult #66

apoorvkh opened this issue Sep 28, 2024 · 2 comments · Fixed by #69
Assignees
Labels
enhancement New feature or request

Comments

@apoorvkh
Copy link
Owner

We should wrap the return values in a class called LaunchResult (or similar). This is rather important, because it is pretty ugly / unintuitive to value = trx.launch("...")["localhost"][0] or equivalent. Especially if you don't know the node names (in "auto" mode) or don't know which is rank zero.

Support functions .all(by: Literal['rank', 'hostname']) (all results, ordered by global rank or hostname+local), .value(rank: int) (global rank), .value(hostname: str) (list of values from specific host), .value(hostname: str, rank: int) (local rank)

@apoorvkh apoorvkh added the enhancement New feature or request label Sep 28, 2024
@apoorvkh apoorvkh self-assigned this Sep 28, 2024
@apoorvkh
Copy link
Owner Author

Does AgentStatus.return_values need to be dict[int, Any | WorkerException]? If it is indexed by local_rank, then I guess it can just be list[Any | WorkerException]

@apoorvkh
Copy link
Owner Author

@apoorvkh apoorvkh linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant