Right now, we support port selection by providing a range of port numbers to use.
However, for @tgaddair's use case, we will need to support providing a list of worker ports (which may not necessarily be contiguous).
@richardliaw this should be really straightforward to implement. If you wouldn't mind proposing an API, I'd be happy to implement it as I wrote the original worker port allocation code.
@tgaddair, would this work for you:
# Proposal
ray start --worker-ports=1232,4321,2343,5542,1231,5645,2323,6666,1111,2222 --head
For reference:
# Current API
ray start --min-worker-port=1232 --max-worker-port=4321 --head
Hey @richard4912, I believe that should work. I've asked Min from our side to also take a look and get back to you here, thanks!
yeah, it should work for Peloton dynamic port allocation. Thanks @richard4912 !
Cool, this looks straightforward to me. Will work on a PR probably next week (assuming we don't need to rush this).
Also @richardliaw I assume we're leaving the existing min/max option for most use cases?
Yeah, leaving it sounds good.
RE: next week, sounds good - if it falls past, then let's chat and you can let me know how to do it.
Most helpful comment
@richardliaw this should be really straightforward to implement. If you wouldn't mind proposing an API, I'd be happy to implement it as I wrote the original worker port allocation code.