# \[Autoscaler\] Does Ray still use autoscaler when starting the cluster manually?

**URL:** <https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241>\
**Category:** Ray Clusters\
**Created:** [May 21, 2021, 3:41pm UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241 "2021-05-21T15:41:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelarman](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/michaelarman/32/905_2.png) [@michaelarman](https://discuss.ray.io/u/michaelarman)\
**Post date:** [May 21, 2021, 3:41pm UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241/1 "2021-05-21T15:41:30Z")

</div>

Probably a silly question or possibly answered before but can the autoscaler be enabled with a manual cluster launch?

---

<div class="post-metadata">

**Author:** ![rliaw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/rliaw/32/24_2.png) [@rliaw](https://discuss.ray.io/u/rliaw)\
**Post date:** [May 21, 2021, 9:47pm UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241/2 "2021-05-21T21:47:13Z")

</div>

Yeah, you can enable the autoscaler during a manual cluster launch.

Ray just runs:

```auto
ray start --head --port=6379 --object-manager-port=8076 --autoscaling-config=~/ray_bootstrap_config.yaml

```

on the head node of the cluster.

---

<div class="post-metadata">

**Author:** ![michaelarman](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/michaelarman/32/905_2.png) [@michaelarman](https://discuss.ray.io/u/michaelarman)\
**Post date:** [September 24, 2021, 8:16pm UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241/3 "2021-09-24T20:16:08Z")

</div>

Hey Richard, sorry to bug you on an old post but I’ve come across an error when I try to enable the autoscaler in a manual launch.  
I don’t get any errors right away but when my program starts to run I get this

```auto
2021-09-24 15:11:56,168 WARNING worker.py:1059 -- The autoscaler failed with the following error:
Traceback (most recent call last):
  File "/root/anaconda3/envs/LarusTF/lib/python3.8/site-packages/ray/autoscaler/_private/monitor.py", line 284, in run
    self._initialize_autoscaler()
  File "/root/anaconda3/envs/LarusTF/lib/python3.8/site-packages/ray/autoscaler/_private/monitor.py", line 129, in _initialize_autoscaler
    self.autoscaler = StandardAutoscaler(
  File "/root/anaconda3/envs/LarusTF/lib/python3.8/site-packages/ray/autoscaler/_private/autoscaler.py", line 86, in __init__
    self.reset(errors_fatal=True)
  File "/root/anaconda3/envs/LarusTF/lib/python3.8/site-packages/ray/autoscaler/_private/autoscaler.py", line 537, in reset
    raise e
  File "/root/anaconda3/envs/LarusTF/lib/python3.8/site-packages/ray/autoscaler/_private/autoscaler.py", line 467, in reset
    with open(self.config_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/root/ray_bootstrap_config.yaml'

```

It seems to be looking for for the bootstrap file. I tried looking for one but couldn’t find it. Can you let me know if there’s a fix and what the bootstrap file is and where it can be located?

---

<div class="post-metadata">

**Author:** ![rliaw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/rliaw/32/24_2.png) [@rliaw](https://discuss.ray.io/u/rliaw)\
**Post date:** [September 24, 2021, 8:34pm UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241/4 "2021-09-24T20:34:41Z")

</div>

It should be the same autoscaling config (ray\_bootstrap\_config.yaml) that you use to launch or specify the autoscaling configuration!

---

<div class="post-metadata">

**Author:** ![michaelarman](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/michaelarman/32/905_2.png) [@michaelarman](https://discuss.ray.io/u/michaelarman)\
**Post date:** [September 24, 2021, 8:44pm UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241/5 "2021-09-24T20:44:24Z")

</div>

Ohhh so if i understand correctly I would use a yaml like [this](https://github.com/ray-project/ray/blob/master/python/ray/autoscaler/local/example-full.yaml) if running on an on-premise cluster ?

---

<div class="post-metadata">

**Author:** ![lshao-ts](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@lshao-ts](https://discuss.ray.io/u/lshao-ts)\
**Post date:** [September 24, 2021, 9:57pm UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241/6 "2021-09-24T21:57:39Z")

</div>

@rliaw I have a question regarding manually starting cluster too. Just asking here for convenience.

In the ray\_bootstrap\_config.yaml file, can I specify`head_node_type` to some type that isn’t in the `available_node_types`? The reason is because I want my tasks to all run remotely and autoscaler shouldn’t ever start a node with that head type. It seems working fine in that way, but when I call `ray.autoscaler.sdk.request_resources`, the code seems checking the resource requirement of the head node in the `available_node_types` dict. Is this expected? It then tries to launch nodes with that type, although my tasks didn’t run with resource requirements that could be satisfied with that type.

---

<div class="post-metadata">

**Author:** ![rliaw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/rliaw/32/24_2.png) [@rliaw](https://discuss.ray.io/u/rliaw)\
**Post date:** [September 24, 2021, 10:22pm UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241/7 "2021-09-24T22:22:12Z")

</div>

This is a question for @Dmitri!

---

<div class="post-metadata">

**Author:** ![Dmitri](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dmitri/32/657_2.png) [@Dmitri](https://discuss.ray.io/u/Dmitri)\
**Post date:** [September 25, 2021, 2:47am UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241/8 "2021-09-25T02:47:57Z")

</div>

Hi, @lshao-ts !

head\_node\_types has to be one of the available\_node\_types

It sounds like you might have run into a bug. Could you post a [bug report](https://github.com/ray-project/ray/issues/new?assignees=&labels=bug%2Ctriage&template=bug-report.yml&title=%5BBug%5D+) on github with details like the autoscaling config, ray version, how you’re starting ray, etc?

---

<div class="post-metadata">

**Author:** ![lshao-ts](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@lshao-ts](https://discuss.ray.io/u/lshao-ts)\
**Post date:** [September 25, 2021, 3:02am UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241/9 "2021-09-25T03:02:45Z")

</div>

The bug is probably on my end as I’m still trying to figure out many details.

If `head_node_type` is in the `available_node_types` but not to be scheduled, do I fill out its resources to match what I specified when running `ray start --head`, such as CPU, GPU, memory?

---

<div class="post-metadata">

**Author:** ![Dmitri](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dmitri/32/657_2.png) [@Dmitri](https://discuss.ray.io/u/Dmitri)\
**Post date:** [September 25, 2021, 4:47am UTC](https://discuss.ray.io/t/autoscaler-does-ray-still-use-autoscaler-when-starting-the-cluster-manually/2241/10 "2021-09-25T04:47:39Z")

</div>

> If `head_node_type` is in the `available_node_types` but not to be scheduled, do I fill out its resources to match what I specified when running `ray start --head` , such as CPU, GPU, memory?

Probably that’s a good idea.

Could you share that autoscaling config you’re using?

Also, I should say that manually starting an autoscaling cluster with an autoscaling config is possible, but isn’t as well supported or documented as using `ray up`.
