def setUpClass(cls): cls.real_study = make_sample_study2(add_transp_bind_models=True, add_sims='Run_1') cls.real_sim = cls.real_study.simulations[0] # Limit the number of process to avoid saturating the machine cls.job_manager = create_start_job_manager(max_workers=2) # Run the sim cls.real_sim.run(cls.job_manager, wait=True)
def _job_manager_default(self): from kromatography.model.factories.job_manager import \ create_start_job_manager from kromatography.utils.app_utils import get_preferences preferences = get_preferences() job_manager = create_start_job_manager( max_workers=preferences.solver_preferences.executor_num_worker) return job_manager
def make_sample_brute_force_optimizer_explorer(num_param, num_values=NUM_VALUES, with_data=True, run=False, **kwargs): optimizer = make_sample_brute_force_optimizer(num_params=num_param, num_values=num_values, with_data=with_data) if run: from kromatography.model.factories.job_manager import \ create_start_job_manager job_manager = create_start_job_manager(max_workers=2) try: optimizer.run(job_manager, wait=True) finally: job_manager.shutdown() explorer = OptimizerCostFunctionExplorer(optimizer=optimizer, **kwargs) return optimizer, explorer
def setUpClass(cls): cls.study2 = make_sample_study2(add_transp_bind_models=True) add_sims_from_exp_to_study(cls.study2, ['Run_1'], first_simulated_step_name="Load", last_simulated_step_name="Strip") cls.job_manager = create_start_job_manager(max_workers=2)
def setUpClass(cls): cls.job_manager = create_start_job_manager(max_workers=2)
def setUpClass(cls): # Limit the number of process to avoid saturating the machine cls.job_manager = create_start_job_manager(max_workers=2)
def _job_manager_default(self): job_manager = create_start_job_manager() return job_manager
def _job_manager_default(self): from kromatography.model.factories.job_manager import \ create_start_job_manager return create_start_job_manager(max_workers=self.max_workers)
def setUpClass(cls): # Avoid over-allocating work processes to avoid crashing OS cls.job_manager = create_start_job_manager(max_workers=2)
def setUpClass(cls): cls.real_study = make_sample_study2(add_transp_bind_models=True) cls.real_exp = cls.real_study.search_experiment_by_name('Run_1') cls.real_sim = build_simulation_from_experiment(cls.real_exp) cls.job_manager = create_start_job_manager(max_workers=1)