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

#609 Ci fix

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

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