ob-metaflow-extensions 1.1.175rc1__py2.py3-none-any.whl → 1.1.175rc3__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ob-metaflow-extensions might be problematic. Click here for more details.

Files changed (28) hide show
  1. metaflow_extensions/outerbounds/plugins/__init__.py +1 -1
  2. metaflow_extensions/outerbounds/plugins/apps/app_deploy_decorator.py +112 -0
  3. metaflow_extensions/outerbounds/plugins/apps/core/__init__.py +9 -0
  4. metaflow_extensions/outerbounds/plugins/apps/core/app_cli.py +42 -374
  5. metaflow_extensions/outerbounds/plugins/apps/core/app_config.py +45 -225
  6. metaflow_extensions/outerbounds/plugins/apps/core/capsule.py +22 -6
  7. metaflow_extensions/outerbounds/plugins/apps/core/code_package/code_packager.py +16 -15
  8. metaflow_extensions/outerbounds/plugins/apps/core/config/__init__.py +12 -0
  9. metaflow_extensions/outerbounds/plugins/apps/core/config/cli_generator.py +161 -0
  10. metaflow_extensions/outerbounds/plugins/apps/core/config/config_utils.py +828 -0
  11. metaflow_extensions/outerbounds/plugins/apps/core/config/schema_export.py +285 -0
  12. metaflow_extensions/outerbounds/plugins/apps/core/config/typed_configs.py +104 -0
  13. metaflow_extensions/outerbounds/plugins/apps/core/config/typed_init_generator.py +317 -0
  14. metaflow_extensions/outerbounds/plugins/apps/core/config/unified_config.py +994 -0
  15. metaflow_extensions/outerbounds/plugins/apps/core/config_schema.yaml +217 -211
  16. metaflow_extensions/outerbounds/plugins/apps/core/dependencies.py +3 -3
  17. metaflow_extensions/outerbounds/plugins/apps/core/deployer.py +132 -0
  18. metaflow_extensions/outerbounds/plugins/apps/core/experimental/__init__.py +4 -36
  19. metaflow_extensions/outerbounds/plugins/apps/core/perimeters.py +44 -2
  20. metaflow_extensions/outerbounds/plugins/apps/core/validations.py +4 -9
  21. metaflow_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.py +1 -0
  22. metaflow_extensions/outerbounds/toplevel/ob_internal.py +1 -0
  23. {ob_metaflow_extensions-1.1.175rc1.dist-info → ob_metaflow_extensions-1.1.175rc3.dist-info}/METADATA +1 -1
  24. {ob_metaflow_extensions-1.1.175rc1.dist-info → ob_metaflow_extensions-1.1.175rc3.dist-info}/RECORD +26 -20
  25. metaflow_extensions/outerbounds/plugins/apps/core/cli_to_config.py +0 -99
  26. metaflow_extensions/outerbounds/plugins/apps/core/config_schema_autogen.json +0 -336
  27. {ob_metaflow_extensions-1.1.175rc1.dist-info → ob_metaflow_extensions-1.1.175rc3.dist-info}/WHEEL +0 -0
  28. {ob_metaflow_extensions-1.1.175rc1.dist-info → ob_metaflow_extensions-1.1.175rc3.dist-info}/top_level.txt +0 -0
@@ -1,336 +0,0 @@
1
- {
2
- "title": "Outerbounds App Configuration Schema",
3
- "description": "Schema for defining Outerbounds Apps configuration. This schema is what we will end up using on the CLI/programmatic interface.\nHow to read this schema:\n 1. If the a property has `allow_union`:true then it will allow overrides from the cli.\n 2. If a property has `experimental` set to true then a lot its validations may-be skipped and parsing handled somewhere else.\n\nThe YAML based schema file is for Humans to change and consume. The JSON based schema file is what gets autogenerated based on pre-commit\nhooks so that we can use within the outerbounds package. The reasons for two distinct types of files it that YAML provides the ability to\nadd comments and make readability easier. While JSON is so that we can reduce the dependency on YAML when working with apps within both\nMetaflow and OB package.\n",
4
- "version": "1.0.0",
5
- "type": "object",
6
- "required": [
7
- "name",
8
- "port"
9
- ],
10
- "properties": {
11
- "name": {
12
- "allow_union": true,
13
- "type": "string",
14
- "description": "The name of the app to deploy.",
15
- "maxLength": 20,
16
- "example": "myapp"
17
- },
18
- "port": {
19
- "allow_union": false,
20
- "type": "integer",
21
- "description": "Port where the app is hosted. When deployed this will be port on which we will deploy the app.",
22
- "minimum": 1,
23
- "maximum": 65535,
24
- "example": 8000
25
- },
26
- "tags": {
27
- "allow_union": true,
28
- "type": "array",
29
- "description": "The tags of the app to deploy.",
30
- "items": {
31
- "type": "object"
32
- },
33
- "example": [
34
- {
35
- "foo": "bar"
36
- },
37
- {
38
- "x": "y"
39
- }
40
- ]
41
- },
42
- "description": {
43
- "allow_union": true,
44
- "type": "string",
45
- "description": "The description of the app to deploy.",
46
- "example": "This is a description of my app."
47
- },
48
- "force_upgrade": {
49
- "allow_union": true,
50
- "type": "boolean",
51
- "description": "Whether to force upgrade the app even if it is currently being upgraded.",
52
- "example": true
53
- },
54
- "app_type": {
55
- "allow_union": true,
56
- "type": "string",
57
- "description": "The User defined type of app to deploy. Its only used for bookkeeping purposes.",
58
- "example": "MyCustomAgent"
59
- },
60
- "image": {
61
- "allow_union": true,
62
- "type": "string",
63
- "description": "The Docker image to deploy with the App."
64
- },
65
- "secrets": {
66
- "allow_union": true,
67
- "type": "array",
68
- "description": "Outerbounds integrations to attach to the app. You can use the value you set in the `@secrets` decorator in your code.",
69
- "items": {
70
- "type": "string"
71
- },
72
- "example": [
73
- "hf-token"
74
- ]
75
- },
76
- "environment": {
77
- "allow_union": true,
78
- "type": "object",
79
- "description": "Environment variables to deploy with the App.",
80
- "additionalProperties": {
81
- "oneOf": [
82
- {
83
- "type": "string"
84
- },
85
- {
86
- "type": "number"
87
- },
88
- {
89
- "type": "boolean"
90
- },
91
- {
92
- "type": "object"
93
- },
94
- {
95
- "type": "array"
96
- }
97
- ]
98
- },
99
- "example": {
100
- "DEBUG": true,
101
- "DATABASE_CONFIG": {
102
- "host": "localhost",
103
- "port": 5432
104
- },
105
- "ALLOWED_ORIGINS": [
106
- "http://localhost:3000",
107
- "https://myapp.com"
108
- ]
109
- }
110
- },
111
- "dependencies": {
112
- "allow_union": false,
113
- "type": "object",
114
- "description": "The dependencies to attach to the app. Only one of the properties can be specified.\n",
115
- "properties": {
116
- "from_requirements_file": {
117
- "type": "string",
118
- "description": "The path to the requirements.txt file to attach to the app.",
119
- "example": "requirements.txt"
120
- },
121
- "from_pyproject_toml": {
122
- "type": "string",
123
- "description": "The path to the pyproject.toml file to attach to the app.",
124
- "example": "pyproject.toml"
125
- },
126
- "python": {
127
- "type": "string",
128
- "description": "The Python version to use for the app.\n",
129
- "example": "3.10"
130
- },
131
- "pypi": {
132
- "type": "object",
133
- "description": "A dictionary of pypi dependencies to attach to the app.\nThe key is the package name and the value is the version.\n",
134
- "example": {
135
- "numpy": "1.23.0",
136
- "pandas": ""
137
- }
138
- },
139
- "conda": {
140
- "type": "object",
141
- "description": "A dictionary of pypi dependencies to attach to the app.\nThe key is the package name and the value is the version.\n",
142
- "example": {
143
- "numpy": "1.23.0",
144
- "pandas": ""
145
- }
146
- }
147
- }
148
- },
149
- "package": {
150
- "allow_union": false,
151
- "type": "object",
152
- "description": "Configurations associated with packaging the app.\n",
153
- "properties": {
154
- "src_path": {
155
- "type": "string",
156
- "description": "The path to the source code to deploy with the App.",
157
- "example": "./"
158
- },
159
- "suffixes": {
160
- "type": "array",
161
- "description": "A list of suffixes to add to the source code to deploy with the App.\n",
162
- "items": {
163
- "type": "string"
164
- },
165
- "example": [
166
- ".py",
167
- ".ipynb"
168
- ]
169
- }
170
- }
171
- },
172
- "commands": {
173
- "allow_union": false,
174
- "type": "array",
175
- "description": "A list of commands to run the app with. Cannot be configured from the CLI. Only used in `run` command.",
176
- "items": {
177
- "type": "string"
178
- },
179
- "example": [
180
- "python app.py",
181
- "python app.py --foo bar"
182
- ]
183
- },
184
- "resources": {
185
- "allow_union": true,
186
- "type": "object",
187
- "properties": {
188
- "cpu": {
189
- "type": "string",
190
- "description": "CPU resource request and limit.",
191
- "example": "500m",
192
- "default": "1"
193
- },
194
- "memory": {
195
- "type": "string",
196
- "description": "Memory resource request and limit.",
197
- "example": "512Mi",
198
- "default": "4Gi"
199
- },
200
- "gpu": {
201
- "type": "string",
202
- "description": "GPU resource request and limit.",
203
- "example": "1"
204
- },
205
- "disk": {
206
- "type": "string",
207
- "description": "Storage resource request and limit.",
208
- "example": "1Gi",
209
- "default": "20Gi"
210
- }
211
- }
212
- },
213
- "replicas": {
214
- "allow_union": true,
215
- "type": "object",
216
- "description": "The number of replicas to deploy the app with.\n",
217
- "properties": {
218
- "min": {
219
- "type": "integer",
220
- "description": "The minimum number of replicas to deploy the app with.",
221
- "example": 1
222
- },
223
- "max": {
224
- "type": "integer",
225
- "description": "The maximum number of replicas to deploy the app with.",
226
- "example": 10
227
- }
228
- }
229
- },
230
- "health_check": {
231
- "type": "object",
232
- "allow_union": false,
233
- "properties": {
234
- "enabled": {
235
- "type": "boolean",
236
- "description": "Whether to enable health checks.",
237
- "example": true,
238
- "default": false
239
- },
240
- "path": {
241
- "type": "string",
242
- "description": "The path for health checks.",
243
- "example": "/health"
244
- },
245
- "initial_delay_seconds": {
246
- "type": "integer",
247
- "description": "Number of seconds to wait before performing the first health check.",
248
- "example": 10
249
- },
250
- "period_seconds": {
251
- "type": "integer",
252
- "description": "How often to perform the health check.",
253
- "example": 30
254
- }
255
- }
256
- },
257
- "compute_pools": {
258
- "allow_union": true,
259
- "type": "array",
260
- "description": "A list of compute pools to deploy the app to.\n",
261
- "items": {
262
- "type": "string"
263
- },
264
- "example": [
265
- "default",
266
- "large"
267
- ]
268
- },
269
- "auth": {
270
- "allow_union": false,
271
- "type": "object",
272
- "description": "Auth related configurations.\n",
273
- "properties": {
274
- "type": {
275
- "type": "string",
276
- "description": "The type of authentication to use for the app.\n",
277
- "enum": [
278
- "API",
279
- "Browser"
280
- ]
281
- },
282
- "public": {
283
- "type": "boolean",
284
- "description": "Whether the app is public or not.\n",
285
- "default": true
286
- }
287
- }
288
- },
289
- "project": {
290
- "type": "string",
291
- "description": "The project name to deploy the app to.",
292
- "experimental": true,
293
- "allow_union": true
294
- },
295
- "branch": {
296
- "type": "string",
297
- "description": "The branch name to deploy the app to.",
298
- "experimental": true,
299
- "allow_union": true
300
- },
301
- "models": {
302
- "type": "array",
303
- "description": "model asset ids to include with the deployment. NO CLI Option for this Now.",
304
- "experimental": true,
305
- "allow_union": true,
306
- "items": {
307
- "type": "object",
308
- "properties": {
309
- "asset_id": {
310
- "type": "string"
311
- },
312
- "asset_instance_id": {
313
- "type": "string"
314
- }
315
- }
316
- }
317
- },
318
- "data": {
319
- "type": "array",
320
- "description": "data asset ids to include with the deployment.",
321
- "experimental": true,
322
- "allow_union": true,
323
- "items": {
324
- "type": "object",
325
- "properties": {
326
- "asset_id": {
327
- "type": "string"
328
- },
329
- "asset_instance_id": {
330
- "type": "string"
331
- }
332
- }
333
- }
334
- }
335
- }
336
- }