class_docstr: Resource manager interface.
  
  A resource manager can be used to request resources from a Ray cluster and
  allocate them to remote Ray tasks or actors.
  
  Resources have to be requested before they can be acquired.
  
  Resources managed by the resource manager can be in three states:
  
  1. "Requested":  The resources have been requested but are not yet available to
     schedule remote Ray objects. The resource request may trigger autoscaling,
     and can be cancelled if no longer needed.
  2. "Ready": The requested resources are now available to schedule remote Ray
     objects. They can be acquired and subsequently used remote Ray objects.
     The resource request can still be cancelled if no longer needed.
  3. "Acquired": The resources have been acquired by a caller to use for scheduling
     remote Ray objects. Note that it is the responsibility of the caller to
     schedule the Ray objects with these resources.
     The associated resource request has been completed and can no longer be
     cancelled. The acquired resources can be freed by the resource manager when
     they are no longer used.
  
  The flow is as follows:
  
  .. code-block:: python
  
      # Create resource manager
      resource_manager = ResourceManager()
  
      # Create resource request
      resource_request = ResourceRequest([{"CPU": 4}])
  
      # Pass to resource manager
      resource_manager.request_resources(resource_request)
  
      # Wait until ready
      while not resource_manager.has_resources_ready(resource_request):
          time.sleep(1)
  
      # Once ready, acquire resources
      acquired_resource = resource_manager.acquire_resources(resource_request)
  
      # Bind to remote task or actor
      annotated_remote_fn = acquired_resource.annotate_remote_entities(
          [remote_fn])
  
      # Run remote function. This will use the acquired resources
      ray.get(annotated_remote_fn.remote())
  
      # After using the resources, free
      resource_manager.free_resources(annotated_resources)
docstr: Request resources.
  
  Depending on the backend, resources can trigger autoscaling. Requested
  resources can be ready or not ready. Once they are "ready", they can
  be acquired and used by remote Ray objects.
  
  Resource requests can be cancelled anytime using ``cancel_resource_request()``.
  Once acquired, the resource request is removed. Acquired resources can be
  freed with ``free_resources()``.
docstr_tok: ["Request","resources",".","Depending","on","the","backend",",","resources","can","trigger","autoscaling",".","Requested","resources","can","be","ready","or","not","ready",".","Once","they","are","``","ready","''",",","they","can","be","acquired","and","used","by","remote","Ray","objects",".","Resource","requests","can","be","cancelled","anytime","using","``","cancel_resource_request","(",")","``",".","Once","acquired",",","the","resource","request","is","removed",".","Acquired","resources","can","be","freed","with","``","free_resources","(",")","``","."]
code: def request_resources(self, resource_request: ResourceRequest):
      """Request resources.
  
      Depending on the backend, resources can trigger autoscaling. Requested
      resources can be ready or not ready. Once they are "ready", they can
      be acquired and used by remote Ray objects.
  
      Resource requests can be cancelled anytime using ``cancel_resource_request()``.
      Once acquired, the resource request is removed. Acquired resources can be
      freed with ``free_resources()``.
      """
      raise NotImplementedError
  
file_path: ray/python/ray/air/execution/resources/resource_manager.py
imports: import abc
  from typing import List, Optional
  import ray
  from ray.air.execution.resources.request import ResourceRequest, AcquiredResources
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 1 for calling the ResourceManager obj's underlying member method code with example usage: obj.request_resources(resource_request) without return types