You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromcollectionsimportCounterimportsocketimporttimeimportrayray.init("ray://127.0.0.1:10001")
print('''This cluster consists of {} nodes in total {} CPU resources in total {} memory resources in total'''.format(len(ray.nodes()), ray.cluster_resources()['CPU'], ray.cluster_resources()['memory']))
@ray.remote(num_cpus=2)deff():
time.sleep(0.001)
# Return IP address.returnsocket.gethostbyname('localhost')
object_ids= [f.remote() for_inrange(10000)]
ip_addresses=ray.get(object_ids)
print('Tasks executed')
forip_address, num_tasksinCounter(ip_addresses).items():
print(' {} tasks on {}'.format(num_tasks, ip_address))
The script will just hang and the autoscaler will show logs as per above.
Anything else
No response
Are you willing to submit a PR?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered:
DmitriGekhtman
added
docs
Improvements or additions to documentation
P1
Issue that should be fixed within a few weeks
and removed
bug
Something isn't working
labels
Dec 23, 2022
Each task you are trying to schedule require 2 CPUs, but the Ray pods that you would like to fit these tasks into have only 1 CPU. Thus, the autoscaler cannot schedule a Ray pod that will be able to fit a task.
The behavior is expected, but I think it is poorly documented.
More generally, the Ray-on-K8s architecture of
Ray tasks in Ray pods in K8s nodes
is not explained clearly enough.
Search before asking
KubeRay Component
ray-operator
What happened + What you expected to happen
Reproduction script
helm v0.4.0 raycluster with values.yaml:
Then run this client script:
The script will just hang and the autoscaler will show logs as per above.
Anything else
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: