learning-loop-node 0.10.7__py3-none-any.whl → 0.10.8__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 learning-loop-node might be problematic. Click here for more details.

@@ -11,7 +11,7 @@ from io import BufferedReader, TextIOWrapper
11
11
  from multiprocessing import Event
12
12
  from multiprocessing.synchronize import Event as SyncEvent
13
13
  from threading import Thread
14
- from typing import List, Optional
14
+ from typing import List, Optional, Tuple, Union
15
15
 
16
16
  import requests
17
17
  from fastapi.encoders import jsonable_encoder
@@ -108,7 +108,7 @@ class Outbox():
108
108
  self.log.info('No images found to upload')
109
109
 
110
110
  def _upload_batch(self, items: List[str]):
111
- data: List[tuple[str, TextIOWrapper | BufferedReader]] = []
111
+ data: List[Tuple[str, Union[TextIOWrapper, BufferedReader]]] = []
112
112
  data = [('files', open(f'{item}/image.json', 'r')) for item in items]
113
113
  data += [('files', open(f'{item}/image.jpg', 'rb')) for item in items]
114
114
 
@@ -166,7 +166,7 @@ class Outbox():
166
166
  self.log.debug('Outbox: Current mode is %s', current_mode)
167
167
  return current_mode
168
168
 
169
- def set_mode(self, mode: OutboxMode | str):
169
+ def set_mode(self, mode: Union[OutboxMode, str]) -> None:
170
170
  ''':param mode: 'continuous_upload' or 'stopped'
171
171
  :raises ValueError: if mode is not a valid OutboxMode
172
172
  :raises TimeoutError: if the upload thread does not terminate within 31 seconds with mode='stopped'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: learning-loop-node
3
- Version: 0.10.7
3
+ Version: 0.10.8
4
4
  Summary: Python Library for Nodes which connect to the Zauberzeug Learning Loop
5
5
  Home-page: https://github.com/zauberzeug/learning_loop_node
6
6
  License: MIT
@@ -20,7 +20,7 @@ learning_loop_node/detector/inbox_filter/relevance_filter.py,sha256=s2FuwZ-tD_5o
20
20
  learning_loop_node/detector/inbox_filter/tests/test_observation.py,sha256=ORN08yjprqmgmtU25RsVysniyrWX-qGvqFN8ZkkYxow,1385
21
21
  learning_loop_node/detector/inbox_filter/tests/test_relevance_group.py,sha256=RUgsk1CnKSOCRZBzNjE7AZTqk06-yelgUqvHFRLH7_I,7865
22
22
  learning_loop_node/detector/inbox_filter/tests/test_unexpected_observations_count.py,sha256=y_dFUV21h6uZc90Q43s0u4oivJfuCNWlk5iXAWiXGgc,1804
23
- learning_loop_node/detector/outbox.py,sha256=o0Tq_iZg8dLIL-1o1tzNNDZks9Sovx4lBQKJvTnN09M,6884
23
+ learning_loop_node/detector/outbox.py,sha256=xxshif8SRpkyjKrc1dVNW3QUg-DROtXG2NB8i50A5ho,6918
24
24
  learning_loop_node/detector/rest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  learning_loop_node/detector/rest/about.py,sha256=-PNqlQI_tzRvoSI_UR9rX8-5GeiENNpRDQ4Ylw3wYVs,607
26
26
  learning_loop_node/detector/rest/backdoor_controls.py,sha256=38axRG66Z3_Q6bYKa7Hw-ldChEAu-dJcBM_Sl_17Ozo,1725
@@ -82,6 +82,6 @@ learning_loop_node/trainer/tests/testing_trainer_logic.py,sha256=eKvCRznWNzHctBE
82
82
  learning_loop_node/trainer/trainer_logic.py,sha256=PJxiO1chPdvpq8UTtzv_nVam9CouCswX9b1FnRwT2Tw,8411
83
83
  learning_loop_node/trainer/trainer_logic_generic.py,sha256=AzllMMiUPP_CMkjIVqse8wY50Cg5RDnk5y5ERVUjtZg,25801
84
84
  learning_loop_node/trainer/trainer_node.py,sha256=bcyOMeLXrLuLgsPqS8lwEOSZ6vCjGLgT0pLXgaylI1Q,4155
85
- learning_loop_node-0.10.7.dist-info/METADATA,sha256=87Mgc03RgU_2S_OQvjaSt06MAjqcgsR1s3vXYu_bzJ8,10383
86
- learning_loop_node-0.10.7.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
87
- learning_loop_node-0.10.7.dist-info/RECORD,,
85
+ learning_loop_node-0.10.8.dist-info/METADATA,sha256=TAvIF5I8xB6G4_bXVZs0BOoeyYdUDuMbm-WjUg1G1tw,10383
86
+ learning_loop_node-0.10.8.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
87
+ learning_loop_node-0.10.8.dist-info/RECORD,,