sktime/sktime

[BUG] Multiple Mutable Defaults in vendored LagLlama Code

Aberta

#10.728 aberto em 2 de ago. de 2026

 (1 comentário) (0 reação) (0 responsável)Python (1.192 forks)batch import
buggood first issue

Métricas do repositório

Stars
 (7.162 estrelas)
Métricas de merge de PR
 (Mesclagem média 26d 10h) (86 fundiu PRs em 30d)

Description

See the following ruff output:


B006 Do not use mutable data structures for argument defaults
   --> sktime/libs/lag_llama/data/augmentations/augmentations.py:447:52
    |
445 |     """
446 |
447 |     def __init__(self, p, window_ratio=0.1, scales=[0.5, 2.0]):
    |                                                    ^^^^^^^^^^
448 |         super().__init__()
449 |         # 'p' is the probability of applying the window warp to the input data.
    |
help: Replace with `None`; initialize within function

B006 Do not use mutable data structures for argument defaults
   --> sktime/libs/lag_llama/gluon/estimator.py:187:36
    |
185 |         window_warp_prob: float = 0.0,
186 |         window_warp_window_ratio: float = 0.1,
187 |         window_warp_scales: list = [0.5, 2.0],
    |                                    ^^^^^^^^^^
188 |         # Continuning model arguments
189 |         distr_output: str = "studentT",
    |
help: Replace with `None`; initialize within function

B006 Do not use mutable data structures for argument defaults
   --> sktime/libs/lag_llama/gluon/estimator.py:199:26
    |
197 |         time_feat: bool = False,
198 |         dropout: float = 0.0,
199 |         lags_seq: list = ["Q", "M", "W", "D", "H", "T", "S"],
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200 |         data_id_to_name_map: dict = {},
201 |         use_cosine_annealing_lr: bool = False,
    |
help: Replace with `None`; initialize within function

B006 Do not use mutable data structures for argument defaults
   --> sktime/libs/lag_llama/gluon/estimator.py:200:37
    |
198 |         dropout: float = 0.0,
199 |         lags_seq: list = ["Q", "M", "W", "D", "H", "T", "S"],
200 |         data_id_to_name_map: dict = {},
    |                                     ^^
201 |         use_cosine_annealing_lr: bool = False,
202 |         cosine_annealing_lr_args: dict = {},
    |
help: Replace with `None`; initialize within function

B006 Do not use mutable data structures for argument defaults
   --> sktime/libs/lag_llama/gluon/estimator.py:202:42
    |
200 |         data_id_to_name_map: dict = {},
201 |         use_cosine_annealing_lr: bool = False,
202 |         cosine_annealing_lr_args: dict = {},
    |                                          ^^
203 |         track_loss_per_series: bool = False,
204 |         ckpt_path: str | None = None,
    |
help: Replace with `None`; initialize within function

B006 Do not use mutable data structures for argument defaults
   --> sktime/libs/lag_llama/gluon/lightning_module.py:113:36
    |
111 |         window_warp_prob: float = 0.0,
112 |         window_warp_window_ratio: float = 0.1,
113 |         window_warp_scales: list = [0.5, 2.0],
    |                                    ^^^^^^^^^^
114 |         data_id_to_name_map: dict = {},
115 |         use_cosine_annealing_lr: bool = False,
    |
help: Replace with `None`; initialize within function

B006 Do not use mutable data structures for argument defaults
   --> sktime/libs/lag_llama/gluon/lightning_module.py:114:37
    |
112 |         window_warp_window_ratio: float = 0.1,
113 |         window_warp_scales: list = [0.5, 2.0],
114 |         data_id_to_name_map: dict = {},
    |                                     ^^
115 |         use_cosine_annealing_lr: bool = False,
116 |         cosine_annealing_lr_args: dict = {},
    |
help: Replace with `None`; initialize within function

B006 Do not use mutable data structures for argument defaults
   --> sktime/libs/lag_llama/gluon/lightning_module.py:116:42
    |
114 |         data_id_to_name_map: dict = {},
115 |         use_cosine_annealing_lr: bool = False,
116 |         cosine_annealing_lr_args: dict = {},
    |                                          ^^
117 |         track_loss_per_series: bool = False,
118 |         nonnegative_pred_samples: bool = False,
    |
help: Replace with `None`; initialize within function

Guia do colaborador