• David El Malih's avatar
    Improve docstrings and type hints in scheduling_amused.py (#12623) · 44c31016
    David El Malih authored
    * Improve docstrings and type hints in scheduling_amused.py
    
    - Add complete type hints for helper functions (gumbel_noise, mask_by_random_topk)
    - Enhance AmusedSchedulerOutput with proper Optional typing
    - Add comprehensive docstrings for AmusedScheduler class
    - Improve __init__, set_timesteps, step, and add_noise methods
    - Fix type hints to match documentation conventions
    - All changes follow project standards from issue #9567
    
    * Enhance type hints and docstrings in scheduling_amused.py
    
    - Update type hints for `prev_sample` and `pred_original_sample` in `AmusedSchedulerOutput` to reflect their tensor types.
    - Improve docstring for `gumbel_noise` to specify the output tensor's dtype and device.
    - Refine `AmusedScheduler` class documentation, including detailed descriptions of the masking schedule and temperature parameters.
    - Adjust type hints in `set_timesteps` and `step` methods for better clarity and consistency.
    
    * Apply review feedback on scheduling_amused.py
    
    - Replace generic [Amused] reference with specific [`AmusedPipeline`] reference for consistency with project documentation conventions
    44c31016
scheduling_amused.py 12.1 KB