Skip to content

Commit

Permalink
fix torchtune internal CI after the quantize_ API refactor (#1184)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1184

att

Reviewed By: RdoubleA

Differential Revision: D59822075
  • Loading branch information
jerryzh168 authored and facebook-github-bot committed Jul 16, 2024
1 parent 85fa225 commit a4ec53e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torchtune/utils/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@

from torchtune.modules.low_precision._utils import (
_get_torchao_version,
_is_fbcode,
_nightly_version_ge,
)

ao_version, is_nightly = _get_torchao_version()
if is_nightly and _nightly_version_ge(ao_version, "2024-07-03"):
if _is_fbcode() or (is_nightly and _nightly_version_ge(ao_version, "2024-07-03")):
from torchao.quantization.quant_api import quantize_ as quantize
else:
from torchao.quantization.quant_api import quantize
Expand Down

0 comments on commit a4ec53e

Please sign in to comment.