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

#381 Feature/sg 000 connect to lab

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/sg-000_connect_to_lab
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
  1. class IllegalDatasetParameterException(Exception):
  2. """
  3. Exception raised illegal dataset param.
  4. Attributes:
  5. message -- explanation of the error
  6. """
  7. def __init__(self, desc):
  8. self.message = "Unsupported dataset parameter format: " + desc
  9. super().__init__(self.message)
  10. class EmptyDatasetException(Exception):
  11. """
  12. Exception raised when a dataset does not have any image for a specific config
  13. Attributes:
  14. message -- explanation of the error
  15. """
  16. def __init__(self, desc):
  17. self.message = "Empty Dataset: " + desc
  18. super().__init__(self.message)
  19. class UnsupportedBatchItemsFormat(ValueError):
  20. """Exception raised illegal batch items returned from data loader.
  21. Attributes:
  22. message -- explanation of the error
  23. """
  24. def __init__(self):
  25. self.message = "Batch items returned by the data loader expected format: \n" \
  26. "1. torch.Tensor or tuple, s.t inputs = batch_items[0], targets = batch_items[1] and len(" \
  27. "batch_items) = 2 \n" \
  28. "2. tuple: (inputs, targets, additional_batch_items)"
  29. super().__init__(self.message)
Discard
Tip!

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