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

#578 Feature/sg 516 support head replacement for local pretrained weights unknown dataset

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-516_support_head_replacement_for_local_pretrained_weights_unknown_dataset
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 os
  2. import atexit
  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 os.getenv("CRASH_HANDLER", "TRUE") != "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