pytorch/torch/ao/pruning
Rohit Singh Rathaur fa560e1158 [ao][pruning] Replace assert statements with AssertionError exceptions (#164926)
Replace assert statement with explicit ValueError exception to ensure the validation check is not removed when Python runs with optimization flag (-O).

This is a draft PR to confirm the process.

Fixes partially #164878.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164926
Approved by: https://github.com/fffrog, https://github.com/albanD

Co-authored-by: Jiawei Li <ljw1101.vip@gmail.com>
2025-10-29 17:46:46 +00:00
..
_experimental [ao][pruning] Replace assert statements with AssertionError exceptions (#164926) 2025-10-29 17:46:46 +00:00
scheduler Fix flake8 B028 warnings (#166224) 2025-10-26 06:18:55 +00:00
sparsifier [ao][pruning] Replace assert statements with AssertionError exceptions (#164926) 2025-10-29 17:46:46 +00:00
__init__.py
_mappings.py