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

#869 Add DagsHub Logger to Super Gradients

Merged
Ghost merged 1 commits into Deci-AI:master from timho102003:dagshub_logger
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  1. import os
  2. class EnvironmentVariables:
  3. """Class to dynamically get any environment variables."""
  4. # Infra
  5. @property
  6. def DECI_PLATFORM_TOKEN(self) -> str:
  7. return os.getenv("DECI_PLATFORM_TOKEN")
  8. @property
  9. def WANDB_BASE_URL(self) -> str:
  10. return os.getenv("WANDB_BASE_URL")
  11. @property
  12. def AWS_PROFILE(self) -> str:
  13. return os.getenv("AWS_PROFILE")
  14. # DDP
  15. @property
  16. def LOCAL_RANK(self) -> int:
  17. return int(os.getenv("LOCAL_RANK", -1))
  18. # Turn ON/OFF features
  19. @property
  20. def CRASH_HANDLER(self) -> str:
  21. return os.getenv("CRASH_HANDLER", "TRUE")
  22. @property
  23. def UPLOAD_LOGS(self) -> bool:
  24. return os.getenv("UPLOAD_LOGS", "TRUE") == "TRUE"
  25. @property
  26. def DECI_API_HOST(self) -> str:
  27. return os.getenv("DECI_API_HOST", default="api.deci.ai")
  28. @property
  29. def FILE_LOG_LEVEL(self) -> str:
  30. return os.getenv("FILE_LOG_LEVEL", default="DEBUG").upper()
  31. @property
  32. def CONSOLE_LOG_LEVEL(self) -> str:
  33. return os.getenv("CONSOLE_LOG_LEVEL", default="INFO").upper()
  34. env_variables = EnvironmentVariables()
Discard
Tip!

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