__init__.py 994 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # !/usr/bin/env python3
  2. # -*- coding: UTF-8 -*-
  3. ################################################################################
  4. #
  5. # Copyright (c) 2024 Baidu.com, Inc. All Rights Reserved
  6. #
  7. ################################################################################
  8. """
  9. Author: PaddlePaddle Authors
  10. """
  11. import os
  12. from . import version
  13. from .modules import build_dataset_checker, build_trainer, build_evaluater, build_predictor
  14. from .modules import create_model, PaddleInferenceOption
  15. from .pipelines import *
  16. def _initialize():
  17. from .utils.logging import setup_logging
  18. from .utils import flags
  19. from . import repo_manager
  20. from . import repo_apis
  21. __DIR__ = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
  22. repo_manager.set_parent_dirs(
  23. os.path.join(__DIR__, 'repo_manager', 'repos'), repo_apis)
  24. setup_logging()
  25. if flags.EAGER_INITIALIZATION:
  26. repo_manager.initialize()
  27. _initialize()
  28. __version__ = version.get_pdx_version()