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

#428 Feature/sg 371 move sync bn to training params

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-371_move_sync_bn_to_training_params
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
  1. import unittest
  2. from omegaconf import OmegaConf
  3. from super_gradients.common.environment.env_helpers import register_hydra_resolvers
  4. class HydraResolversTest(unittest.TestCase):
  5. def setUp(self) -> None:
  6. register_hydra_resolvers()
  7. def test_add(self):
  8. conf = OmegaConf.create({
  9. "a": 1,
  10. "b": 2,
  11. "c": 3,
  12. "a_plus_b": "${add: ${a},${b}}",
  13. "a_plus_b_plus_c": "${add: ${a}, ${b}, ${c}}"
  14. })
  15. assert conf["a_plus_b"] == 3
  16. assert conf["a_plus_b_plus_c"] == 6
  17. def test_cond(self):
  18. conf = OmegaConf.create({
  19. "boolean": True,
  20. "a": "red_pill",
  21. "b": "blue_pill",
  22. "result": "${cond:${boolean}, ${a}, ${b}}",
  23. })
  24. assert conf["result"] == "red_pill"
  25. conf["boolean"] = False
  26. assert conf["result"] == "blue_pill"
Discard
Tip!

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