diff --git a/environment.yml b/environment.yml index ecfdb58..c830ab9 100644 --- a/environment.yml +++ b/environment.yml @@ -10,13 +10,13 @@ dependencies: - python=3.8 - openbabel - openmm - - rdkit - pip: - colorama - configargparse - h5py - numpy - - ray + - ray[default]>=2.0 + - rdkit - pandas - scikit_learn - scipy diff --git a/pyscreener/docking/dock/runner.py b/pyscreener/docking/dock/runner.py index d8498cb..b99eb50 100644 --- a/pyscreener/docking/dock/runner.py +++ b/pyscreener/docking/dock/runner.py @@ -229,7 +229,8 @@ def run(sim: Simulation) -> Optional[List[float]]: scores = DOCKRunner.parse_logfile(logfile) score = None if scores is None else reduce_scores(scores, sim.reduction, k=sim.k) - sim.result = Result(sim.smi, name, re.sub("[:,.]", "", ray.state.current_node_id()), score) + node_id = re.sub("[:,.]", "", ray.util.get_node_ip_address()) + sim.result = Result(sim.smi, name, node_id, score) return scores diff --git a/pyscreener/docking/screen.py b/pyscreener/docking/screen.py index 6cddeb6..cc03e7b 100644 --- a/pyscreener/docking/screen.py +++ b/pyscreener/docking/screen.py @@ -313,7 +313,7 @@ def collect_files(self, path: Optional[Union[str, Path]] = None): out_path = Path(path or self.path) out_path.mkdir(parents=True, exist_ok=True) - output_id = re.sub(r"[:,.]", "", ray.state.current_node_id()) + output_id = re.sub(r"[:,.]", "", ray.util.get_node_ip_address()) tmp_tar = (self.tmp_dir / output_id).with_suffix(".tar.gz") with tarfile.open(tmp_tar, "w:gz") as tar: diff --git a/pyscreener/docking/vina/runner.py b/pyscreener/docking/vina/runner.py index e619256..d87cac9 100644 --- a/pyscreener/docking/vina/runner.py +++ b/pyscreener/docking/vina/runner.py @@ -213,7 +213,8 @@ def run(sim: Simulation) -> Optional[List[float]]: else: score = utils.reduce_scores(np.array(scores), sim.reduction, k=sim.k) - sim.result = Result(sim.smi, name, re.sub("[:,.]", "", ray.state.current_node_id()), score) + node_id = re.sub("[:,.]", "", ray.util.get_node_ip_address()) + sim.result = Result(sim.smi, name, node_id, score) return scores diff --git a/setup.cfg b/setup.cfg index 6b94754..6d6a3e7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ install_requires = numpy pandas pdbfixer - ray[default] + ray[default]>=2.0 scipy tqdm