isolate 0.16.1__py3-none-any.whl → 0.16.3__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 isolate might be problematic. Click here for more details.

@@ -1,8 +1,13 @@
1
- # file generated by setuptools_scm
1
+ # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
3
6
  TYPE_CHECKING = False
4
7
  if TYPE_CHECKING:
5
- from typing import Tuple, Union
8
+ from typing import Tuple
9
+ from typing import Union
10
+
6
11
  VERSION_TUPLE = Tuple[Union[int, str], ...]
7
12
  else:
8
13
  VERSION_TUPLE = object
@@ -12,5 +17,5 @@ __version__: str
12
17
  __version_tuple__: VERSION_TUPLE
13
18
  version_tuple: VERSION_TUPLE
14
19
 
15
- __version__ = version = '0.16.1'
16
- __version_tuple__ = version_tuple = (0, 16, 1)
20
+ __version__ = version = '0.16.3'
21
+ __version_tuple__ = version_tuple = (0, 16, 3)
@@ -6,6 +6,7 @@ import os
6
6
  import runpy
7
7
  import site
8
8
  import sys
9
+ import traceback
9
10
 
10
11
 
11
12
  def load_pth_files() -> None:
@@ -28,7 +29,13 @@ def load_pth_files() -> None:
28
29
  # will need to be fixed once we are dealing with more than 2 nodes and editable
29
30
  # packages.
30
31
  for site_dir in python_path.split(os.pathsep):
31
- site.addsitedir(site_dir)
32
+ try:
33
+ site.addsitedir(site_dir)
34
+ except Exception:
35
+ # NOTE: there could be .pth files that are model weights and not
36
+ # python path configuration files.
37
+ traceback.print_exc()
38
+ print(f"Error adding site directory {site_dir}, skipping...")
32
39
 
33
40
 
34
41
  def main():
isolate/server/server.py CHANGED
@@ -56,7 +56,6 @@ else:
56
56
  # Number of seconds to observe the queue before checking the termination
57
57
  # event.
58
58
  _Q_WAIT_DELAY = 0.1
59
- RUNNER_THREAD_POOL = futures.ThreadPoolExecutor(max_workers=MAX_THREADS)
60
59
 
61
60
 
62
61
  class GRPCException(Exception):
@@ -199,6 +198,10 @@ class IsolateServicer(definitions.IsolateServicer):
199
198
  default_settings: IsolateSettings = field(default_factory=IsolateSettings)
200
199
  background_tasks: dict[str, RunTask] = field(default_factory=dict)
201
200
 
201
+ _thread_pool: futures.ThreadPoolExecutor = field(
202
+ default_factory=lambda: futures.ThreadPoolExecutor(max_workers=MAX_THREADS)
203
+ )
204
+
202
205
  def _run_task(self, task: RunTask) -> Iterator[definitions.PartialRunResult]:
203
206
  messages: Queue[definitions.PartialRunResult] = Queue()
204
207
  environments = []
@@ -332,7 +335,7 @@ class IsolateServicer(definitions.IsolateServicer):
332
335
  task = RunTask(request=request.function)
333
336
  self.set_metadata(task, request.metadata)
334
337
 
335
- task.future = RUNNER_THREAD_POOL.submit(self._run_task_in_background, task)
338
+ task.future = self._thread_pool.submit(self._run_task_in_background, task)
336
339
  task_id = str(uuid.uuid4())
337
340
 
338
341
  print(f"Submitted a task {task_id}")
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: isolate
3
- Version: 0.16.1
3
+ Version: 0.16.3
4
4
  Summary: Managed isolated environments for Python
5
5
  Author-email: Features & Labels <hello@fal.ai>
6
6
  Project-URL: Issues, https://github.com/fal-ai/isolate/issues
@@ -25,6 +25,7 @@ Requires-Dist: flaky; extra == "test"
25
25
  Provides-Extra: dev
26
26
  Requires-Dist: isolate[test]; extra == "dev"
27
27
  Requires-Dist: grpcio-tools==1.64.0; extra == "dev"
28
+ Dynamic: license-file
28
29
 
29
30
  # Isolate
30
31
 
@@ -1,5 +1,5 @@
1
1
  isolate/__init__.py,sha256=uXOKnONs7sXgARNgElwr4_A1sKoA6ACHVEvs3IDiX1M,127
2
- isolate/_isolate_version.py,sha256=djn14s8hpDNt1rX_1-rosukF6WH__dfZ71HDUa63720,413
2
+ isolate/_isolate_version.py,sha256=weD4agMPWeuyUP601n4b0-WINls1XJmzDevRS4lplIc,513
3
3
  isolate/_version.py,sha256=05pXvy-yr5t3I1m9JMn42Ilzpg7fa8IB2J8a3G7t1cU,274
4
4
  isolate/logger.py,sha256=IXPebob_fV8bl8HAyKcheXcTJocfdWk-v-ujSl13oVA,1718
5
5
  isolate/logs.py,sha256=R_AHUVYD18z_PhtK_mDWi9Gch79CxmwHY09hUDShtwg,2079
@@ -21,7 +21,7 @@ isolate/connections/__init__.py,sha256=oa0PNo7ZQ0StPIDvKnJ02_CNVMyfOhxJ3M1C0VMvj
21
21
  isolate/connections/common.py,sha256=PAfBGKZNUdtFlZQlw3_nQaUCKQXTnEkxzNNRV_i4R2A,3498
22
22
  isolate/connections/_local/__init__.py,sha256=6FtCKRSFBvTvjm5LNlNA-mieKEq3J7DZZRPcXVedERo,146
23
23
  isolate/connections/_local/_base.py,sha256=wx6WkP_zBZ7zHOq2mHqafVUAvGDMQGRELX64-o-uCdo,6676
24
- isolate/connections/_local/agent_startup.py,sha256=swCs6Q0yVkDw7w-RftizHSMyJDM7DQwuP3TB0qI1ucg,1552
24
+ isolate/connections/_local/agent_startup.py,sha256=F6f75vCy7KJiAoP7xAMO2XnkYpsi5TRCVWi4pmGkoU8,1844
25
25
  isolate/connections/grpc/__init__.py,sha256=tcesLxlC36P6wSg2lBcO2egsJWMbSKwc8zFXhWac3YU,85
26
26
  isolate/connections/grpc/_base.py,sha256=kUB-EDetcyb0fsYfH25E14DrxbVXe19bEH4u5b0-Gqw,5656
27
27
  isolate/connections/grpc/agent.py,sha256=fZF4-v8WN1qPzFp17UxOX_A3Jq8bXD8Wss-7eNgNoYg,8071
@@ -42,7 +42,7 @@ isolate/connections/ipc/agent.py,sha256=hGlL4x78FhRvMZ4DkVh3dk-EmWQqxHW4LIipgyOk
42
42
  isolate/server/__init__.py,sha256=7R3GuWmxuqe0q28rVqETJN9OCrP_-Svjv9h0NR1GFL0,79
43
43
  isolate/server/health_server.py,sha256=yN7F1Q28DdX8-Zk3gef7XcQEE25XwlHwzV5GBM75aQM,1249
44
44
  isolate/server/interface.py,sha256=nGbjdxrN0p9m1LNdeds8NIoJOwPYW2NM6ktmbhfG4_s,687
45
- isolate/server/server.py,sha256=azbV2yJqX8gOC6p2DIfzQl30pgQg2BePG71I_9Q9qvc,23660
45
+ isolate/server/server.py,sha256=ZJHojEKCsj9FrXvX8r7lwO-sF5M93pr2o3-qBoSMySg,23731
46
46
  isolate/server/definitions/__init__.py,sha256=f_Q3pdjMuZrjgNlbM60btFKiB1Vg8cnVyKEbp0RmU0A,572
47
47
  isolate/server/definitions/server.proto,sha256=_xAqGR2te_EQ8Z95aqRmXL_4Xtcj_LHcnPEI8-FO54o,1787
48
48
  isolate/server/definitions/server_pb2.py,sha256=Iu5pAGN89MOponRnTW8FrUkuxEEYvdldUxLuUFJ74zU,4338
@@ -53,9 +53,9 @@ isolate/server/health/health.proto,sha256=wE2_QD0OQAblKkEBG7sALLXEOj1mOLKG-FbC4t
53
53
  isolate/server/health/health_pb2.py,sha256=-fd91wiaZOSJj_zeo55IqxMBsQGuGF-yjZS-Wc1RaS0,1897
54
54
  isolate/server/health/health_pb2.pyi,sha256=AK-DPCpJzoYhU6DydD856c0Ywx84x6k-Cs4m6HpNv5A,2459
55
55
  isolate/server/health/health_pb2_grpc.py,sha256=BrwuS8t4w6K-XVxIdrUQj5Rn0FAMXrYB2iFgUfeXGMM,3913
56
- isolate-0.16.1.dist-info/LICENSE,sha256=427vuyirL5scgBLqA9UWcdnxKrtSGc0u_JfUupk6lAA,11359
57
- isolate-0.16.1.dist-info/METADATA,sha256=TJzljjq6ChuaMHUzmTBqYqEJezUkSwtNMsoPlxdM708,3176
58
- isolate-0.16.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
59
- isolate-0.16.1.dist-info/entry_points.txt,sha256=s3prh2EERaVCbL8R45tfY5WFPZ1TsYOsz305YR7s-Pc,360
60
- isolate-0.16.1.dist-info/top_level.txt,sha256=W9QJBHcq5WXRkbOXf25bvftzFsOZZN4n1DAatdroZrs,8
61
- isolate-0.16.1.dist-info/RECORD,,
56
+ isolate-0.16.3.dist-info/licenses/LICENSE,sha256=427vuyirL5scgBLqA9UWcdnxKrtSGc0u_JfUupk6lAA,11359
57
+ isolate-0.16.3.dist-info/METADATA,sha256=LDqRWN0-TtBEsCW0c8wDZYxFi_-41L-7hpgolgVGNEo,3198
58
+ isolate-0.16.3.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
59
+ isolate-0.16.3.dist-info/entry_points.txt,sha256=s3prh2EERaVCbL8R45tfY5WFPZ1TsYOsz305YR7s-Pc,360
60
+ isolate-0.16.3.dist-info/top_level.txt,sha256=W9QJBHcq5WXRkbOXf25bvftzFsOZZN4n1DAatdroZrs,8
61
+ isolate-0.16.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (80.7.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5