mlflow-modal-deploy 0.2.0__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.
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2025 Debu Sinha
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,242 @@
1
+ Metadata-Version: 2.4
2
+ Name: mlflow-modal-deploy
3
+ Version: 0.2.0
4
+ Summary: MLflow deployment plugin for Modal serverless GPU infrastructure (actively maintained)
5
+ Home-page: https://github.com/debu-sinha/mlflow-modal
6
+ Author: Debu Sinha
7
+ Author-email: debu.sinha@example.com
8
+ License: Apache-2.0
9
+ Project-URL: Homepage, https://github.com/debu-sinha/mlflow-modal-deploy
10
+ Project-URL: Repository, https://github.com/debu-sinha/mlflow-modal-deploy
11
+ Project-URL: Issues, https://github.com/debu-sinha/mlflow-modal-deploy/issues
12
+ Keywords: mlflow,modal,deployment,serverless,machine-learning
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: mlflow>=2.10.0
27
+ Requires-Dist: modal>=0.64.0
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
30
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
31
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
32
+ Requires-Dist: twine>=4.0.0; extra == "dev"
33
+ Requires-Dist: build>=1.0.0; extra == "dev"
34
+ Dynamic: author-email
35
+ Dynamic: home-page
36
+ Dynamic: license-file
37
+ Dynamic: requires-python
38
+
39
+ # mlflow-modal-deploy
40
+
41
+ [![CI](https://github.com/debu-sinha/mlflow-modal-deploy/actions/workflows/ci.yml/badge.svg)](https://github.com/debu-sinha/mlflow-modal-deploy/actions/workflows/ci.yml)
42
+ [![PyPI version](https://badge.fury.io/py/mlflow-modal-deploy.svg)](https://badge.fury.io/py/mlflow-modal-deploy)
43
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
44
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
45
+
46
+ Deploy MLflow models to [Modal](https://modal.com)'s serverless GPU infrastructure with a single command.
47
+
48
+ ## Installation
49
+
50
+ ```bash
51
+ pip install mlflow-modal-deploy
52
+ ```
53
+
54
+ ## Features
55
+
56
+ - **One-command deployment**: Deploy any MLflow model to Modal's serverless infrastructure
57
+ - **GPU support**: T4, L4, A10G, A100, A100-80GB, H100
58
+ - **Auto-scaling**: Configure min/max containers, scale-down windows
59
+ - **Dynamic batching**: Built-in request batching for high-throughput workloads
60
+ - **Automatic dependency detection**: Extracts requirements from model artifacts
61
+ - **Wheel file support**: Handles private dependencies packaged as wheel files
62
+ - **MLflow CLI integration**: Use familiar `mlflow deployments` commands
63
+
64
+ ## Quick Start
65
+
66
+ ### Python API
67
+
68
+ ```python
69
+ from mlflow.deployments import get_deploy_client
70
+
71
+ # Get the Modal deployment client
72
+ client = get_deploy_client("modal")
73
+
74
+ # Deploy a model
75
+ deployment = client.create_deployment(
76
+ name="my-classifier",
77
+ model_uri="runs:/abc123/model",
78
+ config={
79
+ "gpu": "T4",
80
+ "memory": 2048,
81
+ "min_containers": 1,
82
+ }
83
+ )
84
+
85
+ print(f"Deployed to: {deployment['endpoint_url']}")
86
+
87
+ # Make predictions
88
+ predictions = client.predict(
89
+ deployment_name="my-classifier",
90
+ inputs={"feature1": [1, 2, 3], "feature2": [4, 5, 6]}
91
+ )
92
+ ```
93
+
94
+ ### CLI
95
+
96
+ ```bash
97
+ # Deploy a model
98
+ mlflow deployments create -t modal -m runs:/abc123/model --name my-model
99
+
100
+ # Deploy with GPU
101
+ mlflow deployments create -t modal -m runs:/abc123/model --name gpu-model \
102
+ -C gpu=T4 -C memory=4096
103
+
104
+ # List deployments
105
+ mlflow deployments list -t modal
106
+
107
+ # Get deployment info
108
+ mlflow deployments get -t modal --name my-model
109
+
110
+ # Delete deployment
111
+ mlflow deployments delete -t modal --name my-model
112
+ ```
113
+
114
+ ## Configuration Options
115
+
116
+ | Option | Type | Default | Description |
117
+ |--------|------|---------|-------------|
118
+ | `gpu` | str | None | GPU type: T4, L4, A10G, A100, A100-80GB, H100 |
119
+ | `memory` | int | 512 | Memory allocation in MB |
120
+ | `cpu` | float | 1.0 | CPU cores |
121
+ | `timeout` | int | 300 | Request timeout in seconds |
122
+ | `container_idle_timeout` | int | 60 | Container idle timeout in seconds |
123
+ | `min_containers` | int | 0 | Minimum warm containers |
124
+ | `max_containers` | int | None | Maximum containers |
125
+ | `enable_batching` | bool | False | Enable dynamic batching |
126
+ | `max_batch_size` | int | 8 | Max batch size when batching enabled |
127
+ | `batch_wait_ms` | int | 100 | Batch wait time in milliseconds |
128
+ | `python_version` | str | auto | Python version (auto-detected from model) |
129
+
130
+ ## Authentication
131
+
132
+ Configure Modal authentication before deploying:
133
+
134
+ ```bash
135
+ # Interactive setup
136
+ modal setup
137
+
138
+ # Or use environment variables
139
+ export MODAL_TOKEN_ID=your-token-id
140
+ export MODAL_TOKEN_SECRET=your-token-secret
141
+ ```
142
+
143
+ ## Advanced Usage
144
+
145
+ ### Deploy to Specific Workspace
146
+
147
+ ```python
148
+ # Use workspace-specific URI
149
+ client = get_deploy_client("modal:/production")
150
+ ```
151
+
152
+ Or via CLI:
153
+
154
+ ```bash
155
+ mlflow deployments create -t modal:/production -m runs:/abc123/model --name my-model
156
+ ```
157
+
158
+ ### High-Throughput Deployment with Batching
159
+
160
+ ```python
161
+ client.create_deployment(
162
+ name="batch-classifier",
163
+ model_uri="runs:/abc123/model",
164
+ config={
165
+ "gpu": "A100",
166
+ "enable_batching": True,
167
+ "max_batch_size": 32,
168
+ "batch_wait_ms": 50,
169
+ "min_containers": 2,
170
+ "max_containers": 20,
171
+ }
172
+ )
173
+ ```
174
+
175
+ ### Models with Private Dependencies
176
+
177
+ If your model includes wheel files in the `code/` directory, they are automatically detected and installed:
178
+
179
+ ```
180
+ model/
181
+ ├── MLmodel
182
+ ├── requirements.txt
183
+ ├── code/
184
+ │ └── my_private_package-1.0.0-py3-none-any.whl # Auto-detected
185
+ └── ...
186
+ ```
187
+
188
+ ### Local Development
189
+
190
+ Test your deployment locally before deploying to Modal:
191
+
192
+ ```python
193
+ from mlflow_modal import run_local
194
+
195
+ run_local(
196
+ target_uri="modal",
197
+ name="test-model",
198
+ model_uri="runs:/abc123/model",
199
+ config={"gpu": "T4"}
200
+ )
201
+ ```
202
+
203
+ ## Requirements
204
+
205
+ - Python 3.10+
206
+ - MLflow 2.10.0+
207
+ - Modal 0.64.0+
208
+
209
+ ## Contributing
210
+
211
+ Contributions welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
212
+
213
+ ### Development Setup
214
+
215
+ ```bash
216
+ # Clone the repository
217
+ git clone https://github.com/debu-sinha/mlflow-modal-deploy.git
218
+ cd mlflow-modal-deploy
219
+
220
+ # Install with dev dependencies
221
+ uv sync --extra dev
222
+
223
+ # Install pre-commit hooks
224
+ uv run pre-commit install
225
+
226
+ # Run tests
227
+ uv run pytest tests/ -v
228
+ ```
229
+
230
+ ## License
231
+
232
+ Apache License 2.0
233
+
234
+ ## Acknowledgments
235
+
236
+ - [MLflow](https://mlflow.org/) - Open source platform for the ML lifecycle
237
+ - [Modal](https://modal.com/) - Serverless cloud for AI/ML
238
+
239
+ ## Support
240
+
241
+ - [GitHub Issues](https://github.com/debu-sinha/mlflow-modal-deploy/issues) - Bug reports and feature requests
242
+ - [MLflow Slack](https://mlflow.org/slack) - Community discussion
@@ -0,0 +1,204 @@
1
+ # mlflow-modal-deploy
2
+
3
+ [![CI](https://github.com/debu-sinha/mlflow-modal-deploy/actions/workflows/ci.yml/badge.svg)](https://github.com/debu-sinha/mlflow-modal-deploy/actions/workflows/ci.yml)
4
+ [![PyPI version](https://badge.fury.io/py/mlflow-modal-deploy.svg)](https://badge.fury.io/py/mlflow-modal-deploy)
5
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
7
+
8
+ Deploy MLflow models to [Modal](https://modal.com)'s serverless GPU infrastructure with a single command.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pip install mlflow-modal-deploy
14
+ ```
15
+
16
+ ## Features
17
+
18
+ - **One-command deployment**: Deploy any MLflow model to Modal's serverless infrastructure
19
+ - **GPU support**: T4, L4, A10G, A100, A100-80GB, H100
20
+ - **Auto-scaling**: Configure min/max containers, scale-down windows
21
+ - **Dynamic batching**: Built-in request batching for high-throughput workloads
22
+ - **Automatic dependency detection**: Extracts requirements from model artifacts
23
+ - **Wheel file support**: Handles private dependencies packaged as wheel files
24
+ - **MLflow CLI integration**: Use familiar `mlflow deployments` commands
25
+
26
+ ## Quick Start
27
+
28
+ ### Python API
29
+
30
+ ```python
31
+ from mlflow.deployments import get_deploy_client
32
+
33
+ # Get the Modal deployment client
34
+ client = get_deploy_client("modal")
35
+
36
+ # Deploy a model
37
+ deployment = client.create_deployment(
38
+ name="my-classifier",
39
+ model_uri="runs:/abc123/model",
40
+ config={
41
+ "gpu": "T4",
42
+ "memory": 2048,
43
+ "min_containers": 1,
44
+ }
45
+ )
46
+
47
+ print(f"Deployed to: {deployment['endpoint_url']}")
48
+
49
+ # Make predictions
50
+ predictions = client.predict(
51
+ deployment_name="my-classifier",
52
+ inputs={"feature1": [1, 2, 3], "feature2": [4, 5, 6]}
53
+ )
54
+ ```
55
+
56
+ ### CLI
57
+
58
+ ```bash
59
+ # Deploy a model
60
+ mlflow deployments create -t modal -m runs:/abc123/model --name my-model
61
+
62
+ # Deploy with GPU
63
+ mlflow deployments create -t modal -m runs:/abc123/model --name gpu-model \
64
+ -C gpu=T4 -C memory=4096
65
+
66
+ # List deployments
67
+ mlflow deployments list -t modal
68
+
69
+ # Get deployment info
70
+ mlflow deployments get -t modal --name my-model
71
+
72
+ # Delete deployment
73
+ mlflow deployments delete -t modal --name my-model
74
+ ```
75
+
76
+ ## Configuration Options
77
+
78
+ | Option | Type | Default | Description |
79
+ |--------|------|---------|-------------|
80
+ | `gpu` | str | None | GPU type: T4, L4, A10G, A100, A100-80GB, H100 |
81
+ | `memory` | int | 512 | Memory allocation in MB |
82
+ | `cpu` | float | 1.0 | CPU cores |
83
+ | `timeout` | int | 300 | Request timeout in seconds |
84
+ | `container_idle_timeout` | int | 60 | Container idle timeout in seconds |
85
+ | `min_containers` | int | 0 | Minimum warm containers |
86
+ | `max_containers` | int | None | Maximum containers |
87
+ | `enable_batching` | bool | False | Enable dynamic batching |
88
+ | `max_batch_size` | int | 8 | Max batch size when batching enabled |
89
+ | `batch_wait_ms` | int | 100 | Batch wait time in milliseconds |
90
+ | `python_version` | str | auto | Python version (auto-detected from model) |
91
+
92
+ ## Authentication
93
+
94
+ Configure Modal authentication before deploying:
95
+
96
+ ```bash
97
+ # Interactive setup
98
+ modal setup
99
+
100
+ # Or use environment variables
101
+ export MODAL_TOKEN_ID=your-token-id
102
+ export MODAL_TOKEN_SECRET=your-token-secret
103
+ ```
104
+
105
+ ## Advanced Usage
106
+
107
+ ### Deploy to Specific Workspace
108
+
109
+ ```python
110
+ # Use workspace-specific URI
111
+ client = get_deploy_client("modal:/production")
112
+ ```
113
+
114
+ Or via CLI:
115
+
116
+ ```bash
117
+ mlflow deployments create -t modal:/production -m runs:/abc123/model --name my-model
118
+ ```
119
+
120
+ ### High-Throughput Deployment with Batching
121
+
122
+ ```python
123
+ client.create_deployment(
124
+ name="batch-classifier",
125
+ model_uri="runs:/abc123/model",
126
+ config={
127
+ "gpu": "A100",
128
+ "enable_batching": True,
129
+ "max_batch_size": 32,
130
+ "batch_wait_ms": 50,
131
+ "min_containers": 2,
132
+ "max_containers": 20,
133
+ }
134
+ )
135
+ ```
136
+
137
+ ### Models with Private Dependencies
138
+
139
+ If your model includes wheel files in the `code/` directory, they are automatically detected and installed:
140
+
141
+ ```
142
+ model/
143
+ ├── MLmodel
144
+ ├── requirements.txt
145
+ ├── code/
146
+ │ └── my_private_package-1.0.0-py3-none-any.whl # Auto-detected
147
+ └── ...
148
+ ```
149
+
150
+ ### Local Development
151
+
152
+ Test your deployment locally before deploying to Modal:
153
+
154
+ ```python
155
+ from mlflow_modal import run_local
156
+
157
+ run_local(
158
+ target_uri="modal",
159
+ name="test-model",
160
+ model_uri="runs:/abc123/model",
161
+ config={"gpu": "T4"}
162
+ )
163
+ ```
164
+
165
+ ## Requirements
166
+
167
+ - Python 3.10+
168
+ - MLflow 2.10.0+
169
+ - Modal 0.64.0+
170
+
171
+ ## Contributing
172
+
173
+ Contributions welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
174
+
175
+ ### Development Setup
176
+
177
+ ```bash
178
+ # Clone the repository
179
+ git clone https://github.com/debu-sinha/mlflow-modal-deploy.git
180
+ cd mlflow-modal-deploy
181
+
182
+ # Install with dev dependencies
183
+ uv sync --extra dev
184
+
185
+ # Install pre-commit hooks
186
+ uv run pre-commit install
187
+
188
+ # Run tests
189
+ uv run pytest tests/ -v
190
+ ```
191
+
192
+ ## License
193
+
194
+ Apache License 2.0
195
+
196
+ ## Acknowledgments
197
+
198
+ - [MLflow](https://mlflow.org/) - Open source platform for the ML lifecycle
199
+ - [Modal](https://modal.com/) - Serverless cloud for AI/ML
200
+
201
+ ## Support
202
+
203
+ - [GitHub Issues](https://github.com/debu-sinha/mlflow-modal-deploy/issues) - Bug reports and feature requests
204
+ - [MLflow Slack](https://mlflow.org/slack) - Community discussion
@@ -0,0 +1,61 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "mlflow-modal-deploy"
7
+ version = "0.2.0"
8
+ description = "MLflow deployment plugin for Modal serverless GPU infrastructure (actively maintained)"
9
+ readme = "README.md"
10
+ license = {text = "Apache-2.0"}
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ {name = "Debu Sinha"}
14
+ ]
15
+ keywords = ["mlflow", "modal", "deployment", "serverless", "machine-learning"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: Science/Research",
20
+ "License :: OSI Approved :: Apache Software License",
21
+ "Operating System :: OS Independent",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
27
+ ]
28
+ dependencies = [
29
+ "mlflow>=2.10.0",
30
+ "modal>=0.64.0",
31
+ ]
32
+
33
+ [project.optional-dependencies]
34
+ dev = [
35
+ "pytest>=7.0.0",
36
+ "pytest-cov>=4.0.0",
37
+ "ruff>=0.1.0",
38
+ "twine>=4.0.0",
39
+ "build>=1.0.0",
40
+ ]
41
+
42
+ [project.urls]
43
+ Homepage = "https://github.com/debu-sinha/mlflow-modal-deploy"
44
+ Repository = "https://github.com/debu-sinha/mlflow-modal-deploy"
45
+ Issues = "https://github.com/debu-sinha/mlflow-modal-deploy/issues"
46
+
47
+ [project.entry-points."mlflow.deployments"]
48
+ modal = "mlflow_modal.deployment:ModalDeploymentClient"
49
+
50
+ [tool.ruff]
51
+ line-length = 120
52
+ target-version = "py310"
53
+
54
+ [tool.ruff.lint]
55
+ select = ["E", "F", "I", "W"]
56
+ ignore = ["E501"]
57
+
58
+ [tool.pytest.ini_options]
59
+ testpaths = ["tests"]
60
+ python_files = ["test_*.py"]
61
+ addopts = "-v --tb=short"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+