Coverage for  / home / jenkins / .local / lib / python3.10 / site-packages / hyper_parallel / trainer / callbacks / __init__.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-10-25 05:45 +0800

1# Copyright 2025-2026 Bytedance Ltd. and/or its affiliates 

2# Copyright 2026 Huawei Technologies Co., Ltd 

3# 

4# Licensed under the Apache License, Version 2.0 (the "License"); 

5# you may not use this file except in compliance with the License. 

6# You may obtain a copy of the License at 

7# 

8# http://www.apache.org/licenses/LICENSE-2.0 

9# 

10# Unless required by applicable law or agreed to in writing, software 

11# distributed under the License is distributed on an "AS IS" BASIS, 

12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

13# See the License for the specific language governing permissions and 

14# limitations under the License. 

15# ============================================================================ 

16""" 

17Trainer Callbacks module. 

18 

19Provides callback system for customizing trainer behavior at various stages of training. 

20 

21Moved from ``auto_models/trainer/callbacks`` in stage 7 (05 §15.11 step 2); 

22``TrainerState`` is defined in ``hyper_parallel.trainer.state`` and 

23re-exported here. The temporary ``TempLogCallback`` alias was dropped — 

24``TqdmCallback`` is the logging callback it pointed at. 

25""" 

26 

27from hyper_parallel.trainer.state import TrainerState 

28from .base import Callback 

29from .environ_meter_callback import EnvironMeterCallback 

30from .evaluate_callback import EvaluateCallback 

31from .garbage_collection_callback import GarbageCollectionCallback 

32from .logging_callback import LoggingCallback 

33from .checkpoint_callback import CheckpointerCallback 

34from .profiler_callback import ProfilerCallback 

35from .tqdm_callback import TqdmCallback 

36 

37 

38__all__ = [ 

39 "Callback", 

40 "EnvironMeterCallback", 

41 "EvaluateCallback", 

42 "GarbageCollectionCallback", 

43 "LoggingCallback", 

44 "CheckpointerCallback", 

45 "ProfilerCallback", 

46 "TqdmCallback", 

47 "TrainerState", 

48]