parameters: (self, job_weight)
return_statement: return max(1, min(multiprocessing.cpu_count(), available_ram // job_weight))
docstring: Given an estimated job_weight in MiB, compute a reasonable concurrency limit.
docstring_summary: Given an estimated job_weight in MiB, compute a reasonable concurrency limit.
docstring_tokens: Given an estimated job_weight in MiB compute a reasonable concurrency limit .
function: def get_num_jobs(self, job_weight):
          """Given an estimated job_weight in MiB, compute a reasonable concurrency limit."""
          if self.specified_num_jobs:
              return self.specified_num_jobs
  
          available_ram = get_available_ram()
  
          import multiprocessing
  
          return max(1, min(multiprocessing.cpu_count(), available_ram // job_weight))
function_tokens: def get_num_jobs ( self , job_weight ) : if self . specified_num_jobs : return self . specified_num_jobs available_ram = get_available_ram ( ) import multiprocessing return max ( 1 , min ( multiprocessing . cpu_count ( ) , available_ram // job_weight ) )