Skip to content

Commit 231a323

Browse files
lvhan028grimoire
andauthored
bump version to v0.7.3 (#3416)
* bump version to v0.7.3 * add rayexecutor release timeout (#3403) * add release timeout * change log level --------- Co-authored-by: q yao <[email protected]>
1 parent d131cc7 commit 231a323

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

docs/en/get_started/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pip install lmdeploy
2323
The default prebuilt package is compiled on **CUDA 12**. If CUDA 11+ (>=11.3) is required, you can install lmdeploy by:
2424

2525
```shell
26-
export LMDEPLOY_VERSION=0.7.2.post1
26+
export LMDEPLOY_VERSION=0.7.3
2727
export PYTHON_VERSION=38
2828
pip install https://github.com/InternLM/lmdeploy/releases/download/v${LMDEPLOY_VERSION}/lmdeploy-${LMDEPLOY_VERSION}+cu118-cp${PYTHON_VERSION}-cp${PYTHON_VERSION}-manylinux2014_x86_64.whl --extra-index-url https://download.pytorch.org/whl/cu118
2929
```

docs/zh_cn/get_started/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pip install lmdeploy
2323
默认的预构建包是在 **CUDA 12** 上编译的。如果需要 CUDA 11+ (>=11.3),你可以使用以下命令安装 lmdeploy:
2424

2525
```shell
26-
export LMDEPLOY_VERSION=0.7.2.post1
26+
export LMDEPLOY_VERSION=0.7.3
2727
export PYTHON_VERSION=38
2828
pip install https://github.com/InternLM/lmdeploy/releases/download/v${LMDEPLOY_VERSION}/lmdeploy-${LMDEPLOY_VERSION}+cu118-cp${PYTHON_VERSION}-cp${PYTHON_VERSION}-manylinux2014_x86_64.whl --extra-index-url https://download.pytorch.org/whl/cu118
2929
```

lmdeploy/pytorch/engine/executor/ray_executor.py

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,17 @@ def __init__(self,
230230
logger.info('Warming up distribute environment, this might take long time, please waiting...')
231231
ray.get([worker.warmup_dist.remote() for worker in self.workers])
232232

233-
def collective_rpc(self, method: str, args: Tuple[Any] = None, kwargs: Dict[str, Any] = None):
233+
def collective_rpc(self,
234+
method: str,
235+
args: Tuple[Any] = None,
236+
kwargs: Dict[str, Any] = None,
237+
timeout: float = None):
234238
"""collective rpc."""
235239
if args is None:
236240
args = list()
237241
if kwargs is None:
238242
kwargs = dict()
239-
return ray.get([getattr(worker, method).remote(*args, **kwargs) for worker in self.workers])
243+
return ray.get([getattr(worker, method).remote(*args, **kwargs) for worker in self.workers], timeout=timeout)
240244

241245
def build_model(self):
242246
"""build model."""
@@ -293,9 +297,21 @@ def stop(self):
293297

294298
def release(self):
295299
"""release."""
296-
self.collective_rpc('release')
297-
for worker in self.workers:
298-
ray.kill(worker)
300+
if self.dp == 1:
301+
try:
302+
self.collective_rpc('release', timeout=5.0)
303+
logger.debug('RayExecutor workers released.')
304+
except ray.exceptions.GetTimeoutError:
305+
logger.info('Ray release timeout.')
306+
307+
try:
308+
self.collective_rpc('exit')
309+
logger.debug('RayExecutor workers exited.')
310+
except ray.exceptions.RayActorError as e:
311+
logger.debug(f'ray actor exit: {e}')
312+
else:
313+
[ray.kill(worker) for worker in self.workers]
314+
299315
ray.util.remove_placement_group(self.placement_group)
300316

301317
def _compile_dag(self):

lmdeploy/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) OpenMMLab. All rights reserved.
22
from typing import Tuple
33

4-
__version__ = '0.7.2.post1'
4+
__version__ = '0.7.3'
55
short_version = __version__
66

77

0 commit comments

Comments
 (0)