dara-core 1.18.5__py3-none-any.whl → 1.18.6__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.
@@ -499,11 +499,14 @@ class TaskPool:
499
499
  while self.status not in (PoolStatus.ERROR, PoolStatus.STOPPED):
500
500
  await anyio.sleep(0.1)
501
501
 
502
- self._handle_excess_workers()
503
- self._handle_orphaned_workers()
504
- self._handle_dead_workers()
505
- self._create_workers()
506
- await self._process_next_worker_message()
502
+ try:
503
+ self._handle_excess_workers()
504
+ self._handle_orphaned_workers()
505
+ self._handle_dead_workers()
506
+ self._create_workers()
507
+ await self._process_next_worker_message()
508
+ except Exception as e:
509
+ dev_logger.error('Error in task pool', e)
507
510
  finally:
508
511
  self.loop_stopped.set()
509
512
 
@@ -27,6 +27,8 @@ from typing import Any, Callable, Optional, Tuple
27
27
  import anyio
28
28
  from tblib import Traceback
29
29
 
30
+ from dara.core.logging import dev_logger
31
+
30
32
 
31
33
  class SubprocessException:
32
34
  """
@@ -131,20 +133,23 @@ async def stop_process_async(process: BaseProcess, timeout: float = 3):
131
133
  # Terminate and wait for it to shutdown
132
134
  process.terminate()
133
135
 
134
- # mimic process.join() in an async way to not block
135
- await wait_while(process.is_alive, timeout)
136
-
137
- # If it's still alive
138
- if process.is_alive():
139
- try:
140
- os.kill(process.pid, signal.SIGKILL)
141
- await wait_while(process.is_alive, timeout)
142
- except OSError as e:
143
- raise RuntimeError(f'Unable to terminate subprocess with PID {process.pid}') from e
144
-
145
- # If it's still alive raise an exception
146
- if process.is_alive():
147
- raise RuntimeError(f'Unable to terminate subprocess with PID {process.pid}')
136
+ try:
137
+ # mimic process.join() in an async way to not block
138
+ await wait_while(process.is_alive, timeout)
139
+
140
+ # If it's still alive
141
+ if process.is_alive():
142
+ try:
143
+ os.kill(process.pid, signal.SIGKILL)
144
+ await wait_while(process.is_alive, timeout)
145
+ except OSError as e:
146
+ raise RuntimeError(f'Unable to terminate subprocess with PID {process.pid}') from e
147
+
148
+ # If it's still alive raise an exception
149
+ if process.is_alive():
150
+ raise RuntimeError(f'Unable to terminate subprocess with PID {process.pid}')
151
+ except Exception as e:
152
+ dev_logger.error('Error stopping process', e)
148
153
 
149
154
 
150
155
  def stop_process(process: BaseProcess, timeout: float = 3):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.18.5
3
+ Version: 1.18.6
4
4
  Summary: Dara Framework Core
5
5
  Home-page: https://dara.causalens.com/
6
6
  License: Apache-2.0
@@ -21,10 +21,10 @@ Requires-Dist: cachetools (>=5.0.0,<6.0.0)
21
21
  Requires-Dist: certifi (>=2024.7.4)
22
22
  Requires-Dist: click (==8.1.3)
23
23
  Requires-Dist: colorama (>=0.4.6,<0.5.0)
24
- Requires-Dist: create-dara-app (==1.18.5)
24
+ Requires-Dist: create-dara-app (==1.18.6)
25
25
  Requires-Dist: croniter (>=1.0.15,<3.0.0)
26
26
  Requires-Dist: cryptography (>=42.0.4)
27
- Requires-Dist: dara-components (==1.18.5) ; extra == "all"
27
+ Requires-Dist: dara-components (==1.18.6) ; extra == "all"
28
28
  Requires-Dist: exceptiongroup (>=1.1.3,<2.0.0)
29
29
  Requires-Dist: fastapi (>=0.115.0,<0.116.0)
30
30
  Requires-Dist: fastapi_vite_dara (==0.4.0)
@@ -55,7 +55,7 @@ Description-Content-Type: text/markdown
55
55
 
56
56
  # Dara Application Framework
57
57
 
58
- <img src="https://github.com/causalens/dara/blob/v1.18.5/img/dara_light.svg?raw=true">
58
+ <img src="https://github.com/causalens/dara/blob/v1.18.6/img/dara_light.svg?raw=true">
59
59
 
60
60
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
61
61
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -100,7 +100,7 @@ source .venv/bin/activate
100
100
  dara start
101
101
  ```
102
102
 
103
- ![Dara App](https://github.com/causalens/dara/blob/v1.18.5/img/components_gallery.png?raw=true)
103
+ ![Dara App](https://github.com/causalens/dara/blob/v1.18.6/img/components_gallery.png?raw=true)
104
104
 
105
105
  Note: `pip` installation uses [PEP 660](https://peps.python.org/pep-0660/) `pyproject.toml`-based editable installs which require `pip >= 21.3` and `setuptools >= 64.0.0`. You can upgrade both with:
106
106
 
@@ -117,9 +117,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
117
117
 
118
118
  | Dara App | Description |
119
119
  | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
120
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.18.5/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
121
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.18.5/img/plot_interactivity.png?raw=true) | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
122
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.18.5/img/graph_viewer.png?raw=true) | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
120
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.18.6/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
121
+ | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.18.6/img/plot_interactivity.png?raw=true) | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
122
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.18.6/img/graph_viewer.png?raw=true) | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
123
123
 
124
124
  Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
125
125
 
@@ -146,9 +146,9 @@ And the supporting UI packages and tools.
146
146
  - `ui-utils` - miscellaneous utility functions
147
147
  - `ui-widgets` - widget components
148
148
 
149
- More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.18.5/CONTRIBUTING.md) file.
149
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.18.6/CONTRIBUTING.md) file.
150
150
 
151
151
  ## License
152
152
 
153
- Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.18.5/LICENSE).
153
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.18.6/LICENSE).
154
154
 
@@ -49,8 +49,8 @@ dara/core/internal/pandas_utils.py,sha256=SQ6IzsphfSUYheOJSA-zzITRO8zVwVcjfQvsfx
49
49
  dara/core/internal/pool/__init__.py,sha256=pBbXE5GR3abVC9Lg3i0QxfdmsrBDMJUYAYb0SiAEBkk,657
50
50
  dara/core/internal/pool/channel.py,sha256=TbyIE-PnfzzsQYhl3INOs5UIHHbF_h9bMFne5FjbWlQ,4948
51
51
  dara/core/internal/pool/definitions.py,sha256=ICw_Krf-ziVGkzKl4qvvIgKC0Z06bvUehELH5-VMjV0,4645
52
- dara/core/internal/pool/task_pool.py,sha256=Ea1Mlg7f7eiIqCeL3QRzDAxfnyuQtxsb9zQ9fMYOr6g,17632
53
- dara/core/internal/pool/utils.py,sha256=0JfmL71lmebDFf-g19rYFf3NY6DyshNNnnj-B-qts-Y,5231
52
+ dara/core/internal/pool/task_pool.py,sha256=00idkLWSRfRnWcQxkMj2Jin60Z21aOvywV2mEEsWh68,17774
53
+ dara/core/internal/pool/utils.py,sha256=HoNlHy2V0VmX5Xm2cqsFbPIOV74E2MslzTFgyNRmiB0,5411
54
54
  dara/core/internal/pool/worker.py,sha256=eBi3FS652goZxu9chaRT89eHDvqJW0aHjt8I5UgyESA,6808
55
55
  dara/core/internal/port_utils.py,sha256=3NN94CubNrIYQKmPM4SEwstY-UMqsbbe1M_JhyPcncA,1654
56
56
  dara/core/internal/registries.py,sha256=9D9pltnh-0UTuTr0nVccqGamPJtMt8bmGuOCa12-58Y,3591
@@ -107,8 +107,8 @@ dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmF
107
107
  dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
108
108
  dara/core/visual/themes/definitions.py,sha256=nS_gQvOzCt5hTmj74d0_siq_9QWuj6wNuir4VCHy0Dk,2779
109
109
  dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
110
- dara_core-1.18.5.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
111
- dara_core-1.18.5.dist-info/METADATA,sha256=hYJisB0mpSc8k1MS-3YWlFhHI9q-_8ibN3W0rMmwmdg,7540
112
- dara_core-1.18.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
113
- dara_core-1.18.5.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
114
- dara_core-1.18.5.dist-info/RECORD,,
110
+ dara_core-1.18.6.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
111
+ dara_core-1.18.6.dist-info/METADATA,sha256=btzW9zTzf9NThF2WPnMn7siPs1jhz4tTYZpvoHZy1dM,7540
112
+ dara_core-1.18.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
113
+ dara_core-1.18.6.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
114
+ dara_core-1.18.6.dist-info/RECORD,,