Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

#643 PPYolo-E

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-344-PP-Yolo-E-Training-Replicate-Recipe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  1. import atexit
  2. from super_gradients.common.environment.env_variables import env_variables
  3. from super_gradients.common.crash_handler.exception import ExceptionInfo
  4. from super_gradients.common.abstractions.abstract_logger import get_logger
  5. logger = get_logger(__name__)
  6. def crash_tip_handler():
  7. """Display a crash tip if an error was raised"""
  8. crash_tip_message = ExceptionInfo.get_crash_tip_message()
  9. if crash_tip_message:
  10. print(crash_tip_message)
  11. def setup_crash_tips() -> bool:
  12. if env_variables.CRASH_HANDLER != "FALSE":
  13. logger.info("Crash tips is enabled. You can set your environment variable to CRASH_HANDLER=FALSE to disable it")
  14. atexit.register(crash_tip_handler)
  15. return True
  16. else:
  17. logger.info("Crash tips is disabled. You can set your environment variable to CRASH_HANDLER=TRUE to enable it")
  18. return False
Discard
Tip!

Press p or to see the previous file or, n or to see the next file