python/ray/tune/schedulers/resource_changing_scheduler.py
def _get_total_available_resources(
        self, trial_runner: "trial_runner.TrialRunner"
    ) -> Tuple[float, float]:
        """Get the number of CPUs and GPUs avaialble in total (not just free)"""
        total_available_cpus = (
            trial_runner.trial_executor._resource_updater.get_num_cpus()
            - self.reserve_resources.get("CPU", 0)
        )
        total_available_gpus = (
            trial_runner.trial_executor._resource_updater.get_num_gpus()
            - self.reserve_resources.get("GPU", 0)
        )
        return total_available_cpus, total_available_gpus
Get the number of CPUs and GPUs avaialble in total (not just free)
Get the number of CPUs and GPUs avaialble in total (not just free)
Get the number of CPUs and GPUs avaialble in total ( not just free )
def _get_total_available_resources(
        self, trial_runner: "trial_runner.TrialRunner"
    ) -> Tuple[float, float]:
        total_available_cpus = (
            trial_runner.trial_executor._resource_updater.get_num_cpus()
            - self.reserve_resources.get("CPU", 0)
        )
        total_available_gpus = (
            trial_runner.trial_executor._resource_updater.get_num_gpus()
            - self.reserve_resources.get("GPU", 0)
        )
        return total_available_cpus, total_available_gpus
def _get_total_available_resources ( self , trial_runner : "trial_runner.TrialRunner" ) -> Tuple [ float , float ] : total_available_cpus = ( trial_runner . trial_executor . _resource_updater . get_num_cpus ( ) - self . reserve_resources . get ( "CPU" , 0 ) ) total_available_gpus = ( trial_runner . trial_executor . _resource_updater . get_num_gpus ( ) - self . reserve_resources . get ( "GPU" , 0 ) ) return total_available_cpus , total_available_gpus
Get the number of CPUs and GPUs avaialble in total (not just free)
Get the number of CPUs and GPUs avaialble in total ( not just free )
"""Get the number of CPUs and GPUs avaialble in total (not just free)"""
self
trial_runner
"trial_runner.TrialRunner"