Fix type error when dividing chunk size in colossalai strategy (#16212)

Co-authored-by: awaelchli <aedu.waelchli@gmail.com>
This commit is contained in:
HELSON 2023-01-04 03:07:29 +08:00 committed by GitHub
parent f9ae89f075
commit 64ab8837dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -143,6 +143,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Enhanced `reduce_boolean_decision` to accommodate `any`-analogous semantics expected by the `EarlyStopping` callback ([#15253](https://github.com/Lightning-AI/lightning/pull/15253))
- Fixed a type error when dividing the chunk size in the ColossalAI strategy ([#16212](https://github.com/Lightning-AI/lightning/pull/16212))
## [1.8.6] - 2022-12-21
- minor cleaning

View File

@ -300,7 +300,8 @@ class ColossalAIStrategy(DDPStrategy):
min_chunk_size_mb: float = self.chunk_size_search_kwargs.get(
"min_chunk_size", 32 * 1024**2
) # type: ignore[assignment]
min_chunk_size_mb /= 1024**2
if min_chunk_size_mb is not None:
min_chunk_size_mb /= 1024**2
model = _LightningModuleWrapperBase(self.model)
self.model = GeminiDDP(