modAL 1.2.5.dev28__tar.gz → 1.2.6__tar.gz

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.
Files changed (197) hide show
  1. {modal-1.2.5.dev28 → modal-1.2.6}/PKG-INFO +1 -1
  2. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_output.py +2 -2
  3. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_runtime/container_io_manager.py +1 -1
  4. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_runtime/user_code_imports.py +1 -1
  5. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_traceback.py +1 -1
  6. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/task_command_router_client.py +21 -13
  7. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/network_file_system.py +1 -1
  8. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/run.py +1 -1
  9. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/volume.py +1 -1
  10. {modal-1.2.5.dev28 → modal-1.2.6}/modal/client.pyi +2 -10
  11. {modal-1.2.5.dev28 → modal-1.2.6}/modal/container_process.py +2 -2
  12. {modal-1.2.5.dev28 → modal-1.2.6}/modal/io_streams.py +1 -1
  13. {modal-1.2.5.dev28 → modal-1.2.6}/modal/mount.py +8 -8
  14. {modal-1.2.5.dev28 → modal-1.2.6}/modal.egg-info/PKG-INFO +1 -1
  15. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/task_command_router.proto +20 -0
  16. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/task_command_router_grpc.py +33 -0
  17. modal-1.2.6/modal_proto/task_command_router_pb2.py +180 -0
  18. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/task_command_router_pb2.pyi +51 -0
  19. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/task_command_router_pb2_grpc.py +69 -0
  20. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/task_command_router_pb2_grpc.pyi +25 -0
  21. {modal-1.2.5.dev28 → modal-1.2.6}/modal_version/__init__.py +1 -1
  22. {modal-1.2.5.dev28 → modal-1.2.6}/modal_version/__main__.py +1 -1
  23. {modal-1.2.5.dev28 → modal-1.2.6}/pyproject.toml +11 -1
  24. modal-1.2.5.dev28/modal_proto/task_command_router_pb2.py +0 -149
  25. {modal-1.2.5.dev28 → modal-1.2.6}/LICENSE +0 -0
  26. {modal-1.2.5.dev28 → modal-1.2.6}/README.md +0 -0
  27. {modal-1.2.5.dev28 → modal-1.2.6}/modal/__init__.py +0 -0
  28. {modal-1.2.5.dev28 → modal-1.2.6}/modal/__main__.py +0 -0
  29. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_billing.py +0 -0
  30. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_clustered_functions.py +0 -0
  31. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_clustered_functions.pyi +0 -0
  32. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_container_entrypoint.py +0 -0
  33. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_functions.py +0 -0
  34. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_grpc_client.py +0 -0
  35. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_ipython.py +0 -0
  36. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_load_context.py +0 -0
  37. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_location.py +0 -0
  38. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_object.py +0 -0
  39. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_partial_function.py +0 -0
  40. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_pty.py +0 -0
  41. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_resolver.py +0 -0
  42. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_resources.py +0 -0
  43. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_runtime/__init__.py +0 -0
  44. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_runtime/asgi.py +0 -0
  45. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_runtime/container_io_manager.pyi +0 -0
  46. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_runtime/execution_context.py +0 -0
  47. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_runtime/execution_context.pyi +0 -0
  48. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_runtime/gpu_memory_snapshot.py +0 -0
  49. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_runtime/telemetry.py +0 -0
  50. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_runtime/user_code_event_loop.py +0 -0
  51. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_serialization.py +0 -0
  52. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_tunnel.py +0 -0
  53. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_tunnel.pyi +0 -0
  54. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_type_manager.py +0 -0
  55. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/__init__.py +0 -0
  56. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/app_utils.py +0 -0
  57. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/async_utils.py +0 -0
  58. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/auth_token_manager.py +0 -0
  59. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/blob_utils.py +0 -0
  60. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/bytes_io_segment_payload.py +0 -0
  61. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/deprecation.py +0 -0
  62. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/docker_utils.py +0 -0
  63. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/function_utils.py +0 -0
  64. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/git_utils.py +0 -0
  65. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/grpc_testing.py +0 -0
  66. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/grpc_utils.py +0 -0
  67. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/hash_utils.py +0 -0
  68. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/http_utils.py +0 -0
  69. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/jwt_utils.py +0 -0
  70. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/logger.py +0 -0
  71. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/mount_utils.py +0 -0
  72. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/name_utils.py +0 -0
  73. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/package_utils.py +0 -0
  74. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/pattern_utils.py +0 -0
  75. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/rand_pb_testing.py +0 -0
  76. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/shell_utils.py +0 -0
  77. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_utils/time_utils.py +0 -0
  78. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_vendor/__init__.py +0 -0
  79. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_vendor/a2wsgi_wsgi.py +0 -0
  80. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_vendor/cloudpickle.py +0 -0
  81. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_vendor/tblib.py +0 -0
  82. {modal-1.2.5.dev28 → modal-1.2.6}/modal/_watcher.py +0 -0
  83. {modal-1.2.5.dev28 → modal-1.2.6}/modal/app.py +0 -0
  84. {modal-1.2.5.dev28 → modal-1.2.6}/modal/app.pyi +0 -0
  85. {modal-1.2.5.dev28 → modal-1.2.6}/modal/billing.py +0 -0
  86. {modal-1.2.5.dev28 → modal-1.2.6}/modal/builder/2023.12.312.txt +0 -0
  87. {modal-1.2.5.dev28 → modal-1.2.6}/modal/builder/2023.12.txt +0 -0
  88. {modal-1.2.5.dev28 → modal-1.2.6}/modal/builder/2024.04.txt +0 -0
  89. {modal-1.2.5.dev28 → modal-1.2.6}/modal/builder/2024.10.txt +0 -0
  90. {modal-1.2.5.dev28 → modal-1.2.6}/modal/builder/2025.06.txt +0 -0
  91. {modal-1.2.5.dev28 → modal-1.2.6}/modal/builder/PREVIEW.txt +0 -0
  92. {modal-1.2.5.dev28 → modal-1.2.6}/modal/builder/README.md +0 -0
  93. {modal-1.2.5.dev28 → modal-1.2.6}/modal/builder/base-images.json +0 -0
  94. {modal-1.2.5.dev28 → modal-1.2.6}/modal/call_graph.py +0 -0
  95. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/__init__.py +0 -0
  96. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/_download.py +0 -0
  97. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/_traceback.py +0 -0
  98. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/app.py +0 -0
  99. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/cluster.py +0 -0
  100. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/config.py +0 -0
  101. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/container.py +0 -0
  102. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/dict.py +0 -0
  103. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/entry_point.py +0 -0
  104. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/environment.py +0 -0
  105. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/import_refs.py +0 -0
  106. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/launch.py +0 -0
  107. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/profile.py +0 -0
  108. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/programs/__init__.py +0 -0
  109. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/programs/launch_instance_ssh.py +0 -0
  110. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/programs/run_jupyter.py +0 -0
  111. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/programs/run_marimo.py +0 -0
  112. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/programs/vscode.py +0 -0
  113. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/queues.py +0 -0
  114. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/secret.py +0 -0
  115. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/shell.py +0 -0
  116. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/token.py +0 -0
  117. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cli/utils.py +0 -0
  118. {modal-1.2.5.dev28 → modal-1.2.6}/modal/client.py +0 -0
  119. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cloud_bucket_mount.py +0 -0
  120. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cloud_bucket_mount.pyi +0 -0
  121. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cls.py +0 -0
  122. {modal-1.2.5.dev28 → modal-1.2.6}/modal/cls.pyi +0 -0
  123. {modal-1.2.5.dev28 → modal-1.2.6}/modal/config.py +0 -0
  124. {modal-1.2.5.dev28 → modal-1.2.6}/modal/container_process.pyi +0 -0
  125. {modal-1.2.5.dev28 → modal-1.2.6}/modal/dict.py +0 -0
  126. {modal-1.2.5.dev28 → modal-1.2.6}/modal/dict.pyi +0 -0
  127. {modal-1.2.5.dev28 → modal-1.2.6}/modal/environments.py +0 -0
  128. {modal-1.2.5.dev28 → modal-1.2.6}/modal/environments.pyi +0 -0
  129. {modal-1.2.5.dev28 → modal-1.2.6}/modal/exception.py +0 -0
  130. {modal-1.2.5.dev28 → modal-1.2.6}/modal/experimental/__init__.py +0 -0
  131. {modal-1.2.5.dev28 → modal-1.2.6}/modal/experimental/flash.py +0 -0
  132. {modal-1.2.5.dev28 → modal-1.2.6}/modal/experimental/flash.pyi +0 -0
  133. {modal-1.2.5.dev28 → modal-1.2.6}/modal/experimental/ipython.py +0 -0
  134. {modal-1.2.5.dev28 → modal-1.2.6}/modal/file_io.py +0 -0
  135. {modal-1.2.5.dev28 → modal-1.2.6}/modal/file_io.pyi +0 -0
  136. {modal-1.2.5.dev28 → modal-1.2.6}/modal/file_pattern_matcher.py +0 -0
  137. {modal-1.2.5.dev28 → modal-1.2.6}/modal/functions.py +0 -0
  138. {modal-1.2.5.dev28 → modal-1.2.6}/modal/functions.pyi +0 -0
  139. {modal-1.2.5.dev28 → modal-1.2.6}/modal/gpu.py +0 -0
  140. {modal-1.2.5.dev28 → modal-1.2.6}/modal/image.py +0 -0
  141. {modal-1.2.5.dev28 → modal-1.2.6}/modal/image.pyi +0 -0
  142. {modal-1.2.5.dev28 → modal-1.2.6}/modal/io_streams.pyi +0 -0
  143. {modal-1.2.5.dev28 → modal-1.2.6}/modal/mount.pyi +0 -0
  144. {modal-1.2.5.dev28 → modal-1.2.6}/modal/network_file_system.py +0 -0
  145. {modal-1.2.5.dev28 → modal-1.2.6}/modal/network_file_system.pyi +0 -0
  146. {modal-1.2.5.dev28 → modal-1.2.6}/modal/object.py +0 -0
  147. {modal-1.2.5.dev28 → modal-1.2.6}/modal/object.pyi +0 -0
  148. {modal-1.2.5.dev28 → modal-1.2.6}/modal/output.py +0 -0
  149. {modal-1.2.5.dev28 → modal-1.2.6}/modal/parallel_map.py +0 -0
  150. {modal-1.2.5.dev28 → modal-1.2.6}/modal/parallel_map.pyi +0 -0
  151. {modal-1.2.5.dev28 → modal-1.2.6}/modal/partial_function.py +0 -0
  152. {modal-1.2.5.dev28 → modal-1.2.6}/modal/partial_function.pyi +0 -0
  153. {modal-1.2.5.dev28 → modal-1.2.6}/modal/proxy.py +0 -0
  154. {modal-1.2.5.dev28 → modal-1.2.6}/modal/proxy.pyi +0 -0
  155. {modal-1.2.5.dev28 → modal-1.2.6}/modal/py.typed +0 -0
  156. {modal-1.2.5.dev28 → modal-1.2.6}/modal/queue.py +0 -0
  157. {modal-1.2.5.dev28 → modal-1.2.6}/modal/queue.pyi +0 -0
  158. {modal-1.2.5.dev28 → modal-1.2.6}/modal/retries.py +0 -0
  159. {modal-1.2.5.dev28 → modal-1.2.6}/modal/runner.py +0 -0
  160. {modal-1.2.5.dev28 → modal-1.2.6}/modal/runner.pyi +0 -0
  161. {modal-1.2.5.dev28 → modal-1.2.6}/modal/running_app.py +0 -0
  162. {modal-1.2.5.dev28 → modal-1.2.6}/modal/sandbox.py +0 -0
  163. {modal-1.2.5.dev28 → modal-1.2.6}/modal/sandbox.pyi +0 -0
  164. {modal-1.2.5.dev28 → modal-1.2.6}/modal/schedule.py +0 -0
  165. {modal-1.2.5.dev28 → modal-1.2.6}/modal/scheduler_placement.py +0 -0
  166. {modal-1.2.5.dev28 → modal-1.2.6}/modal/secret.py +0 -0
  167. {modal-1.2.5.dev28 → modal-1.2.6}/modal/secret.pyi +0 -0
  168. {modal-1.2.5.dev28 → modal-1.2.6}/modal/serving.py +0 -0
  169. {modal-1.2.5.dev28 → modal-1.2.6}/modal/serving.pyi +0 -0
  170. {modal-1.2.5.dev28 → modal-1.2.6}/modal/snapshot.py +0 -0
  171. {modal-1.2.5.dev28 → modal-1.2.6}/modal/snapshot.pyi +0 -0
  172. {modal-1.2.5.dev28 → modal-1.2.6}/modal/stream_type.py +0 -0
  173. {modal-1.2.5.dev28 → modal-1.2.6}/modal/token_flow.py +0 -0
  174. {modal-1.2.5.dev28 → modal-1.2.6}/modal/token_flow.pyi +0 -0
  175. {modal-1.2.5.dev28 → modal-1.2.6}/modal/volume.py +0 -0
  176. {modal-1.2.5.dev28 → modal-1.2.6}/modal/volume.pyi +0 -0
  177. {modal-1.2.5.dev28 → modal-1.2.6}/modal.egg-info/SOURCES.txt +0 -0
  178. {modal-1.2.5.dev28 → modal-1.2.6}/modal.egg-info/dependency_links.txt +0 -0
  179. {modal-1.2.5.dev28 → modal-1.2.6}/modal.egg-info/entry_points.txt +0 -0
  180. {modal-1.2.5.dev28 → modal-1.2.6}/modal.egg-info/requires.txt +0 -0
  181. {modal-1.2.5.dev28 → modal-1.2.6}/modal.egg-info/top_level.txt +0 -0
  182. {modal-1.2.5.dev28 → modal-1.2.6}/modal_docs/__init__.py +0 -0
  183. {modal-1.2.5.dev28 → modal-1.2.6}/modal_docs/gen_cli_docs.py +0 -0
  184. {modal-1.2.5.dev28 → modal-1.2.6}/modal_docs/gen_reference_docs.py +0 -0
  185. {modal-1.2.5.dev28 → modal-1.2.6}/modal_docs/mdmd/__init__.py +0 -0
  186. {modal-1.2.5.dev28 → modal-1.2.6}/modal_docs/mdmd/mdmd.py +0 -0
  187. {modal-1.2.5.dev28 → modal-1.2.6}/modal_docs/mdmd/signatures.py +0 -0
  188. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/__init__.py +0 -0
  189. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/api.proto +0 -0
  190. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/api_grpc.py +0 -0
  191. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/api_pb2.py +0 -0
  192. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/api_pb2.pyi +0 -0
  193. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/api_pb2_grpc.py +0 -0
  194. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/api_pb2_grpc.pyi +0 -0
  195. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/modal_api_grpc.py +0 -0
  196. {modal-1.2.5.dev28 → modal-1.2.6}/modal_proto/py.typed +0 -0
  197. {modal-1.2.5.dev28 → modal-1.2.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.2.5.dev28
3
+ Version: 1.2.6
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -556,7 +556,7 @@ async def get_app_logs_loop(
556
556
  async def stop_pty_shell():
557
557
  nonlocal pty_shell_finish_event, pty_shell_input_task
558
558
  if pty_shell_finish_event:
559
- print("\r", end="") # move cursor to beginning of line
559
+ print("\r", end="") # move cursor to beginning of line # noqa: T201
560
560
  pty_shell_finish_event.set()
561
561
  pty_shell_finish_event = None
562
562
 
@@ -623,7 +623,7 @@ async def get_app_logs_loop(
623
623
  # This corresponds to the `modal run -i` use case where a breakpoint
624
624
  # triggers and the task drops into an interactive PTY mode
625
625
  if pty_shell_finish_event:
626
- print("ERROR: concurrent PTY shells are not supported.")
626
+ print("ERROR: concurrent PTY shells are not supported.") # noqa: T201
627
627
  else:
628
628
  pty_shell_stdout = output_mgr._stdout
629
629
  pty_shell_finish_event = asyncio.Event()
@@ -1007,7 +1007,7 @@ class _ContainerIOManager:
1007
1007
  # Start a debugger if the worker tells us to
1008
1008
  if int(restored_state.get("snapshot_debug", 0)):
1009
1009
  logger.debug("Entering snapshot debugger")
1010
- breakpoint()
1010
+ breakpoint() # noqa: T100
1011
1011
 
1012
1012
  # Local ContainerIOManager state.
1013
1013
  for key in ["task_id", "function_id"]:
@@ -243,7 +243,7 @@ def create_breakpoint_wrapper(container_io_manager: "modal._runtime.container_io
243
243
  def breakpoint_wrapper():
244
244
  # note: it would be nice to not have breakpoint_wrapper() included in the backtrace
245
245
  container_io_manager.interact(from_breakpoint=True)
246
- import pdb
246
+ import pdb # noqa: T100
247
247
 
248
248
  current_frame = inspect.currentframe()
249
249
  if current_frame is not None:
@@ -119,7 +119,7 @@ def print_exception(exc: Optional[type[BaseException]], value: Optional[BaseExce
119
119
  traceback.print_exception(exc, value, tb)
120
120
  if sys.version_info < (3, 11) and value is not None: # type: ignore
121
121
  notes = getattr(value, "__notes__", [])
122
- print(*notes, sep="\n", file=sys.stderr)
122
+ print(*notes, sep="\n", file=sys.stderr) # noqa: T201
123
123
 
124
124
 
125
125
  def print_server_warnings(server_warnings: Iterable[api_pb2.Warning]):
@@ -403,7 +403,10 @@ class TaskCommandRouterClient:
403
403
  )
404
404
  return
405
405
 
406
+ logger.debug(f"Refreshing JWT for exec with task ID {self._task_id}")
406
407
  resp = await fetch_command_router_access(self._server_client, self._task_id)
408
+ logger.debug(f"Finished refreshing JWT for exec with task ID {self._task_id}")
409
+
407
410
  # Ensure the server URL remains stable for the lifetime of this client.
408
411
  assert resp.url == self._server_url, "Task router URL changed during session"
409
412
  self._jwt = resp.jwt
@@ -434,7 +437,9 @@ class TaskCommandRouterClient:
434
437
  delay_secs = self.stream_stdio_retry_delay_secs
435
438
  delay_factor = self.stream_stdio_retry_delay_factor
436
439
  num_retries_remaining = self.stream_stdio_max_retries
437
- num_auth_retries = 0
440
+ # Flag to prevent infinite auth retries in the event that the JWT
441
+ # refresh yields an invalid JWT somehow or that the JWT is otherwise invalid.
442
+ did_auth_retry = False
438
443
 
439
444
  async def sleep_and_update_delay_and_num_retries_remaining(e: Exception):
440
445
  nonlocal delay_secs, num_retries_remaining
@@ -458,25 +463,28 @@ class TaskCommandRouterClient:
458
463
  file_descriptor=file_descriptor,
459
464
  )
460
465
 
461
- # Scope auth retry strictly to the initial send (where headers/auth are sent).
466
+ # Auth retry is scoped to a single refresh per streaming attempt. While auth metadata is
467
+ # sent on request start, UNAUTHENTICATED may sometimes surface during iteration,
468
+ # so we handle it at both send and receive boundaries.
462
469
  try:
463
470
  await s.send_message(req, end=True)
471
+ async for item in s:
472
+ # We successfully authenticated after a JWT refresh, reset the auth retry flag.
473
+ if did_auth_retry:
474
+ did_auth_retry = False
475
+ # Reset retry backoff after any successful chunk.
476
+ delay_secs = self.stream_stdio_retry_delay_secs
477
+ offset += len(item.data)
478
+ yield item
464
479
  except GRPCError as exc:
465
- if exc.status == Status.UNAUTHENTICATED and num_auth_retries < 1:
480
+ if exc.status == Status.UNAUTHENTICATED and not did_auth_retry:
466
481
  await self._refresh_jwt()
467
- num_auth_retries += 1
482
+ # Mark that we've retried authentication for this streaming attempt, to
483
+ # prevent subsequent retries.
484
+ did_auth_retry = True
468
485
  continue
469
486
  raise
470
487
 
471
- # We successfully authenticated, reset the auth retry count.
472
- num_auth_retries = 0
473
-
474
- async for item in s:
475
- # Reset retry backoff after any successful chunk.
476
- delay_secs = self.stream_stdio_retry_delay_secs
477
- offset += len(item.data)
478
- yield item
479
-
480
488
  # We successfully streamed all output.
481
489
  return
482
490
  except GRPCError as e:
@@ -102,7 +102,7 @@ async def ls(
102
102
  console.print(table)
103
103
  else:
104
104
  for entry in entries:
105
- print(entry.path)
105
+ print(entry.path) # noqa: T201
106
106
 
107
107
 
108
108
  @nfs_cli.command(
@@ -292,7 +292,7 @@ def _get_click_command_for_local_entrypoint(app: App, entrypoint: LocalEntrypoin
292
292
  @click.pass_context
293
293
  def f(ctx, *args, **kwargs):
294
294
  if ctx.obj["detach"]:
295
- print(
295
+ print( # noqa: T201
296
296
  "Note that running a local entrypoint in detached mode only keeps the last "
297
297
  "triggered Modal function alive after the parent process has been killed or disconnected."
298
298
  )
@@ -148,7 +148,7 @@ async def ls(
148
148
  if not json and not sys.stdout.isatty():
149
149
  # Legacy behavior -- I am not sure why exactly we did this originally but I don't want to break it
150
150
  for entry in entries:
151
- print(entry.path)
151
+ print(entry.path) # noqa: T201
152
152
  else:
153
153
  rows = []
154
154
  for entry in entries:
@@ -28,11 +28,7 @@ class _Client:
28
28
  _snapshotted: bool
29
29
 
30
30
  def __init__(
31
- self,
32
- server_url: str,
33
- client_type: int,
34
- credentials: typing.Optional[tuple[str, str]],
35
- version: str = "1.2.5.dev28",
31
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "1.2.6"
36
32
  ):
37
33
  """mdmd:hidden
38
34
  The Modal client object is not intended to be instantiated directly by users.
@@ -159,11 +155,7 @@ class Client:
159
155
  _snapshotted: bool
160
156
 
161
157
  def __init__(
162
- self,
163
- server_url: str,
164
- client_type: int,
165
- credentials: typing.Optional[tuple[str, str]],
166
- version: str = "1.2.5.dev28",
158
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "1.2.6"
167
159
  ):
168
160
  """mdmd:hidden
169
161
  The Modal client object is not intended to be instantiated directly by users.
@@ -146,7 +146,7 @@ class _ContainerProcessThroughServer(Generic[T]):
146
146
  async def attach(self):
147
147
  """mdmd:hidden"""
148
148
  if platform.system() == "Windows":
149
- print("interactive exec is not currently supported on Windows.")
149
+ print("interactive exec is not currently supported on Windows.") # noqa: T201
150
150
  return
151
151
 
152
152
  from ._output import make_console
@@ -347,7 +347,7 @@ class _ContainerProcessThroughCommandRouter(Generic[T]):
347
347
 
348
348
  async def attach(self):
349
349
  if platform.system() == "Windows":
350
- print("interactive exec is not currently supported on Windows.")
350
+ print("interactive exec is not currently supported on Windows.") # noqa: T201
351
351
  return
352
352
 
353
353
  from ._output import make_console
@@ -183,7 +183,7 @@ class _StreamReaderThroughServer(Generic[T]):
183
183
  async for message, batch_index in iterator:
184
184
  if self._stream_type == StreamType.STDOUT and message:
185
185
  # TODO: rearchitect this, since these bytes aren't necessarily decodable
186
- print(message.decode("utf-8"), end="")
186
+ print(message.decode("utf-8"), end="") # noqa: T201
187
187
  elif self._stream_type == StreamType.PIPE:
188
188
  self._container_process_buffer.append(message)
189
189
 
@@ -775,13 +775,13 @@ async def _create_single_client_dependency_mount(
775
775
  if check_if_exists:
776
776
  try:
777
777
  await Mount.from_name(mount_name, namespace=api_pb2.DEPLOYMENT_NAMESPACE_GLOBAL).hydrate.aio(client)
778
- print(f"➖ Found existing mount {mount_name} in global namespace.")
778
+ print(f"➖ Found existing mount {mount_name} in global namespace.") # noqa: T201
779
779
  return
780
780
  except modal.exception.NotFoundError:
781
781
  pass
782
782
 
783
783
  with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmpd:
784
- print(f"📦 Building {mount_name}.")
784
+ print(f"📦 Building {mount_name}.") # noqa: T201
785
785
  requirements = os.path.join(os.path.dirname(__file__), f"builder/{builder_version}.txt")
786
786
  cmd = " ".join(
787
787
  [
@@ -810,11 +810,11 @@ async def _create_single_client_dependency_mount(
810
810
  await proc.wait()
811
811
  if proc.returncode:
812
812
  stdout, stderr = await proc.communicate()
813
- print(stdout.decode("utf-8"))
814
- print(stderr.decode("utf-8"))
813
+ print(stdout.decode("utf-8")) # noqa: T201
814
+ print(stderr.decode("utf-8")) # noqa: T201
815
815
  raise RuntimeError(f"Subprocess failed with {proc.returncode}")
816
816
 
817
- print(f"🌐 Downloaded and unpacked {mount_name} packages to {tmpd}.")
817
+ print(f"🌐 Downloaded and unpacked {mount_name} packages to {tmpd}.") # noqa: T201
818
818
 
819
819
  python_mount = Mount._from_local_dir(tmpd, remote_path=REMOTE_PACKAGES_PATH)
820
820
 
@@ -838,11 +838,11 @@ async def _create_single_client_dependency_mount(
838
838
  allow_overwrite=allow_overwrite,
839
839
  client=client,
840
840
  )
841
- print(f"✅ Deployed mount {mount_name} to global namespace.")
841
+ print(f"✅ Deployed mount {mount_name} to global namespace.") # noqa: T201
842
842
  except GRPCError as e:
843
- print(f"⚠️ Mount creation failed with {e.status}: {e.message}")
843
+ print(f"⚠️ Mount creation failed with {e.status}: {e.message}") # noqa: T201
844
844
  else:
845
- print(f"Dry run - skipping deployment of mount {mount_name}")
845
+ print(f"Dry run - skipping deployment of mount {mount_name}") # noqa: T201
846
846
 
847
847
 
848
848
  async def _create_client_dependency_mounts(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.2.5.dev28
3
+ Version: 1.2.6
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -2,6 +2,7 @@ syntax = "proto3";
2
2
 
3
3
  option go_package = "github.com/modal-labs/modal/go/proto";
4
4
 
5
+ import "google/protobuf/empty.proto";
5
6
  import "modal_proto/api.proto";
6
7
 
7
8
  package modal.task_command_router;
@@ -130,6 +131,21 @@ message TaskExecWaitResponse {
130
131
  // and termination by Modal (due to task timeout, exec exceeded deadline, etc.)
131
132
  }
132
133
 
134
+ message TaskMountDirectoryRequest {
135
+ string task_id = 1;
136
+ bytes path = 2;
137
+ string image_id = 3;
138
+ }
139
+
140
+ message TaskSnapshotDirectoryRequest {
141
+ string task_id = 1;
142
+ bytes path = 2;
143
+ }
144
+
145
+ message TaskSnapshotDirectoryResponse {
146
+ string image_id = 1;
147
+ }
148
+
133
149
  service TaskCommandRouter {
134
150
  // Poll for the exit status of an exec'd command.
135
151
  rpc TaskExecPoll(TaskExecPollRequest) returns (TaskExecPollResponse);
@@ -141,4 +157,8 @@ service TaskCommandRouter {
141
157
  rpc TaskExecStdioRead(TaskExecStdioReadRequest) returns (stream TaskExecStdioReadResponse);
142
158
  // Wait for an exec'd command to exit and return the exit code.
143
159
  rpc TaskExecWait(TaskExecWaitRequest) returns (TaskExecWaitResponse);
160
+ // Mount an image at a directory in the container.
161
+ rpc TaskMountDirectory(TaskMountDirectoryRequest) returns (google.protobuf.Empty);
162
+ // Snapshot a directory with a mounted image, including any local changes, into a new image.
163
+ rpc TaskSnapshotDirectory(TaskSnapshotDirectoryRequest) returns (TaskSnapshotDirectoryResponse);
144
164
  }
@@ -9,6 +9,7 @@ import grpclib.client
9
9
  if typing.TYPE_CHECKING:
10
10
  import grpclib.server
11
11
 
12
+ import google.protobuf.empty_pb2
12
13
  import modal_proto.api_pb2
13
14
  import modal_proto.task_command_router_pb2
14
15
 
@@ -35,6 +36,14 @@ class TaskCommandRouterBase(abc.ABC):
35
36
  async def TaskExecWait(self, stream: 'grpclib.server.Stream[modal_proto.task_command_router_pb2.TaskExecWaitRequest, modal_proto.task_command_router_pb2.TaskExecWaitResponse]') -> None:
36
37
  pass
37
38
 
39
+ @abc.abstractmethod
40
+ async def TaskMountDirectory(self, stream: 'grpclib.server.Stream[modal_proto.task_command_router_pb2.TaskMountDirectoryRequest, google.protobuf.empty_pb2.Empty]') -> None:
41
+ pass
42
+
43
+ @abc.abstractmethod
44
+ async def TaskSnapshotDirectory(self, stream: 'grpclib.server.Stream[modal_proto.task_command_router_pb2.TaskSnapshotDirectoryRequest, modal_proto.task_command_router_pb2.TaskSnapshotDirectoryResponse]') -> None:
45
+ pass
46
+
38
47
  def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
39
48
  return {
40
49
  '/modal.task_command_router.TaskCommandRouter/TaskExecPoll': grpclib.const.Handler(
@@ -67,6 +76,18 @@ class TaskCommandRouterBase(abc.ABC):
67
76
  modal_proto.task_command_router_pb2.TaskExecWaitRequest,
68
77
  modal_proto.task_command_router_pb2.TaskExecWaitResponse,
69
78
  ),
79
+ '/modal.task_command_router.TaskCommandRouter/TaskMountDirectory': grpclib.const.Handler(
80
+ self.TaskMountDirectory,
81
+ grpclib.const.Cardinality.UNARY_UNARY,
82
+ modal_proto.task_command_router_pb2.TaskMountDirectoryRequest,
83
+ google.protobuf.empty_pb2.Empty,
84
+ ),
85
+ '/modal.task_command_router.TaskCommandRouter/TaskSnapshotDirectory': grpclib.const.Handler(
86
+ self.TaskSnapshotDirectory,
87
+ grpclib.const.Cardinality.UNARY_UNARY,
88
+ modal_proto.task_command_router_pb2.TaskSnapshotDirectoryRequest,
89
+ modal_proto.task_command_router_pb2.TaskSnapshotDirectoryResponse,
90
+ ),
70
91
  }
71
92
 
72
93
 
@@ -103,3 +124,15 @@ class TaskCommandRouterStub:
103
124
  modal_proto.task_command_router_pb2.TaskExecWaitRequest,
104
125
  modal_proto.task_command_router_pb2.TaskExecWaitResponse,
105
126
  )
127
+ self.TaskMountDirectory = grpclib.client.UnaryUnaryMethod(
128
+ channel,
129
+ '/modal.task_command_router.TaskCommandRouter/TaskMountDirectory',
130
+ modal_proto.task_command_router_pb2.TaskMountDirectoryRequest,
131
+ google.protobuf.empty_pb2.Empty,
132
+ )
133
+ self.TaskSnapshotDirectory = grpclib.client.UnaryUnaryMethod(
134
+ channel,
135
+ '/modal.task_command_router.TaskCommandRouter/TaskSnapshotDirectory',
136
+ modal_proto.task_command_router_pb2.TaskSnapshotDirectoryRequest,
137
+ modal_proto.task_command_router_pb2.TaskSnapshotDirectoryResponse,
138
+ )
@@ -0,0 +1,180 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: modal_proto/task_command_router.proto
4
+ """Generated protocol buffer code."""
5
+ from google.protobuf.internal import enum_type_wrapper
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import message as _message
9
+ from google.protobuf import reflection as _reflection
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ # @@protoc_insertion_point(imports)
12
+
13
+ _sym_db = _symbol_database.Default()
14
+
15
+
16
+ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
17
+ from modal_proto import api_pb2 as modal__proto_dot_api__pb2
18
+
19
+
20
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%modal_proto/task_command_router.proto\x12\x19modal.task_command_router\x1a\x1bgoogle/protobuf/empty.proto\x1a\x15modal_proto/api.proto\"7\n\x13TaskExecPollRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"G\n\x14TaskExecPollResponse\x12\x0e\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x02 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status\"\x92\x03\n\x14TaskExecStartRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x63ommand_args\x18\x03 \x03(\t\x12\x46\n\rstdout_config\x18\x04 \x01(\x0e\x32/.modal.task_command_router.TaskExecStdoutConfig\x12\x46\n\rstderr_config\x18\x05 \x01(\x0e\x32/.modal.task_command_router.TaskExecStderrConfig\x12\x19\n\x0ctimeout_secs\x18\x06 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07workdir\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x12\n\nsecret_ids\x18\x08 \x03(\t\x12,\n\x08pty_info\x18\t \x01(\x0b\x32\x15.modal.client.PTYInfoH\x02\x88\x01\x01\x12\x15\n\rruntime_debug\x18\n \x01(\x08\x42\x0f\n\r_timeout_secsB\n\n\x08_workdirB\x0b\n\t_pty_info\"\x17\n\x15TaskExecStartResponse\"h\n\x19TaskExecStdinWriteRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12\x0b\n\x03\x65of\x18\x05 \x01(\x08\"\x1c\n\x1aTaskExecStdinWriteResponse\"\x9d\x01\n\x18TaskExecStdioReadRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12O\n\x0f\x66ile_descriptor\x18\x04 \x01(\x0e\x32\x36.modal.task_command_router.TaskExecStdioFileDescriptor\")\n\x19TaskExecStdioReadResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"7\n\x13TaskExecWaitRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"G\n\x14TaskExecWaitResponse\x12\x0e\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x02 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status\"L\n\x19TaskMountDirectoryRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\x0c\x12\x10\n\x08image_id\x18\x03 \x01(\t\"=\n\x1cTaskSnapshotDirectoryRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\x0c\"1\n\x1dTaskSnapshotDirectoryResponse\x12\x10\n\x08image_id\x18\x01 \x01(\t*\x81\x01\n\x14TaskExecStderrConfig\x12#\n\x1fTASK_EXEC_STDERR_CONFIG_DEVNULL\x10\x00\x12 \n\x1cTASK_EXEC_STDERR_CONFIG_PIPE\x10\x01\x12\"\n\x1eTASK_EXEC_STDERR_CONFIG_STDOUT\x10\x02*u\n\x1bTaskExecStdioFileDescriptor\x12*\n&TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT\x10\x00\x12*\n&TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDERR\x10\x01*]\n\x14TaskExecStdoutConfig\x12#\n\x1fTASK_EXEC_STDOUT_CONFIG_DEVNULL\x10\x00\x12 \n\x1cTASK_EXEC_STDOUT_CONFIG_PIPE\x10\x01\x32\xe1\x06\n\x11TaskCommandRouter\x12o\n\x0cTaskExecPoll\x12..modal.task_command_router.TaskExecPollRequest\x1a/.modal.task_command_router.TaskExecPollResponse\x12r\n\rTaskExecStart\x12/.modal.task_command_router.TaskExecStartRequest\x1a\x30.modal.task_command_router.TaskExecStartResponse\x12\x81\x01\n\x12TaskExecStdinWrite\x12\x34.modal.task_command_router.TaskExecStdinWriteRequest\x1a\x35.modal.task_command_router.TaskExecStdinWriteResponse\x12\x80\x01\n\x11TaskExecStdioRead\x12\x33.modal.task_command_router.TaskExecStdioReadRequest\x1a\x34.modal.task_command_router.TaskExecStdioReadResponse0\x01\x12o\n\x0cTaskExecWait\x12..modal.task_command_router.TaskExecWaitRequest\x1a/.modal.task_command_router.TaskExecWaitResponse\x12\x62\n\x12TaskMountDirectory\x12\x34.modal.task_command_router.TaskMountDirectoryRequest\x1a\x16.google.protobuf.Empty\x12\x8a\x01\n\x15TaskSnapshotDirectory\x12\x37.modal.task_command_router.TaskSnapshotDirectoryRequest\x1a\x38.modal.task_command_router.TaskSnapshotDirectoryResponseB&Z$github.com/modal-labs/modal/go/protob\x06proto3')
21
+
22
+ _TASKEXECSTDERRCONFIG = DESCRIPTOR.enum_types_by_name['TaskExecStderrConfig']
23
+ TaskExecStderrConfig = enum_type_wrapper.EnumTypeWrapper(_TASKEXECSTDERRCONFIG)
24
+ _TASKEXECSTDIOFILEDESCRIPTOR = DESCRIPTOR.enum_types_by_name['TaskExecStdioFileDescriptor']
25
+ TaskExecStdioFileDescriptor = enum_type_wrapper.EnumTypeWrapper(_TASKEXECSTDIOFILEDESCRIPTOR)
26
+ _TASKEXECSTDOUTCONFIG = DESCRIPTOR.enum_types_by_name['TaskExecStdoutConfig']
27
+ TaskExecStdoutConfig = enum_type_wrapper.EnumTypeWrapper(_TASKEXECSTDOUTCONFIG)
28
+ TASK_EXEC_STDERR_CONFIG_DEVNULL = 0
29
+ TASK_EXEC_STDERR_CONFIG_PIPE = 1
30
+ TASK_EXEC_STDERR_CONFIG_STDOUT = 2
31
+ TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT = 0
32
+ TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDERR = 1
33
+ TASK_EXEC_STDOUT_CONFIG_DEVNULL = 0
34
+ TASK_EXEC_STDOUT_CONFIG_PIPE = 1
35
+
36
+
37
+ _TASKEXECPOLLREQUEST = DESCRIPTOR.message_types_by_name['TaskExecPollRequest']
38
+ _TASKEXECPOLLRESPONSE = DESCRIPTOR.message_types_by_name['TaskExecPollResponse']
39
+ _TASKEXECSTARTREQUEST = DESCRIPTOR.message_types_by_name['TaskExecStartRequest']
40
+ _TASKEXECSTARTRESPONSE = DESCRIPTOR.message_types_by_name['TaskExecStartResponse']
41
+ _TASKEXECSTDINWRITEREQUEST = DESCRIPTOR.message_types_by_name['TaskExecStdinWriteRequest']
42
+ _TASKEXECSTDINWRITERESPONSE = DESCRIPTOR.message_types_by_name['TaskExecStdinWriteResponse']
43
+ _TASKEXECSTDIOREADREQUEST = DESCRIPTOR.message_types_by_name['TaskExecStdioReadRequest']
44
+ _TASKEXECSTDIOREADRESPONSE = DESCRIPTOR.message_types_by_name['TaskExecStdioReadResponse']
45
+ _TASKEXECWAITREQUEST = DESCRIPTOR.message_types_by_name['TaskExecWaitRequest']
46
+ _TASKEXECWAITRESPONSE = DESCRIPTOR.message_types_by_name['TaskExecWaitResponse']
47
+ _TASKMOUNTDIRECTORYREQUEST = DESCRIPTOR.message_types_by_name['TaskMountDirectoryRequest']
48
+ _TASKSNAPSHOTDIRECTORYREQUEST = DESCRIPTOR.message_types_by_name['TaskSnapshotDirectoryRequest']
49
+ _TASKSNAPSHOTDIRECTORYRESPONSE = DESCRIPTOR.message_types_by_name['TaskSnapshotDirectoryResponse']
50
+ TaskExecPollRequest = _reflection.GeneratedProtocolMessageType('TaskExecPollRequest', (_message.Message,), {
51
+ 'DESCRIPTOR' : _TASKEXECPOLLREQUEST,
52
+ '__module__' : 'modal_proto.task_command_router_pb2'
53
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecPollRequest)
54
+ })
55
+ _sym_db.RegisterMessage(TaskExecPollRequest)
56
+
57
+ TaskExecPollResponse = _reflection.GeneratedProtocolMessageType('TaskExecPollResponse', (_message.Message,), {
58
+ 'DESCRIPTOR' : _TASKEXECPOLLRESPONSE,
59
+ '__module__' : 'modal_proto.task_command_router_pb2'
60
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecPollResponse)
61
+ })
62
+ _sym_db.RegisterMessage(TaskExecPollResponse)
63
+
64
+ TaskExecStartRequest = _reflection.GeneratedProtocolMessageType('TaskExecStartRequest', (_message.Message,), {
65
+ 'DESCRIPTOR' : _TASKEXECSTARTREQUEST,
66
+ '__module__' : 'modal_proto.task_command_router_pb2'
67
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStartRequest)
68
+ })
69
+ _sym_db.RegisterMessage(TaskExecStartRequest)
70
+
71
+ TaskExecStartResponse = _reflection.GeneratedProtocolMessageType('TaskExecStartResponse', (_message.Message,), {
72
+ 'DESCRIPTOR' : _TASKEXECSTARTRESPONSE,
73
+ '__module__' : 'modal_proto.task_command_router_pb2'
74
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStartResponse)
75
+ })
76
+ _sym_db.RegisterMessage(TaskExecStartResponse)
77
+
78
+ TaskExecStdinWriteRequest = _reflection.GeneratedProtocolMessageType('TaskExecStdinWriteRequest', (_message.Message,), {
79
+ 'DESCRIPTOR' : _TASKEXECSTDINWRITEREQUEST,
80
+ '__module__' : 'modal_proto.task_command_router_pb2'
81
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStdinWriteRequest)
82
+ })
83
+ _sym_db.RegisterMessage(TaskExecStdinWriteRequest)
84
+
85
+ TaskExecStdinWriteResponse = _reflection.GeneratedProtocolMessageType('TaskExecStdinWriteResponse', (_message.Message,), {
86
+ 'DESCRIPTOR' : _TASKEXECSTDINWRITERESPONSE,
87
+ '__module__' : 'modal_proto.task_command_router_pb2'
88
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStdinWriteResponse)
89
+ })
90
+ _sym_db.RegisterMessage(TaskExecStdinWriteResponse)
91
+
92
+ TaskExecStdioReadRequest = _reflection.GeneratedProtocolMessageType('TaskExecStdioReadRequest', (_message.Message,), {
93
+ 'DESCRIPTOR' : _TASKEXECSTDIOREADREQUEST,
94
+ '__module__' : 'modal_proto.task_command_router_pb2'
95
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStdioReadRequest)
96
+ })
97
+ _sym_db.RegisterMessage(TaskExecStdioReadRequest)
98
+
99
+ TaskExecStdioReadResponse = _reflection.GeneratedProtocolMessageType('TaskExecStdioReadResponse', (_message.Message,), {
100
+ 'DESCRIPTOR' : _TASKEXECSTDIOREADRESPONSE,
101
+ '__module__' : 'modal_proto.task_command_router_pb2'
102
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStdioReadResponse)
103
+ })
104
+ _sym_db.RegisterMessage(TaskExecStdioReadResponse)
105
+
106
+ TaskExecWaitRequest = _reflection.GeneratedProtocolMessageType('TaskExecWaitRequest', (_message.Message,), {
107
+ 'DESCRIPTOR' : _TASKEXECWAITREQUEST,
108
+ '__module__' : 'modal_proto.task_command_router_pb2'
109
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecWaitRequest)
110
+ })
111
+ _sym_db.RegisterMessage(TaskExecWaitRequest)
112
+
113
+ TaskExecWaitResponse = _reflection.GeneratedProtocolMessageType('TaskExecWaitResponse', (_message.Message,), {
114
+ 'DESCRIPTOR' : _TASKEXECWAITRESPONSE,
115
+ '__module__' : 'modal_proto.task_command_router_pb2'
116
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecWaitResponse)
117
+ })
118
+ _sym_db.RegisterMessage(TaskExecWaitResponse)
119
+
120
+ TaskMountDirectoryRequest = _reflection.GeneratedProtocolMessageType('TaskMountDirectoryRequest', (_message.Message,), {
121
+ 'DESCRIPTOR' : _TASKMOUNTDIRECTORYREQUEST,
122
+ '__module__' : 'modal_proto.task_command_router_pb2'
123
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskMountDirectoryRequest)
124
+ })
125
+ _sym_db.RegisterMessage(TaskMountDirectoryRequest)
126
+
127
+ TaskSnapshotDirectoryRequest = _reflection.GeneratedProtocolMessageType('TaskSnapshotDirectoryRequest', (_message.Message,), {
128
+ 'DESCRIPTOR' : _TASKSNAPSHOTDIRECTORYREQUEST,
129
+ '__module__' : 'modal_proto.task_command_router_pb2'
130
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskSnapshotDirectoryRequest)
131
+ })
132
+ _sym_db.RegisterMessage(TaskSnapshotDirectoryRequest)
133
+
134
+ TaskSnapshotDirectoryResponse = _reflection.GeneratedProtocolMessageType('TaskSnapshotDirectoryResponse', (_message.Message,), {
135
+ 'DESCRIPTOR' : _TASKSNAPSHOTDIRECTORYRESPONSE,
136
+ '__module__' : 'modal_proto.task_command_router_pb2'
137
+ # @@protoc_insertion_point(class_scope:modal.task_command_router.TaskSnapshotDirectoryResponse)
138
+ })
139
+ _sym_db.RegisterMessage(TaskSnapshotDirectoryResponse)
140
+
141
+ _TASKCOMMANDROUTER = DESCRIPTOR.services_by_name['TaskCommandRouter']
142
+ if _descriptor._USE_C_DESCRIPTORS == False:
143
+
144
+ DESCRIPTOR._options = None
145
+ DESCRIPTOR._serialized_options = b'Z$github.com/modal-labs/modal/go/proto'
146
+ _TASKEXECSTDERRCONFIG._serialized_start=1342
147
+ _TASKEXECSTDERRCONFIG._serialized_end=1471
148
+ _TASKEXECSTDIOFILEDESCRIPTOR._serialized_start=1473
149
+ _TASKEXECSTDIOFILEDESCRIPTOR._serialized_end=1590
150
+ _TASKEXECSTDOUTCONFIG._serialized_start=1592
151
+ _TASKEXECSTDOUTCONFIG._serialized_end=1685
152
+ _TASKEXECPOLLREQUEST._serialized_start=120
153
+ _TASKEXECPOLLREQUEST._serialized_end=175
154
+ _TASKEXECPOLLRESPONSE._serialized_start=177
155
+ _TASKEXECPOLLRESPONSE._serialized_end=248
156
+ _TASKEXECSTARTREQUEST._serialized_start=251
157
+ _TASKEXECSTARTREQUEST._serialized_end=653
158
+ _TASKEXECSTARTRESPONSE._serialized_start=655
159
+ _TASKEXECSTARTRESPONSE._serialized_end=678
160
+ _TASKEXECSTDINWRITEREQUEST._serialized_start=680
161
+ _TASKEXECSTDINWRITEREQUEST._serialized_end=784
162
+ _TASKEXECSTDINWRITERESPONSE._serialized_start=786
163
+ _TASKEXECSTDINWRITERESPONSE._serialized_end=814
164
+ _TASKEXECSTDIOREADREQUEST._serialized_start=817
165
+ _TASKEXECSTDIOREADREQUEST._serialized_end=974
166
+ _TASKEXECSTDIOREADRESPONSE._serialized_start=976
167
+ _TASKEXECSTDIOREADRESPONSE._serialized_end=1017
168
+ _TASKEXECWAITREQUEST._serialized_start=1019
169
+ _TASKEXECWAITREQUEST._serialized_end=1074
170
+ _TASKEXECWAITRESPONSE._serialized_start=1076
171
+ _TASKEXECWAITRESPONSE._serialized_end=1147
172
+ _TASKMOUNTDIRECTORYREQUEST._serialized_start=1149
173
+ _TASKMOUNTDIRECTORYREQUEST._serialized_end=1225
174
+ _TASKSNAPSHOTDIRECTORYREQUEST._serialized_start=1227
175
+ _TASKSNAPSHOTDIRECTORYREQUEST._serialized_end=1288
176
+ _TASKSNAPSHOTDIRECTORYRESPONSE._serialized_start=1290
177
+ _TASKSNAPSHOTDIRECTORYRESPONSE._serialized_end=1339
178
+ _TASKCOMMANDROUTER._serialized_start=1688
179
+ _TASKCOMMANDROUTER._serialized_end=2553
180
+ # @@protoc_insertion_point(module_scope)
@@ -331,3 +331,54 @@ class TaskExecWaitResponse(google.protobuf.message.Message):
331
331
  def WhichOneof(self, oneof_group: typing_extensions.Literal["exit_status", b"exit_status"]) -> typing_extensions.Literal["code", "signal"] | None: ...
332
332
 
333
333
  global___TaskExecWaitResponse = TaskExecWaitResponse
334
+
335
+ class TaskMountDirectoryRequest(google.protobuf.message.Message):
336
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
337
+
338
+ TASK_ID_FIELD_NUMBER: builtins.int
339
+ PATH_FIELD_NUMBER: builtins.int
340
+ IMAGE_ID_FIELD_NUMBER: builtins.int
341
+ task_id: builtins.str
342
+ path: builtins.bytes
343
+ image_id: builtins.str
344
+ def __init__(
345
+ self,
346
+ *,
347
+ task_id: builtins.str = ...,
348
+ path: builtins.bytes = ...,
349
+ image_id: builtins.str = ...,
350
+ ) -> None: ...
351
+ def ClearField(self, field_name: typing_extensions.Literal["image_id", b"image_id", "path", b"path", "task_id", b"task_id"]) -> None: ...
352
+
353
+ global___TaskMountDirectoryRequest = TaskMountDirectoryRequest
354
+
355
+ class TaskSnapshotDirectoryRequest(google.protobuf.message.Message):
356
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
357
+
358
+ TASK_ID_FIELD_NUMBER: builtins.int
359
+ PATH_FIELD_NUMBER: builtins.int
360
+ task_id: builtins.str
361
+ path: builtins.bytes
362
+ def __init__(
363
+ self,
364
+ *,
365
+ task_id: builtins.str = ...,
366
+ path: builtins.bytes = ...,
367
+ ) -> None: ...
368
+ def ClearField(self, field_name: typing_extensions.Literal["path", b"path", "task_id", b"task_id"]) -> None: ...
369
+
370
+ global___TaskSnapshotDirectoryRequest = TaskSnapshotDirectoryRequest
371
+
372
+ class TaskSnapshotDirectoryResponse(google.protobuf.message.Message):
373
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
374
+
375
+ IMAGE_ID_FIELD_NUMBER: builtins.int
376
+ image_id: builtins.str
377
+ def __init__(
378
+ self,
379
+ *,
380
+ image_id: builtins.str = ...,
381
+ ) -> None: ...
382
+ def ClearField(self, field_name: typing_extensions.Literal["image_id", b"image_id"]) -> None: ...
383
+
384
+ global___TaskSnapshotDirectoryResponse = TaskSnapshotDirectoryResponse