modal 0.72.5__py3-none-any.whl → 0.72.48__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.
Files changed (73) hide show
  1. modal/_container_entrypoint.py +5 -10
  2. modal/_object.py +297 -0
  3. modal/_resolver.py +7 -5
  4. modal/_runtime/container_io_manager.py +0 -11
  5. modal/_runtime/user_code_imports.py +7 -7
  6. modal/_serialization.py +4 -3
  7. modal/_tunnel.py +1 -1
  8. modal/app.py +14 -61
  9. modal/app.pyi +25 -25
  10. modal/cli/app.py +3 -2
  11. modal/cli/container.py +1 -1
  12. modal/cli/import_refs.py +185 -113
  13. modal/cli/launch.py +10 -5
  14. modal/cli/programs/run_jupyter.py +2 -2
  15. modal/cli/programs/vscode.py +3 -3
  16. modal/cli/run.py +134 -68
  17. modal/client.py +1 -0
  18. modal/client.pyi +18 -14
  19. modal/cloud_bucket_mount.py +4 -0
  20. modal/cloud_bucket_mount.pyi +4 -0
  21. modal/cls.py +33 -5
  22. modal/cls.pyi +20 -5
  23. modal/container_process.pyi +8 -6
  24. modal/dict.py +1 -1
  25. modal/dict.pyi +32 -29
  26. modal/environments.py +1 -1
  27. modal/environments.pyi +2 -1
  28. modal/experimental.py +47 -11
  29. modal/experimental.pyi +29 -0
  30. modal/file_io.pyi +30 -28
  31. modal/file_pattern_matcher.py +3 -4
  32. modal/functions.py +31 -23
  33. modal/functions.pyi +57 -50
  34. modal/gpu.py +19 -26
  35. modal/image.py +47 -19
  36. modal/image.pyi +28 -21
  37. modal/io_streams.pyi +14 -12
  38. modal/mount.py +14 -5
  39. modal/mount.pyi +28 -25
  40. modal/network_file_system.py +7 -7
  41. modal/network_file_system.pyi +27 -24
  42. modal/object.py +2 -265
  43. modal/object.pyi +46 -130
  44. modal/parallel_map.py +2 -2
  45. modal/parallel_map.pyi +10 -7
  46. modal/partial_function.py +22 -3
  47. modal/partial_function.pyi +45 -27
  48. modal/proxy.py +1 -1
  49. modal/proxy.pyi +2 -1
  50. modal/queue.py +1 -1
  51. modal/queue.pyi +26 -23
  52. modal/runner.py +14 -3
  53. modal/sandbox.py +11 -7
  54. modal/sandbox.pyi +30 -27
  55. modal/secret.py +1 -1
  56. modal/secret.pyi +2 -1
  57. modal/token_flow.pyi +6 -4
  58. modal/volume.py +1 -1
  59. modal/volume.pyi +36 -33
  60. {modal-0.72.5.dist-info → modal-0.72.48.dist-info}/METADATA +2 -2
  61. {modal-0.72.5.dist-info → modal-0.72.48.dist-info}/RECORD +73 -71
  62. modal_proto/api.proto +151 -4
  63. modal_proto/api_grpc.py +113 -0
  64. modal_proto/api_pb2.py +998 -795
  65. modal_proto/api_pb2.pyi +430 -11
  66. modal_proto/api_pb2_grpc.py +233 -1
  67. modal_proto/api_pb2_grpc.pyi +75 -3
  68. modal_proto/modal_api_grpc.py +7 -0
  69. modal_version/_version_generated.py +1 -1
  70. {modal-0.72.5.dist-info → modal-0.72.48.dist-info}/LICENSE +0 -0
  71. {modal-0.72.5.dist-info → modal-0.72.48.dist-info}/WHEEL +0 -0
  72. {modal-0.72.5.dist-info → modal-0.72.48.dist-info}/entry_points.txt +0 -0
  73. {modal-0.72.5.dist-info → modal-0.72.48.dist-info}/top_level.txt +0 -0
modal_proto/api.proto CHANGED
@@ -4,6 +4,7 @@ package modal.client;
4
4
 
5
5
  import "modal_proto/options.proto";
6
6
  import "google/protobuf/empty.proto";
7
+ import "google/protobuf/struct.proto";
7
8
  import "google/protobuf/wrappers.proto";
8
9
 
9
10
  enum AppDeployVisibility {
@@ -81,6 +82,7 @@ enum ClientType {
81
82
  CLIENT_TYPE_WORKER = 2;
82
83
  CLIENT_TYPE_CONTAINER = 3;
83
84
  CLIENT_TYPE_WEB_SERVER = 5;
85
+ CLIENT_TYPE_NOTEBOOK_KERNEL = 6;
84
86
  }
85
87
 
86
88
  enum CloudProvider {
@@ -150,6 +152,7 @@ enum GPUType {
150
152
  GPU_TYPE_L4 = 9;
151
153
  GPU_TYPE_H100 = 10;
152
154
  GPU_TYPE_L40S = 11;
155
+ GPU_TYPE_H200 = 12;
153
156
  }
154
157
 
155
158
  enum ObjectCreationType {
@@ -337,6 +340,7 @@ message AppGetLogsRequest {
337
340
  string function_id = 5;
338
341
  string input_id = 6;
339
342
  string task_id = 7;
343
+ string function_call_id = 9;
340
344
  FileDescriptor file_descriptor = 8;
341
345
  }
342
346
 
@@ -605,6 +609,8 @@ message CheckpointInfo {
605
609
  int64 size = 5;
606
610
  bool checksum_is_file_index = 6;
607
611
  string original_task_id = 7;
612
+ // snapshot version used to take the checkpoint
613
+ uint32 snapshot_version = 8;
608
614
  }
609
615
 
610
616
  message ClassCreateRequest {
@@ -712,6 +718,7 @@ message CloudBucketMount {
712
718
  bool requester_pays = 6;
713
719
  optional string bucket_endpoint_url = 7;
714
720
  optional string key_prefix = 8;
721
+ optional string oidc_auth_role_arn = 9;
715
722
  }
716
723
 
717
724
  message ContainerArguments { // This is used to pass data from the worker to the container
@@ -1157,7 +1164,7 @@ message Function {
1157
1164
 
1158
1165
  uint32 task_idle_timeout_secs = 25;
1159
1166
 
1160
- optional CloudProvider cloud_provider = 26;
1167
+ optional CloudProvider cloud_provider = 26; // Deprecated at some point
1161
1168
 
1162
1169
  uint32 warm_pool_size = 27;
1163
1170
 
@@ -1251,6 +1258,8 @@ message Function {
1251
1258
  bool method_definitions_set = 75;
1252
1259
 
1253
1260
  bool _experimental_custom_scaling = 76;
1261
+
1262
+ string cloud_provider_str = 77; // Supersedes cloud_provider
1254
1263
  }
1255
1264
 
1256
1265
  message FunctionAsyncInvokeRequest {
@@ -1661,9 +1670,10 @@ message FunctionUpdateSchedulingParamsRequest {
1661
1670
  message FunctionUpdateSchedulingParamsResponse {}
1662
1671
 
1663
1672
  message GPUConfig {
1664
- GPUType type = 1;
1673
+ GPUType type = 1; // Deprecated, at some point
1665
1674
  uint32 count = 2;
1666
1675
  uint32 memory = 3;
1676
+ string gpu_type = 4;
1667
1677
  }
1668
1678
 
1669
1679
  message GeneratorDone { // Sent as the output when a generator finishes running.
@@ -1879,6 +1889,76 @@ message NetworkAccess {
1879
1889
  repeated string allowed_cidrs = 2;
1880
1890
  }
1881
1891
 
1892
+ message NotebookKernelPublishResultsRequest {
1893
+ // See kernelshim.py for the differences between this and `ExecuteResult`.
1894
+ // https://jupyter-client.readthedocs.io/en/stable/messaging.html#execution-results
1895
+ message ExecuteReply {
1896
+ string status = 1;
1897
+ uint32 execution_count = 2;
1898
+ }
1899
+
1900
+ // IOPub message or reply received from the kernel for a cell.
1901
+ message CellResult {
1902
+ string cell_id = 1;
1903
+
1904
+ oneof result_type {
1905
+ // Persistent output that is saved in the notebook.
1906
+ NotebookOutput output = 2;
1907
+
1908
+ // Clear all previous outputs of the cell.
1909
+ bool clear_output = 3;
1910
+
1911
+ // Cell has finished executing, return the kernel's execute_reply.
1912
+ ExecuteReply execute_reply = 4;
1913
+ }
1914
+ }
1915
+
1916
+ string notebook_id = 1;
1917
+ repeated CellResult results = 2;
1918
+ }
1919
+
1920
+ // A single output from a notebook. When you execute a cell, it produces an
1921
+ // array of these outputs as the code runs.
1922
+ //
1923
+ // https://github.com/jupyter/nbformat/blob/v5.10.4/nbformat/v4/nbformat.v4.schema.json#L301-L309
1924
+ message NotebookOutput {
1925
+ // Result of executing a code cell.
1926
+ message ExecuteResult {
1927
+ uint32 execution_count = 1;
1928
+ google.protobuf.Struct data = 2; // mimebundle
1929
+ google.protobuf.Struct metadata = 3;
1930
+ }
1931
+
1932
+ // Data displayed as a result of code cell execution.
1933
+ message DisplayData {
1934
+ google.protobuf.Struct data = 1; // mimebundle
1935
+ google.protobuf.Struct metadata = 2;
1936
+
1937
+ // This should not be included in saved notebook.
1938
+ optional string transient_display_id = 3;
1939
+ }
1940
+
1941
+ // Stream output from a code cell (stdout / stderr).
1942
+ message Stream {
1943
+ string name = 1; // stdout | stderr
1944
+ string text = 2; // multiline_string
1945
+ }
1946
+
1947
+ // Output of an error that occurred during code cell execution.
1948
+ message Error {
1949
+ string ename = 1;
1950
+ string evalue = 2;
1951
+ repeated string traceback = 3;
1952
+ }
1953
+
1954
+ oneof output_type {
1955
+ ExecuteResult execute_result = 1;
1956
+ DisplayData display_data = 2;
1957
+ Stream stream = 3;
1958
+ Error error = 4;
1959
+ }
1960
+ }
1961
+
1882
1962
  message Object {
1883
1963
  string object_id = 1;
1884
1964
  oneof handle_metadata_oneof {
@@ -1925,6 +2005,14 @@ message Proxy {
1925
2005
  repeated ProxyIp proxy_ips = 4;
1926
2006
  }
1927
2007
 
2008
+ message ProxyAddIpRequest {
2009
+ string proxy_id = 1 [ (modal.options.audit_target_attr) = true ];
2010
+ }
2011
+
2012
+ message ProxyAddIpResponse {
2013
+ ProxyIp proxy_ip = 1;
2014
+ }
2015
+
1928
2016
  message ProxyCreateRequest {
1929
2017
  string name = 1 [ (modal.options.audit_target_attr) = true ];
1930
2018
  string environment_name = 2;
@@ -1977,6 +2065,10 @@ message ProxyListResponse {
1977
2065
  repeated Proxy proxies = 1;
1978
2066
  }
1979
2067
 
2068
+ message ProxyRemoveIpRequest {
2069
+ string proxy_ip = 1 [ (modal.options.audit_target_attr) = true ];
2070
+ }
2071
+
1980
2072
  message QueueClearRequest {
1981
2073
  string queue_id = 1;
1982
2074
  bytes partition_key = 2;
@@ -2116,7 +2208,7 @@ message Sandbox {
2116
2208
  repeated string secret_ids = 4;
2117
2209
 
2118
2210
  Resources resources = 5;
2119
- CloudProvider cloud_provider = 6;
2211
+ CloudProvider cloud_provider = 6; // Deprecated at some point
2120
2212
 
2121
2213
  uint32 timeout_secs = 7;
2122
2214
 
@@ -2152,6 +2244,16 @@ message Sandbox {
2152
2244
  NetworkAccess network_access = 22;
2153
2245
 
2154
2246
  optional string proxy_id = 23;
2247
+
2248
+ // Enable snapshotting the sandbox (both memory and filesystem).
2249
+ // This doesn't need to be enabled to save the filesystem as an image (i.e. a filesystem-only snapshot).
2250
+ bool enable_snapshot = 24;
2251
+
2252
+ // Used to pin gVisor version for memory-snapshottable sandboxes.
2253
+ // This field is set by the server, not the client.
2254
+ optional uint32 snapshot_version = 25;
2255
+
2256
+ string cloud_provider_str = 26; // Supersedes cloud_provider
2155
2257
  }
2156
2258
 
2157
2259
  message SandboxCreateRequest {
@@ -2173,10 +2275,13 @@ message SandboxGetLogsRequest {
2173
2275
 
2174
2276
  message SandboxGetTaskIdRequest {
2175
2277
  string sandbox_id = 1;
2278
+ optional float timeout = 2; // Legacy clients do not provide a timeout. New clients must always provide a timeout.
2279
+ bool wait_until_ready = 3; // If true, waits until the container's postStart hook has been run before returning. Useful for detecting init failures.
2176
2280
  }
2177
2281
 
2178
2282
  message SandboxGetTaskIdResponse {
2179
- string task_id = 1;
2283
+ optional string task_id = 1; // This is None if the sandbox was terminated before a task could be scheduled.
2284
+ optional GenericResult task_result = 2; // If the task has already exited, this is the result.
2180
2285
  }
2181
2286
 
2182
2287
  message SandboxGetTunnelsRequest {
@@ -2213,6 +2318,22 @@ message SandboxListResponse {
2213
2318
  repeated SandboxInfo sandboxes = 1;
2214
2319
  }
2215
2320
 
2321
+ message SandboxRestoreRequest {
2322
+ string snapshot_id = 1;
2323
+ }
2324
+
2325
+ message SandboxRestoreResponse {
2326
+ string sandbox_id = 1;
2327
+ }
2328
+
2329
+ message SandboxSnapshotFromIdRequest {
2330
+ string snapshot_id = 1;
2331
+ }
2332
+
2333
+ message SandboxSnapshotFromIdResponse {
2334
+ string snapshot_id = 1;
2335
+ }
2336
+
2216
2337
  message SandboxSnapshotFsRequest {
2217
2338
  string sandbox_id = 1;
2218
2339
  float timeout = 2;
@@ -2225,6 +2346,23 @@ message SandboxSnapshotFsResponse {
2225
2346
  ImageMetadata image_metadata = 3;
2226
2347
  }
2227
2348
 
2349
+ message SandboxSnapshotRequest {
2350
+ string sandbox_id = 1;
2351
+ }
2352
+
2353
+ message SandboxSnapshotResponse {
2354
+ string snapshot_id = 1;
2355
+ }
2356
+
2357
+ message SandboxSnapshotWaitRequest {
2358
+ string snapshot_id = 1;
2359
+ float timeout = 2;
2360
+ }
2361
+
2362
+ message SandboxSnapshotWaitResponse {
2363
+ GenericResult result = 1;
2364
+ }
2365
+
2228
2366
  message SandboxStdinWriteRequest {
2229
2367
  string sandbox_id = 1;
2230
2368
  bytes input = 2;
@@ -2820,12 +2958,17 @@ service ModalClient {
2820
2958
  rpc MountGetOrCreate(MountGetOrCreateRequest) returns (MountGetOrCreateResponse);
2821
2959
  rpc MountPutFile(MountPutFileRequest) returns (MountPutFileResponse);
2822
2960
 
2961
+ // Notebooks
2962
+ rpc NotebookKernelPublishResults(NotebookKernelPublishResultsRequest) returns (google.protobuf.Empty);
2963
+
2823
2964
  // Proxies
2965
+ rpc ProxyAddIp(ProxyAddIpRequest) returns (ProxyAddIpResponse);
2824
2966
  rpc ProxyCreate(ProxyCreateRequest) returns (ProxyCreateResponse);
2825
2967
  rpc ProxyDelete(ProxyDeleteRequest) returns (google.protobuf.Empty);
2826
2968
  rpc ProxyGet(ProxyGetRequest) returns (ProxyGetResponse);
2827
2969
  rpc ProxyGetOrCreate(ProxyGetOrCreateRequest) returns (ProxyGetOrCreateResponse);
2828
2970
  rpc ProxyList(google.protobuf.Empty) returns (ProxyListResponse);
2971
+ rpc ProxyRemoveIp(ProxyRemoveIpRequest) returns (google.protobuf.Empty);
2829
2972
 
2830
2973
  // Queues
2831
2974
  rpc QueueClear(QueueClearRequest) returns (google.protobuf.Empty);
@@ -2844,7 +2987,11 @@ service ModalClient {
2844
2987
  rpc SandboxGetTaskId(SandboxGetTaskIdRequest) returns (SandboxGetTaskIdResponse); // needed for modal container exec
2845
2988
  rpc SandboxGetTunnels(SandboxGetTunnelsRequest) returns (SandboxGetTunnelsResponse);
2846
2989
  rpc SandboxList(SandboxListRequest) returns (SandboxListResponse);
2990
+ rpc SandboxRestore(SandboxRestoreRequest) returns (SandboxRestoreResponse);
2991
+ rpc SandboxSnapshot(SandboxSnapshotRequest) returns (SandboxSnapshotResponse);
2992
+ rpc SandboxSnapshotFromId(SandboxSnapshotFromIdRequest) returns (SandboxSnapshotFromIdResponse);
2847
2993
  rpc SandboxSnapshotFs(SandboxSnapshotFsRequest) returns (SandboxSnapshotFsResponse);
2994
+ rpc SandboxSnapshotWait(SandboxSnapshotWaitRequest) returns (SandboxSnapshotWaitResponse);
2848
2995
  rpc SandboxStdinWrite(SandboxStdinWriteRequest) returns (SandboxStdinWriteResponse);
2849
2996
  rpc SandboxTagsSet(SandboxTagsSetRequest) returns (google.protobuf.Empty);
2850
2997
  rpc SandboxTerminate(SandboxTerminateRequest) returns (SandboxTerminateResponse);
modal_proto/api_grpc.py CHANGED
@@ -11,6 +11,7 @@ if typing.TYPE_CHECKING:
11
11
 
12
12
  import modal_proto.options_pb2
13
13
  import google.protobuf.empty_pb2
14
+ import google.protobuf.struct_pb2
14
15
  import google.protobuf.wrappers_pb2
15
16
  import modal_proto.api_pb2
16
17
 
@@ -329,6 +330,14 @@ class ModalClientBase(abc.ABC):
329
330
  async def MountPutFile(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.MountPutFileRequest, modal_proto.api_pb2.MountPutFileResponse]') -> None:
330
331
  pass
331
332
 
333
+ @abc.abstractmethod
334
+ async def NotebookKernelPublishResults(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.NotebookKernelPublishResultsRequest, google.protobuf.empty_pb2.Empty]') -> None:
335
+ pass
336
+
337
+ @abc.abstractmethod
338
+ async def ProxyAddIp(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.ProxyAddIpRequest, modal_proto.api_pb2.ProxyAddIpResponse]') -> None:
339
+ pass
340
+
332
341
  @abc.abstractmethod
333
342
  async def ProxyCreate(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.ProxyCreateRequest, modal_proto.api_pb2.ProxyCreateResponse]') -> None:
334
343
  pass
@@ -349,6 +358,10 @@ class ModalClientBase(abc.ABC):
349
358
  async def ProxyList(self, stream: 'grpclib.server.Stream[google.protobuf.empty_pb2.Empty, modal_proto.api_pb2.ProxyListResponse]') -> None:
350
359
  pass
351
360
 
361
+ @abc.abstractmethod
362
+ async def ProxyRemoveIp(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.ProxyRemoveIpRequest, google.protobuf.empty_pb2.Empty]') -> None:
363
+ pass
364
+
352
365
  @abc.abstractmethod
353
366
  async def QueueClear(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.QueueClearRequest, google.protobuf.empty_pb2.Empty]') -> None:
354
367
  pass
@@ -405,10 +418,26 @@ class ModalClientBase(abc.ABC):
405
418
  async def SandboxList(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxListRequest, modal_proto.api_pb2.SandboxListResponse]') -> None:
406
419
  pass
407
420
 
421
+ @abc.abstractmethod
422
+ async def SandboxRestore(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxRestoreRequest, modal_proto.api_pb2.SandboxRestoreResponse]') -> None:
423
+ pass
424
+
425
+ @abc.abstractmethod
426
+ async def SandboxSnapshot(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxSnapshotRequest, modal_proto.api_pb2.SandboxSnapshotResponse]') -> None:
427
+ pass
428
+
429
+ @abc.abstractmethod
430
+ async def SandboxSnapshotFromId(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxSnapshotFromIdRequest, modal_proto.api_pb2.SandboxSnapshotFromIdResponse]') -> None:
431
+ pass
432
+
408
433
  @abc.abstractmethod
409
434
  async def SandboxSnapshotFs(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxSnapshotFsRequest, modal_proto.api_pb2.SandboxSnapshotFsResponse]') -> None:
410
435
  pass
411
436
 
437
+ @abc.abstractmethod
438
+ async def SandboxSnapshotWait(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxSnapshotWaitRequest, modal_proto.api_pb2.SandboxSnapshotWaitResponse]') -> None:
439
+ pass
440
+
412
441
  @abc.abstractmethod
413
442
  async def SandboxStdinWrite(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxStdinWriteRequest, modal_proto.api_pb2.SandboxStdinWriteResponse]') -> None:
414
443
  pass
@@ -1027,6 +1056,18 @@ class ModalClientBase(abc.ABC):
1027
1056
  modal_proto.api_pb2.MountPutFileRequest,
1028
1057
  modal_proto.api_pb2.MountPutFileResponse,
1029
1058
  ),
1059
+ '/modal.client.ModalClient/NotebookKernelPublishResults': grpclib.const.Handler(
1060
+ self.NotebookKernelPublishResults,
1061
+ grpclib.const.Cardinality.UNARY_UNARY,
1062
+ modal_proto.api_pb2.NotebookKernelPublishResultsRequest,
1063
+ google.protobuf.empty_pb2.Empty,
1064
+ ),
1065
+ '/modal.client.ModalClient/ProxyAddIp': grpclib.const.Handler(
1066
+ self.ProxyAddIp,
1067
+ grpclib.const.Cardinality.UNARY_UNARY,
1068
+ modal_proto.api_pb2.ProxyAddIpRequest,
1069
+ modal_proto.api_pb2.ProxyAddIpResponse,
1070
+ ),
1030
1071
  '/modal.client.ModalClient/ProxyCreate': grpclib.const.Handler(
1031
1072
  self.ProxyCreate,
1032
1073
  grpclib.const.Cardinality.UNARY_UNARY,
@@ -1057,6 +1098,12 @@ class ModalClientBase(abc.ABC):
1057
1098
  google.protobuf.empty_pb2.Empty,
1058
1099
  modal_proto.api_pb2.ProxyListResponse,
1059
1100
  ),
1101
+ '/modal.client.ModalClient/ProxyRemoveIp': grpclib.const.Handler(
1102
+ self.ProxyRemoveIp,
1103
+ grpclib.const.Cardinality.UNARY_UNARY,
1104
+ modal_proto.api_pb2.ProxyRemoveIpRequest,
1105
+ google.protobuf.empty_pb2.Empty,
1106
+ ),
1060
1107
  '/modal.client.ModalClient/QueueClear': grpclib.const.Handler(
1061
1108
  self.QueueClear,
1062
1109
  grpclib.const.Cardinality.UNARY_UNARY,
@@ -1141,12 +1188,36 @@ class ModalClientBase(abc.ABC):
1141
1188
  modal_proto.api_pb2.SandboxListRequest,
1142
1189
  modal_proto.api_pb2.SandboxListResponse,
1143
1190
  ),
1191
+ '/modal.client.ModalClient/SandboxRestore': grpclib.const.Handler(
1192
+ self.SandboxRestore,
1193
+ grpclib.const.Cardinality.UNARY_UNARY,
1194
+ modal_proto.api_pb2.SandboxRestoreRequest,
1195
+ modal_proto.api_pb2.SandboxRestoreResponse,
1196
+ ),
1197
+ '/modal.client.ModalClient/SandboxSnapshot': grpclib.const.Handler(
1198
+ self.SandboxSnapshot,
1199
+ grpclib.const.Cardinality.UNARY_UNARY,
1200
+ modal_proto.api_pb2.SandboxSnapshotRequest,
1201
+ modal_proto.api_pb2.SandboxSnapshotResponse,
1202
+ ),
1203
+ '/modal.client.ModalClient/SandboxSnapshotFromId': grpclib.const.Handler(
1204
+ self.SandboxSnapshotFromId,
1205
+ grpclib.const.Cardinality.UNARY_UNARY,
1206
+ modal_proto.api_pb2.SandboxSnapshotFromIdRequest,
1207
+ modal_proto.api_pb2.SandboxSnapshotFromIdResponse,
1208
+ ),
1144
1209
  '/modal.client.ModalClient/SandboxSnapshotFs': grpclib.const.Handler(
1145
1210
  self.SandboxSnapshotFs,
1146
1211
  grpclib.const.Cardinality.UNARY_UNARY,
1147
1212
  modal_proto.api_pb2.SandboxSnapshotFsRequest,
1148
1213
  modal_proto.api_pb2.SandboxSnapshotFsResponse,
1149
1214
  ),
1215
+ '/modal.client.ModalClient/SandboxSnapshotWait': grpclib.const.Handler(
1216
+ self.SandboxSnapshotWait,
1217
+ grpclib.const.Cardinality.UNARY_UNARY,
1218
+ modal_proto.api_pb2.SandboxSnapshotWaitRequest,
1219
+ modal_proto.api_pb2.SandboxSnapshotWaitResponse,
1220
+ ),
1150
1221
  '/modal.client.ModalClient/SandboxStdinWrite': grpclib.const.Handler(
1151
1222
  self.SandboxStdinWrite,
1152
1223
  grpclib.const.Cardinality.UNARY_UNARY,
@@ -1843,6 +1914,18 @@ class ModalClientStub:
1843
1914
  modal_proto.api_pb2.MountPutFileRequest,
1844
1915
  modal_proto.api_pb2.MountPutFileResponse,
1845
1916
  )
1917
+ self.NotebookKernelPublishResults = grpclib.client.UnaryUnaryMethod(
1918
+ channel,
1919
+ '/modal.client.ModalClient/NotebookKernelPublishResults',
1920
+ modal_proto.api_pb2.NotebookKernelPublishResultsRequest,
1921
+ google.protobuf.empty_pb2.Empty,
1922
+ )
1923
+ self.ProxyAddIp = grpclib.client.UnaryUnaryMethod(
1924
+ channel,
1925
+ '/modal.client.ModalClient/ProxyAddIp',
1926
+ modal_proto.api_pb2.ProxyAddIpRequest,
1927
+ modal_proto.api_pb2.ProxyAddIpResponse,
1928
+ )
1846
1929
  self.ProxyCreate = grpclib.client.UnaryUnaryMethod(
1847
1930
  channel,
1848
1931
  '/modal.client.ModalClient/ProxyCreate',
@@ -1873,6 +1956,12 @@ class ModalClientStub:
1873
1956
  google.protobuf.empty_pb2.Empty,
1874
1957
  modal_proto.api_pb2.ProxyListResponse,
1875
1958
  )
1959
+ self.ProxyRemoveIp = grpclib.client.UnaryUnaryMethod(
1960
+ channel,
1961
+ '/modal.client.ModalClient/ProxyRemoveIp',
1962
+ modal_proto.api_pb2.ProxyRemoveIpRequest,
1963
+ google.protobuf.empty_pb2.Empty,
1964
+ )
1876
1965
  self.QueueClear = grpclib.client.UnaryUnaryMethod(
1877
1966
  channel,
1878
1967
  '/modal.client.ModalClient/QueueClear',
@@ -1957,12 +2046,36 @@ class ModalClientStub:
1957
2046
  modal_proto.api_pb2.SandboxListRequest,
1958
2047
  modal_proto.api_pb2.SandboxListResponse,
1959
2048
  )
2049
+ self.SandboxRestore = grpclib.client.UnaryUnaryMethod(
2050
+ channel,
2051
+ '/modal.client.ModalClient/SandboxRestore',
2052
+ modal_proto.api_pb2.SandboxRestoreRequest,
2053
+ modal_proto.api_pb2.SandboxRestoreResponse,
2054
+ )
2055
+ self.SandboxSnapshot = grpclib.client.UnaryUnaryMethod(
2056
+ channel,
2057
+ '/modal.client.ModalClient/SandboxSnapshot',
2058
+ modal_proto.api_pb2.SandboxSnapshotRequest,
2059
+ modal_proto.api_pb2.SandboxSnapshotResponse,
2060
+ )
2061
+ self.SandboxSnapshotFromId = grpclib.client.UnaryUnaryMethod(
2062
+ channel,
2063
+ '/modal.client.ModalClient/SandboxSnapshotFromId',
2064
+ modal_proto.api_pb2.SandboxSnapshotFromIdRequest,
2065
+ modal_proto.api_pb2.SandboxSnapshotFromIdResponse,
2066
+ )
1960
2067
  self.SandboxSnapshotFs = grpclib.client.UnaryUnaryMethod(
1961
2068
  channel,
1962
2069
  '/modal.client.ModalClient/SandboxSnapshotFs',
1963
2070
  modal_proto.api_pb2.SandboxSnapshotFsRequest,
1964
2071
  modal_proto.api_pb2.SandboxSnapshotFsResponse,
1965
2072
  )
2073
+ self.SandboxSnapshotWait = grpclib.client.UnaryUnaryMethod(
2074
+ channel,
2075
+ '/modal.client.ModalClient/SandboxSnapshotWait',
2076
+ modal_proto.api_pb2.SandboxSnapshotWaitRequest,
2077
+ modal_proto.api_pb2.SandboxSnapshotWaitResponse,
2078
+ )
1966
2079
  self.SandboxStdinWrite = grpclib.client.UnaryUnaryMethod(
1967
2080
  channel,
1968
2081
  '/modal.client.ModalClient/SandboxStdinWrite',