<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Ray cannot detect GPU on the cluster in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/ray-cannot-detect-gpu-on-the-cluster/m-p/133598#M4146</link>
    <description>&lt;P&gt;I have replicated all your steps and created the ray cluster exactly as you have done.&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Also, I have set: spark.conf.&lt;/SPAN&gt;&lt;SPAN&gt;set&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;spark.task.resource.gpu.amount&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;0.5&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;And I see a warning that shows that I don't allocate any GPU for Spark (as 1), even though I set it to 0.5&lt;/P&gt;
&lt;P&gt;See the attached image and the error below.&lt;/P&gt;
&lt;P&gt;You configured 'spark.task.resource.gpu.amount' to &lt;STRONG&gt;1.0&lt;/STRONG&gt;, we recommend setting this value to 0 so that Spark jobs do not reserve GPU resources, preventing Ray-on-Spark workloads from having the maximum number of GPUs available.&lt;/P&gt;
&lt;P&gt;What likely happened is that since you set up the cluster to auto-scale, it probably did not scale as expected, causing Spark to use the only GPU on the node and resulting in the issue you are facing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Oct 2025 05:10:06 GMT</pubDate>
    <dc:creator>Krishna_S</dc:creator>
    <dc:date>2025-10-03T05:10:06Z</dc:date>
    <item>
      <title>Ray cannot detect GPU on the cluster</title>
      <link>https://community.databricks.com/t5/administration-architecture/ray-cannot-detect-gpu-on-the-cluster/m-p/92736#M1979</link>
      <description>&lt;P&gt;I am trying to run ray on databricks for chunking and embedding tasks. The cluster I’m using is:&lt;/P&gt;&lt;P&gt;g4dn.xlarge&lt;BR /&gt;1-4 workers with 4-16 cores&lt;BR /&gt;1 GPU and 16GB memory&lt;/P&gt;&lt;P&gt;I have set spark.task.resource.gpu.amount to 0.5 currently.&lt;/P&gt;&lt;P&gt;This is how I have setup my ray cluster:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;setup_ray_cluster( min_worker_nodes=1, max_worker_nodes=3, num_gpus_head_node=1, )&lt;/LI-CODE&gt;&lt;P&gt;And this is the chunking function:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/32932"&gt;@ray&lt;/a&gt;.remote(num_gpus=0.2)
def chunk_udf(row):
    texts = row["content"]
    data = row.copy()
    split_text = splitter.split_text(texts)
    split_text = [text.replace("\n", " ") for text in split_text]
    return list(zip(split_text,data))&lt;/LI-CODE&gt;&lt;P&gt;When I run the flat_map function for chunking. It throws the following error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;chunked_ds = ds.flat_map(chunk_udf)
chunked_ds.show(5) &lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;At least one of the input arguments for this task could not be computed: ray.exceptions.RaySystemError: System error: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU. &lt;/LI-CODE&gt;&lt;P&gt;Is there something I need to change in my setup?&lt;BR /&gt;torch.cuda.is_available() returns True in the notebook.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2024 07:36:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/ray-cannot-detect-gpu-on-the-cluster/m-p/92736#M1979</guid>
      <dc:creator>Awoke101</dc:creator>
      <dc:date>2024-10-04T07:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Ray cannot detect GPU on the cluster</title>
      <link>https://community.databricks.com/t5/administration-architecture/ray-cannot-detect-gpu-on-the-cluster/m-p/133598#M4146</link>
      <description>&lt;P&gt;I have replicated all your steps and created the ray cluster exactly as you have done.&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Also, I have set: spark.conf.&lt;/SPAN&gt;&lt;SPAN&gt;set&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;spark.task.resource.gpu.amount&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;0.5&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;And I see a warning that shows that I don't allocate any GPU for Spark (as 1), even though I set it to 0.5&lt;/P&gt;
&lt;P&gt;See the attached image and the error below.&lt;/P&gt;
&lt;P&gt;You configured 'spark.task.resource.gpu.amount' to &lt;STRONG&gt;1.0&lt;/STRONG&gt;, we recommend setting this value to 0 so that Spark jobs do not reserve GPU resources, preventing Ray-on-Spark workloads from having the maximum number of GPUs available.&lt;/P&gt;
&lt;P&gt;What likely happened is that since you set up the cluster to auto-scale, it probably did not scale as expected, causing Spark to use the only GPU on the node and resulting in the issue you are facing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 05:10:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/ray-cannot-detect-gpu-on-the-cluster/m-p/133598#M4146</guid>
      <dc:creator>Krishna_S</dc:creator>
      <dc:date>2025-10-03T05:10:06Z</dc:date>
    </item>
  </channel>
</rss>

