# compat: 过去版本的 fabric 模块被重命名到 common (v0.15.0)
# 这个模块提供向后兼容，避免旧代码直接报错

from zyplib.train.common import (
    default_fabric,
    # callbacks
    FabricCallbackProtocol,
    FabricLogMetrics,
    ParseCSVLogfile,
    PrintTrainInfo,
    SaveCheckpoints,
    SaveHparams,
    SaveLoggersFinally,
    find_callback,
    # procedure
    FabricTrainingContext,
    train_epoch,
    train_loop,
    training_step,
    val_epoch,
    validation_step,
    # trainer
    BasicFabricTrainer,
)

__all__ = [
    'default_fabric',
    # callbacks
    'FabricCallbackProtocol',
    'FabricLogMetrics',
    'ParseCSVLogfile',
    'PrintTrainInfo',
    'SaveCheckpoints',
    'SaveHparams',
    'SaveLoggersFinally',
    'find_callback',
    # procedure
    'FabricTrainingContext',
    'train_epoch',
    'train_loop',
    'training_step',
    'val_epoch',
    'validation_step',
    # trainer
    'BasicFabricTrainer',
]
