deepdoctection 0.42.0__py3-none-any.whl → 0.43__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of deepdoctection might be problematic. Click here for more details.

Files changed (124) hide show
  1. deepdoctection/__init__.py +2 -1
  2. deepdoctection/analyzer/__init__.py +2 -1
  3. deepdoctection/analyzer/config.py +904 -0
  4. deepdoctection/analyzer/dd.py +36 -62
  5. deepdoctection/analyzer/factory.py +311 -141
  6. deepdoctection/configs/conf_dd_one.yaml +100 -44
  7. deepdoctection/configs/profiles.jsonl +32 -0
  8. deepdoctection/dataflow/__init__.py +9 -6
  9. deepdoctection/dataflow/base.py +33 -15
  10. deepdoctection/dataflow/common.py +96 -75
  11. deepdoctection/dataflow/custom.py +36 -29
  12. deepdoctection/dataflow/custom_serialize.py +135 -91
  13. deepdoctection/dataflow/parallel_map.py +33 -31
  14. deepdoctection/dataflow/serialize.py +15 -10
  15. deepdoctection/dataflow/stats.py +41 -28
  16. deepdoctection/datapoint/__init__.py +4 -6
  17. deepdoctection/datapoint/annotation.py +104 -66
  18. deepdoctection/datapoint/box.py +190 -130
  19. deepdoctection/datapoint/convert.py +66 -39
  20. deepdoctection/datapoint/image.py +151 -95
  21. deepdoctection/datapoint/view.py +383 -236
  22. deepdoctection/datasets/__init__.py +2 -6
  23. deepdoctection/datasets/adapter.py +11 -11
  24. deepdoctection/datasets/base.py +118 -81
  25. deepdoctection/datasets/dataflow_builder.py +18 -12
  26. deepdoctection/datasets/info.py +76 -57
  27. deepdoctection/datasets/instances/__init__.py +6 -2
  28. deepdoctection/datasets/instances/doclaynet.py +17 -14
  29. deepdoctection/datasets/instances/fintabnet.py +16 -22
  30. deepdoctection/datasets/instances/funsd.py +11 -6
  31. deepdoctection/datasets/instances/iiitar13k.py +9 -9
  32. deepdoctection/datasets/instances/layouttest.py +9 -9
  33. deepdoctection/datasets/instances/publaynet.py +9 -9
  34. deepdoctection/datasets/instances/pubtables1m.py +13 -13
  35. deepdoctection/datasets/instances/pubtabnet.py +13 -15
  36. deepdoctection/datasets/instances/rvlcdip.py +8 -8
  37. deepdoctection/datasets/instances/xfund.py +11 -9
  38. deepdoctection/datasets/registry.py +18 -11
  39. deepdoctection/datasets/save.py +12 -11
  40. deepdoctection/eval/__init__.py +3 -2
  41. deepdoctection/eval/accmetric.py +72 -52
  42. deepdoctection/eval/base.py +29 -10
  43. deepdoctection/eval/cocometric.py +14 -12
  44. deepdoctection/eval/eval.py +56 -41
  45. deepdoctection/eval/registry.py +6 -3
  46. deepdoctection/eval/tedsmetric.py +24 -9
  47. deepdoctection/eval/tp_eval_callback.py +13 -12
  48. deepdoctection/extern/__init__.py +1 -1
  49. deepdoctection/extern/base.py +176 -97
  50. deepdoctection/extern/d2detect.py +127 -92
  51. deepdoctection/extern/deskew.py +19 -10
  52. deepdoctection/extern/doctrocr.py +157 -106
  53. deepdoctection/extern/fastlang.py +25 -17
  54. deepdoctection/extern/hfdetr.py +137 -60
  55. deepdoctection/extern/hflayoutlm.py +329 -248
  56. deepdoctection/extern/hflm.py +67 -33
  57. deepdoctection/extern/model.py +108 -762
  58. deepdoctection/extern/pdftext.py +37 -12
  59. deepdoctection/extern/pt/nms.py +15 -1
  60. deepdoctection/extern/pt/ptutils.py +13 -9
  61. deepdoctection/extern/tessocr.py +87 -54
  62. deepdoctection/extern/texocr.py +29 -14
  63. deepdoctection/extern/tp/tfutils.py +36 -8
  64. deepdoctection/extern/tp/tpcompat.py +54 -16
  65. deepdoctection/extern/tp/tpfrcnn/config/config.py +20 -4
  66. deepdoctection/extern/tpdetect.py +4 -2
  67. deepdoctection/mapper/__init__.py +1 -1
  68. deepdoctection/mapper/cats.py +117 -76
  69. deepdoctection/mapper/cocostruct.py +35 -17
  70. deepdoctection/mapper/d2struct.py +56 -29
  71. deepdoctection/mapper/hfstruct.py +32 -19
  72. deepdoctection/mapper/laylmstruct.py +221 -185
  73. deepdoctection/mapper/maputils.py +71 -35
  74. deepdoctection/mapper/match.py +76 -62
  75. deepdoctection/mapper/misc.py +68 -44
  76. deepdoctection/mapper/pascalstruct.py +13 -12
  77. deepdoctection/mapper/prodigystruct.py +33 -19
  78. deepdoctection/mapper/pubstruct.py +42 -32
  79. deepdoctection/mapper/tpstruct.py +39 -19
  80. deepdoctection/mapper/xfundstruct.py +20 -13
  81. deepdoctection/pipe/__init__.py +1 -2
  82. deepdoctection/pipe/anngen.py +104 -62
  83. deepdoctection/pipe/base.py +226 -107
  84. deepdoctection/pipe/common.py +206 -123
  85. deepdoctection/pipe/concurrency.py +74 -47
  86. deepdoctection/pipe/doctectionpipe.py +108 -47
  87. deepdoctection/pipe/language.py +41 -24
  88. deepdoctection/pipe/layout.py +45 -18
  89. deepdoctection/pipe/lm.py +146 -78
  90. deepdoctection/pipe/order.py +196 -113
  91. deepdoctection/pipe/refine.py +111 -63
  92. deepdoctection/pipe/registry.py +1 -1
  93. deepdoctection/pipe/segment.py +213 -142
  94. deepdoctection/pipe/sub_layout.py +76 -46
  95. deepdoctection/pipe/text.py +52 -33
  96. deepdoctection/pipe/transform.py +8 -6
  97. deepdoctection/train/d2_frcnn_train.py +87 -69
  98. deepdoctection/train/hf_detr_train.py +72 -40
  99. deepdoctection/train/hf_layoutlm_train.py +85 -46
  100. deepdoctection/train/tp_frcnn_train.py +56 -28
  101. deepdoctection/utils/concurrency.py +59 -16
  102. deepdoctection/utils/context.py +40 -19
  103. deepdoctection/utils/develop.py +25 -17
  104. deepdoctection/utils/env_info.py +85 -36
  105. deepdoctection/utils/error.py +16 -10
  106. deepdoctection/utils/file_utils.py +246 -62
  107. deepdoctection/utils/fs.py +162 -43
  108. deepdoctection/utils/identifier.py +29 -16
  109. deepdoctection/utils/logger.py +49 -32
  110. deepdoctection/utils/metacfg.py +83 -21
  111. deepdoctection/utils/pdf_utils.py +119 -62
  112. deepdoctection/utils/settings.py +24 -10
  113. deepdoctection/utils/tqdm.py +10 -5
  114. deepdoctection/utils/transform.py +182 -46
  115. deepdoctection/utils/utils.py +61 -28
  116. deepdoctection/utils/viz.py +150 -104
  117. deepdoctection-0.43.dist-info/METADATA +376 -0
  118. deepdoctection-0.43.dist-info/RECORD +149 -0
  119. {deepdoctection-0.42.0.dist-info → deepdoctection-0.43.dist-info}/WHEEL +1 -1
  120. deepdoctection/analyzer/_config.py +0 -146
  121. deepdoctection-0.42.0.dist-info/METADATA +0 -431
  122. deepdoctection-0.42.0.dist-info/RECORD +0 -148
  123. {deepdoctection-0.42.0.dist-info → deepdoctection-0.43.dist-info}/licenses/LICENSE +0 -0
  124. {deepdoctection-0.42.0.dist-info → deepdoctection-0.43.dist-info}/top_level.txt +0 -0
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
 
18
18
  """
19
- Some useful contextmanagers for various tasks
19
+ Contextmanagers for various tasks
20
20
  """
21
21
 
22
22
  import subprocess
@@ -38,15 +38,26 @@ __all__ = ["timeout_manager", "save_tmp_file", "timed_operation"]
38
38
 
39
39
 
40
40
  @contextmanager
41
- def timeout_manager(proc, seconds: Optional[int] = None) -> Iterator[str]: # type: ignore
41
+ def timeout_manager(proc: Any, seconds: Optional[int] = None) -> Iterator[str]: # type: ignore
42
42
  """
43
- Manager for time handling while some process being called
43
+ Manager for time handling while some process is being called.
44
44
 
45
- with timeout_manager(some_process,60) as timeout:
46
- ...
45
+ Example:
46
+ ```python
47
+ with timeout_manager(some_process, 60) as timeout:
48
+ ...
49
+ ```
50
+
51
+ Args:
52
+ proc: Process.
53
+ seconds: Seconds to wait.
54
+
55
+ Yields:
56
+ str: Error string from the process.
57
+
58
+ Raises:
59
+ RuntimeError: If the process times out.
47
60
 
48
- :param proc: process
49
- :param seconds: seconds to wait
50
61
 
51
62
  """
52
63
  try:
@@ -74,13 +85,20 @@ def timeout_manager(proc, seconds: Optional[int] = None) -> Iterator[str]: # ty
74
85
  @contextmanager
75
86
  def save_tmp_file(image: Union[B64Str, PixelValues, B64], prefix: str) -> Iterator[tuple[str, str]]:
76
87
  """
77
- Save image temporarily and handle the clean-up once not necessary anymore
88
+ Save image temporarily and handle the clean-up once not necessary anymore.
78
89
 
79
- with save_tmp_file(some_np_image,"tmp") as (tmp_name, input_file_name):
80
- ....
90
+ Args:
91
+ image: Image as string or `np.array`.
92
+ prefix: Prefix of the temp file name.
81
93
 
82
- :param image: image as string or numpy array
83
- :param prefix: prefix of the temp file name
94
+ Yields:
95
+ Tuple containing the temporary file name and the input file name.
96
+
97
+ Example:
98
+ ```python
99
+ with save_tmp_file(some_np_image, "tmp") as (tmp_name, input_file_name):
100
+ ...
101
+ ```
84
102
  """
85
103
  try:
86
104
  with NamedTemporaryFile(prefix=prefix, delete=False) as file:
@@ -112,18 +130,21 @@ def save_tmp_file(image: Union[B64Str, PixelValues, B64], prefix: str) -> Iterat
112
130
  @contextmanager
113
131
  def timed_operation(message: str, log_start: bool = False) -> Generator[Any, None, None]:
114
132
  """
115
- Contextmanager with a timer.
116
-
117
- ... code-block:: python
133
+ Context manager with a timer.
118
134
 
135
+ Example:
136
+ ```python
119
137
  with timed_operation(message="Your stdout message", log_start=True):
120
-
121
138
  with open("log.txt", "a") as file:
122
- ...
139
+ ...
140
+ ```
123
141
 
142
+ Args:
143
+ message: A log to stdout.
144
+ log_start: Whether to print also the beginning.
124
145
 
125
- :param message: a log to stdout
126
- :param log_start: whether to print also the beginning
146
+ Yields:
147
+ None
127
148
  """
128
149
 
129
150
  if log_start:
@@ -40,12 +40,16 @@ _DEPRECATED_LOG_NUM = defaultdict(int) # type: ignore
40
40
 
41
41
  def log_deprecated(name: str, text: str, eos: str = "", max_num_warnings: Optional[int] = None) -> None:
42
42
  """
43
- Log deprecation warning.
43
+ Logs a deprecation warning.
44
44
 
45
- :param name: name of the deprecated item.
46
- :param text: information about the deprecation.
47
- :param eos: end of service date such as "YYYY-MM-DD".
48
- :param max_num_warnings: the maximum number of times to print this warning
45
+ Args:
46
+ name: Name of the deprecated item.
47
+ text: Information about the deprecation.
48
+ eos: End of service date such as "YYYY-MM-DD".
49
+ max_num_warnings: The maximum number of times to print this warning.
50
+
51
+ Note:
52
+ Either `name` or `text` must be provided.
49
53
  """
50
54
  assert name or text
51
55
  if eos:
@@ -71,18 +75,22 @@ def deprecated(
71
75
  text: str = "", eos: str = "", max_num_warnings: Optional[int] = None
72
76
  ) -> Callable[[Callable[..., T]], Callable[..., T]]:
73
77
  """
74
-
75
- :param text: same as `log_deprecated`.
76
- :param eos: same as `log_deprecated`.
77
- :param max_num_warnings: same as `log_deprecated`.
78
-
79
- :return: A decorator which deprecates the function.
80
-
81
- **Example:**
82
-
83
- @deprecated("Explanation of what to do instead.", "2017-11-4")
84
- def foo(...):
85
- pass
78
+ Decorator to deprecate a function.
79
+
80
+ Example:
81
+ ```python
82
+ @deprecated("Explanation of what to do instead.", "2017-11-4")
83
+ def foo(...):
84
+ pass
85
+ ```
86
+
87
+ Args:
88
+ text: Same as `log_deprecated`.
89
+ eos: Same as `log_deprecated`.
90
+ max_num_warnings: Same as `log_deprecated`.
91
+
92
+ Returns:
93
+ A decorator which deprecates the function.
86
94
  """
87
95
 
88
96
  def get_location() -> str:
@@ -16,41 +16,53 @@
16
16
  # limitations under the License.
17
17
 
18
18
  """
19
- Some useful function for collecting environment information.
19
+ Function for collecting environment information.
20
20
 
21
- This is also the place where we give an overview of the important environment variables.
21
+ This is also the place where we give an overview of some environment variables.
22
22
 
23
23
  For env variables with boolean character, use one of the following values:
24
24
 
25
+ ```python
25
26
  {"1", "True", "TRUE", "true", "yes"}
27
+ ```
26
28
 
27
- `USE_TENSORFLOW
29
+ ```python
30
+ USE_TENSORFLOW
28
31
  USE_PYTORCH
29
32
  USE_CUDA
30
- USE_MPS`
33
+ USE_MPS
34
+ ```
31
35
 
32
36
  are responsible for selecting the predictors based on the installed DL framework and available devices.
33
37
  It is not recommended to touch them.
34
38
 
35
- `USE_DD_PILLOW
36
- USE_DD_OPENCV`
39
+ ```python
40
+ USE_DD_PILLOW
41
+ USE_DD_OPENCV
42
+ ```
37
43
 
38
44
  decide what image processing library the `viz_handler` should use. The default library is PIL and OpenCV need
39
45
  to be installed separately. However, if both libraries have been detected `viz_handler` will opt for OpenCV.
40
46
  Use the variables to let choose `viz_handler` according to your preferences.
41
47
 
42
- `USE_DD_POPPLER
43
- USE_DD_PDFIUM`
48
+ ```python
49
+ USE_DD_POPPLER
50
+ USE_DD_PDFIUM
51
+ ```
44
52
 
45
53
  For PDF rendering we use PyPDFium2 as default but for legacy reasons, we also support Poppler. If you want to enforce
46
- Poppler set one to `USE_DD_POPPLER=True` and `USE_DD_PDFIUM=False` the other to False.
54
+ Poppler set one to `USE_DD_POPPLER=True` and `USE_DD_PDFIUM=False` the other to `False`.
47
55
 
48
- `HF_CREDENTIALS`
56
+ ```python
57
+ HF_CREDENTIALS
58
+ ```
49
59
 
50
60
  will be used by the `ModelDownloadManager` to pass your credentials if you have a model registered that resides in a
51
61
  private repo.
52
62
 
53
- `MODEL_CATALOG`
63
+ ```python
64
+ MODEL_CATALOG
65
+ ```
54
66
 
55
67
  can store an (absolute) path to a `.jsonl` file.
56
68
 
@@ -108,7 +120,12 @@ ENV_VARS_TRUE: set[str] = {"1", "True", "TRUE", "true", "yes"}
108
120
 
109
121
 
110
122
  def collect_torch_env() -> str:
111
- """Wrapper for torch.utils.collect_env.get_pretty_env_info"""
123
+ """
124
+ Wrapper for `torch.utils.collect_env.get_pretty_env_info`.
125
+
126
+ Returns:
127
+ The environment information as a string.
128
+ """
112
129
  try:
113
130
  import torch.__config__
114
131
 
@@ -121,10 +138,14 @@ def collect_torch_env() -> str:
121
138
 
122
139
 
123
140
  def collect_installed_dependencies(data: KeyValEnvInfos) -> KeyValEnvInfos:
124
- """Collect installed dependencies for all third party libraries.
141
+ """
142
+ Collect installed dependencies for all third party libraries.
143
+
144
+ Args:
145
+ data: A list of tuples to dump all collected package information such as the name and the version.
125
146
 
126
- :param data: A list of tuples to dump all collected package information such as the name and the version
127
- :return: A list of tuples containing the name of the library and the version (if available)
147
+ Returns:
148
+ A list of tuples containing the name of the library and the version (if available).
128
149
  """
129
150
 
130
151
  if tensorpack_available():
@@ -249,9 +270,12 @@ def detect_compute_compatibility(cuda_home: Optional[PathLikeOrStr], so_file: Op
249
270
  """
250
271
  Detect the compute compatibility of a CUDA library.
251
272
 
252
- :param cuda_home: The path to the CUDA installation
253
- :param so_file: The path to the shared object file
254
- :return: The compute compatibility of the CUDA library
273
+ Args:
274
+ cuda_home: The path to the CUDA installation.
275
+ so_file: The path to the shared object file.
276
+
277
+ Returns:
278
+ The compute compatibility of the CUDA library.
255
279
  """
256
280
  try:
257
281
  cuobjdump = os.path.join(cuda_home, "bin", "cuobjdump") # type: ignore
@@ -272,10 +296,14 @@ def detect_compute_compatibility(cuda_home: Optional[PathLikeOrStr], so_file: Op
272
296
 
273
297
  # Copied from https://github.com/tensorpack/tensorpack/blob/master/tensorpack/tfutils/collect_env.py
274
298
  def tf_info(data: KeyValEnvInfos) -> KeyValEnvInfos:
275
- """Returns a list of (key, value) pairs containing tensorflow information.
299
+ """
300
+ Returns a list of (key, value) pairs containing TensorFlow information.
301
+
302
+ Args:
303
+ data: A list of tuples to dump all collected package information such as the name and the version.
276
304
 
277
- :param data: A list of tuples to dump all collected package information such as the name and the version
278
- :return: A list of tuples containing all the collected information
305
+ Returns:
306
+ A list of tuples containing all the collected information.
279
307
  """
280
308
  if tf_available():
281
309
  import tensorflow as tf # type: ignore # pylint: disable=E0401
@@ -329,10 +357,14 @@ def tf_info(data: KeyValEnvInfos) -> KeyValEnvInfos:
329
357
 
330
358
  # Heavily inspired by https://github.com/facebookresearch/detectron2/blob/main/detectron2/utils/collect_env.py
331
359
  def pt_info(data: KeyValEnvInfos) -> KeyValEnvInfos:
332
- """Returns a list of (key, value) pairs containing Pytorch information.
360
+ """
361
+ Returns a list of (key, value) pairs containing PyTorch information.
333
362
 
334
- :param data: A list of tuples to dump all collected package information such as the name and the version
335
- :return: A list of tuples containing all the collected information
363
+ Args:
364
+ data: A list of tuples to dump all collected package information such as the name and the version.
365
+
366
+ Returns:
367
+ A list of tuples containing all the collected information.
336
368
  """
337
369
 
338
370
  if pytorch_available():
@@ -437,17 +469,19 @@ def pt_info(data: KeyValEnvInfos) -> KeyValEnvInfos:
437
469
 
438
470
 
439
471
  def set_dl_env_vars() -> None:
440
- """Set the environment variables that steer the selection of the DL framework.
441
- If both PyTorch and TensorFlow are available, PyTorch will be selected by default.
442
- It is possible that for testing purposes, e.g. on Colab you can find yourself with a pre-installed Tensorflow
443
- version. If you want to enforce PyTorch you must set:
444
-
445
- os.environ["DD_USE_TORCH"] = "1"
446
- os.environ["USE_TORCH"] = "1" # necessary if you make use of DocTr's OCR engine
447
- os.environ["DD_USE_TF"] = "0"
448
- os.environ["USE_TF"] = "0" # it's better to explcitly disable Tensorflow
472
+ """
473
+ Set the environment variables that steer the selection of the DL framework.
449
474
 
475
+ If both PyTorch and TensorFlow are available, PyTorch will be selected by default. For testing purposes, e.g. on
476
+ Colab, you may find yourself with a pre-installed TensorFlow version. If you want to enforce PyTorch, you must set:
450
477
 
478
+ Example:
479
+ ```python
480
+ os.environ["DD_USE_TORCH"] = "1"
481
+ os.environ["USE_TORCH"] = "1" # necessary if you make use of DocTr's OCR engine
482
+ os.environ["DD_USE_TF"] = "0"
483
+ os.environ["USE_TF"] = "0" # it's better to explicitly disable TensorFlow
484
+ ```
451
485
  """
452
486
 
453
487
  if os.environ.get("PYTORCH_AVAILABLE") and os.environ.get("DD_USE_TORCH") is None:
@@ -474,8 +508,10 @@ def set_dl_env_vars() -> None:
474
508
 
475
509
  def collect_env_info() -> str:
476
510
  """
511
+ Collects and returns environment information.
477
512
 
478
- :return:
513
+ Returns:
514
+ A string containing the collected environment information.
479
515
  """
480
516
  data = []
481
517
  data.append(("sys.platform", sys.platform)) # check-template.yml depends on it
@@ -531,7 +567,12 @@ def collect_env_info() -> str:
531
567
 
532
568
 
533
569
  def auto_select_viz_library() -> None:
534
- """Setting PIL as default image library if cv2 is not installed"""
570
+ """
571
+ Sets PIL as the default image library if OpenCV is not installed.
572
+
573
+ Note:
574
+ If environment variables are already set, this function will not change them.
575
+ """
535
576
 
536
577
  # if env variables are already set, don't change them
537
578
  if os.environ.get("USE_DD_PILLOW") or os.environ.get("USE_DD_OPENCV"):
@@ -545,7 +586,15 @@ def auto_select_viz_library() -> None:
545
586
 
546
587
 
547
588
  def auto_select_pdf_render_framework() -> None:
548
- """Setting pdf2image as default pdf rendering library if pdfium is not installed"""
589
+ """
590
+ Sets `pdf2image` as the default PDF rendering library if pdfium is not installed.
591
+
592
+ Note:
593
+ If environment variables are already set, this function will not change them.
594
+
595
+ Raises:
596
+ DependencyError: If no PDF rendering library is found. Please install Poppler or pdfium.
597
+ """
549
598
 
550
599
  # if env variables are already set, don't change them
551
600
  if os.environ.get("USE_DD_POPPLER") or os.environ.get("USE_DD_PDFIUM"):
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
 
18
18
  """
19
- Module for custom exceptions
19
+ Custom exceptions
20
20
  """
21
21
 
22
22
 
@@ -37,23 +37,27 @@ class UUIDError(BaseException):
37
37
 
38
38
 
39
39
  class DependencyError(BaseException):
40
- """Special exception only for missing dependencies. We do not use the internals ImportError or
41
- ModuleNotFoundError."""
40
+ """Special exception only for missing dependencies. We do not use the internals `ImportError` or
41
+ `ModuleNotFoundError`."""
42
42
 
43
43
 
44
44
  class DataFlowTerminatedError(BaseException):
45
45
  """
46
- An exception indicating that the DataFlow is unable to produce any more
47
- data, i.e. something wrong happened so that calling `__iter__`
48
- cannot give a valid iterator anymore.
49
- In most DataFlow this will never be raised.
46
+ An exception indicating that the `DataFlow` is unable to produce any more data.
47
+
48
+ This exception is raised when something wrong happens so that calling `__iter__` cannot give a valid iterator
49
+ anymore. In most `DataFlow` this will never be raised.
50
50
  """
51
51
 
52
52
 
53
53
  class DataFlowResetStateNotCalledError(BaseException):
54
54
  """
55
- An exception indicating that `reset_state()` has not been called before starting
56
- iteration.
55
+ An exception indicating that `reset_state()` has not been called before starting iteration.
56
+
57
+ Example:
58
+ ```python
59
+ raise DataFlowResetStateNotCalledError()
60
+ ```
57
61
  """
58
62
 
59
63
  def __init__(self) -> None:
@@ -62,7 +66,9 @@ class DataFlowResetStateNotCalledError(BaseException):
62
66
 
63
67
  class MalformedData(BaseException):
64
68
  """
65
- Exception class for malformed data. Use this class if something does not look right with the data
69
+ Exception class for malformed data.
70
+
71
+ Use this class if something does not look right with the data.
66
72
  """
67
73
 
68
74