Skip to content

Commit

Permalink
Decouple firmware, synapse version return strings (#137)
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome <janand@habana.ai>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
  • Loading branch information
jerome-habana and Borda committed Jan 24, 2024
1 parent 30e4b8f commit be069f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Decoupled return strings of firmware, synapse version helper ([#137](https://github.com/Lightning-AI/lightning-Habana/pull/137))
- Changed HPU docker image based on Synapse AI release 1.14.0 ([#140](https://github.com/Lightning-AI/lightning-Habana/pull/140))
-

### Fixed

Expand Down
4 changes: 3 additions & 1 deletion src/lightning_habana/utils/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ def _parse_hpu_synapse_versions(line: str) -> Tuple[str, str]:
('', '')
"""
hl = fw = ""

try:
# Item "None" of "Optional[Match[str]]" has no attribute "group"
hl = re.search(r"hl-([\d\.]+)", line).group(1) # type: ignore[union-attr]
fw = re.search(r"fw-([\d\.]+)", line).group(1) # type: ignore[union-attr]
except AttributeError:
rank_zero_warn("Provided string does not include Habana version; check if HPU is available with `hl-smi`.")
return "", ""

return hl, fw


Expand Down

0 comments on commit be069f8

Please sign in to comment.