Models
Pydantic models for the various concepts in ZenML.
APIKey
Bases: BaseModel
Encoded model for API keys.
Source code in src/zenml/models/v2/core/api_key.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
decode_api_key(encoded_key)
classmethod
Decodes an API key from a base64 string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
encoded_key
|
str
|
The encoded API key. |
required |
Returns:
Type | Description |
---|---|
APIKey
|
The decoded API key. |
Raises:
Type | Description |
---|---|
ValueError
|
If the key is not valid. |
Source code in src/zenml/models/v2/core/api_key.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
encode()
Encodes the API key in a base64 string that includes the key ID and prefix.
Returns:
Type | Description |
---|---|
str
|
The encoded API key. |
Source code in src/zenml/models/v2/core/api_key.py
72 73 74 75 76 77 78 79 |
|
APIKeyFilter
Bases: BaseFilter
Filter model for API keys.
Source code in src/zenml/models/v2/core/api_key.py
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
|
apply_filter(query, table)
Override to apply the service account scope as an additional filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/core/api_key.py
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
|
set_service_account(service_account_id)
Set the service account by which to scope this query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_id
|
UUID
|
The service account ID. |
required |
Source code in src/zenml/models/v2/core/api_key.py
377 378 379 380 381 382 383 |
|
APIKeyInternalResponse
Bases: APIKeyResponse
Response model for API keys used internally.
Source code in src/zenml/models/v2/core/api_key.py
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
|
verify_key(key)
Verifies a given key against the stored (hashed) key(s).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
Input key to be verified. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the keys match. |
Source code in src/zenml/models/v2/core/api_key.py
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
|
APIKeyInternalUpdate
Bases: APIKeyUpdate
Update model for API keys used internally.
Source code in src/zenml/models/v2/core/api_key.py
132 133 134 135 136 137 138 |
|
APIKeyRequest
Bases: BaseRequest
Request model for API keys.
Source code in src/zenml/models/v2/core/api_key.py
85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
APIKeyResponse
Bases: BaseIdentifiedResponse[APIKeyResponseBody, APIKeyResponseMetadata, APIKeyResponseResources]
Response model for API keys.
Source code in src/zenml/models/v2/core/api_key.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
|
active
property
The active
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
key
property
The key
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
last_login
property
The last_login
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
last_rotated
property
The last_rotated
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
retain_period_minutes
property
The retain_period_minutes
property.
Returns:
Type | Description |
---|---|
int
|
the value of the property. |
service_account
property
The service_account
property.
Returns:
Type | Description |
---|---|
ServiceAccountResponse
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this API key.
Returns:
Type | Description |
---|---|
APIKeyResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/api_key.py
198 199 200 201 202 203 204 205 206 207 208 209 |
|
set_key(key)
Sets the API key and encodes it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The API key value to be set. |
required |
Source code in src/zenml/models/v2/core/api_key.py
212 213 214 215 216 217 218 |
|
APIKeyResponseBody
Bases: BaseDatedResponseBody
Response body for API keys.
Source code in src/zenml/models/v2/core/api_key.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
APIKeyResponseMetadata
Bases: BaseResponseMetadata
Response metadata for API keys.
Source code in src/zenml/models/v2/core/api_key.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
|
APIKeyRotateRequest
Bases: BaseRequest
Request model for API key rotation.
Source code in src/zenml/models/v2/core/api_key.py
100 101 102 103 104 105 106 107 |
|
APIKeyUpdate
Bases: BaseUpdate
Update model for API keys.
Source code in src/zenml/models/v2/core/api_key.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
ActionFilter
Bases: ProjectScopedFilter
Model to enable advanced filtering of all actions.
Source code in src/zenml/models/v2/core/action.py
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
|
ActionFlavorResponse
Bases: BasePluginFlavorResponse[ActionFlavorResponseBody, ActionFlavorResponseMetadata, ActionFlavorResponseResources]
Response model for Action Flavors.
Source code in src/zenml/models/v2/core/action_flavor.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
config_schema
property
The source_config_schema
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
ActionFlavorResponseBody
Bases: BasePluginResponseBody
Response body for action flavors.
Source code in src/zenml/models/v2/core/action_flavor.py
26 27 |
|
ActionFlavorResponseMetadata
Bases: BasePluginResponseMetadata
Response metadata for action flavors.
Source code in src/zenml/models/v2/core/action_flavor.py
30 31 32 33 |
|
ActionFlavorResponseResources
Bases: BasePluginResponseResources
Response resources for action flavors.
Source code in src/zenml/models/v2/core/action_flavor.py
36 37 |
|
ActionRequest
Bases: ProjectScopedRequest
Model for creating a new action.
Source code in src/zenml/models/v2/core/action.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
ActionResponse
Bases: ProjectScopedResponse[ActionResponseBody, ActionResponseMetadata, ActionResponseResources]
Response model for actions.
Source code in src/zenml/models/v2/core/action.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
|
auth_window
property
The auth_window
property.
Returns:
Type | Description |
---|---|
int
|
the value of the property. |
configuration
property
The configuration
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
flavor
property
The flavor
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
plugin_subtype
property
service_account
property
get_hydrated_version()
Get the hydrated version of this action.
Returns:
Type | Description |
---|---|
ActionResponse
|
An instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/action.py
184 185 186 187 188 189 190 191 192 |
|
set_configuration(configuration)
Set the configuration
property.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
configuration
|
Dict[str, Any]
|
The value to set. |
required |
Source code in src/zenml/models/v2/core/action.py
240 241 242 243 244 245 246 |
|
ActionResponseBody
Bases: ProjectScopedResponseBody
Response body for actions.
Source code in src/zenml/models/v2/core/action.py
134 135 136 137 138 139 140 141 142 143 144 |
|
ActionResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for actions.
Source code in src/zenml/models/v2/core/action.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|
ActionResponseResources
Bases: ProjectScopedResponseResources
Class for all resource models associated with the action entity.
Source code in src/zenml/models/v2/core/action.py
164 165 166 167 168 169 |
|
ActionUpdate
Bases: BaseUpdate
Update model for actions.
Source code in src/zenml/models/v2/core/action.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|
from_response(response)
classmethod
Create an update model from a response model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
response
|
ActionResponse
|
The response model to create the update model from. |
required |
Returns:
Type | Description |
---|---|
ActionUpdate
|
The update model. |
Source code in src/zenml/models/v2/core/action.py
116 117 118 119 120 121 122 123 124 125 126 127 128 |
|
ArtifactFilter
Bases: ProjectScopedFilter
, TaggableFilter
Model to enable advanced filtering of artifacts.
Source code in src/zenml/models/v2/core/artifact.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
|
apply_sorting(query, table)
Apply sorting to the query for Artifacts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/core/artifact.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
|
ArtifactRequest
Bases: ProjectScopedRequest
Artifact request model.
Source code in src/zenml/models/v2/core/artifact.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
ArtifactResponse
Bases: ProjectScopedResponse[ArtifactResponseBody, ArtifactResponseMetadata, ArtifactResponseResources]
Artifact response model.
Source code in src/zenml/models/v2/core/artifact.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
|
has_custom_name
property
The has_custom_name
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
latest_version_id
property
The latest_version_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
latest_version_name
property
The latest_version_name
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
tags
property
versions
property
Get a list of all versions of this artifact.
Returns:
Type | Description |
---|---|
Dict[str, ArtifactVersionResponse]
|
A list of all versions of this artifact. |
get_hydrated_version()
Get the hydrated version of this artifact.
Returns:
Type | Description |
---|---|
ArtifactResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/artifact.py
119 120 121 122 123 124 125 126 127 |
|
ArtifactResponseBody
Bases: ProjectScopedResponseBody
Response body for artifacts.
Source code in src/zenml/models/v2/core/artifact.py
87 88 89 90 91 92 93 94 |
|
ArtifactResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for artifacts.
Source code in src/zenml/models/v2/core/artifact.py
97 98 99 100 101 102 103 |
|
ArtifactUpdate
Bases: BaseUpdate
Artifact update model.
Source code in src/zenml/models/v2/core/artifact.py
75 76 77 78 79 80 81 |
|
ArtifactVersionFilter
Bases: ProjectScopedFilter
, TaggableFilter
, RunMetadataFilterMixin
Model to enable advanced filtering of artifact versions.
Source code in src/zenml/models/v2/core/artifact_version.py
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[Union[ColumnElement[bool]]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/artifact_version.py
577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 |
|
ArtifactVersionRequest
Bases: ProjectScopedRequest
Request model for artifact versions.
Source code in src/zenml/models/v2/core/artifact_version.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
str_field_max_length_check(value)
classmethod
Checks if the length of the value exceeds the maximum str length.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Any
|
the value set in the field |
required |
Returns:
Type | Description |
---|---|
Any
|
the value itself. |
Raises:
Type | Description |
---|---|
AssertionError
|
if the length of the field is longer than the maximum threshold. |
Source code in src/zenml/models/v2/core/artifact_version.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
|
ArtifactVersionResponse
Bases: ProjectScopedResponse[ArtifactVersionResponseBody, ArtifactVersionResponseMetadata, ArtifactVersionResponseResources]
Response model for artifact versions.
Source code in src/zenml/models/v2/core/artifact_version.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
|
artifact
property
artifact_store_id
property
The artifact_store_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
data_type
property
materializer
property
name
property
The name
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
producer_pipeline_run_id
property
The producer_pipeline_run_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
producer_step_run_id
property
The producer_step_run_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
run
property
Get the pipeline run that produced this artifact.
Returns:
Type | Description |
---|---|
PipelineRunResponse
|
The pipeline run that produced this artifact. |
run_metadata
property
The metadata
property.
Returns:
Type | Description |
---|---|
Dict[str, MetadataType]
|
the value of the property. |
save_type
property
step
property
Get the step that produced this artifact.
Returns:
Type | Description |
---|---|
StepRunResponse
|
The step that produced this artifact. |
tags
property
type
property
uri
property
The uri
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
version
property
The version
property.
Returns:
Type | Description |
---|---|
Union[str, int]
|
the value of the property. |
visualizations
property
The visualizations
property.
Returns:
Type | Description |
---|---|
Optional[List[ArtifactVisualizationResponse]]
|
the value of the property. |
download_files(path, overwrite=False)
Downloads data for an artifact with no materializing.
Any artifacts will be saved as a zip file to the given path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to save the binary data to. |
required |
overwrite
|
bool
|
Whether to overwrite the file if it already exists. |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
If the path does not end with '.zip'. |
Source code in src/zenml/models/v2/core/artifact_version.py
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
|
get_hydrated_version()
Get the hydrated version of this artifact version.
Returns:
Type | Description |
---|---|
ArtifactVersionResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/artifact_version.py
262 263 264 265 266 267 268 269 270 |
|
load()
Materializes (loads) the data stored in this artifact.
Returns:
Type | Description |
---|---|
Any
|
The materialized data. |
Source code in src/zenml/models/v2/core/artifact_version.py
424 425 426 427 428 429 430 431 432 |
|
visualize(title=None)
Visualize the artifact in notebook environments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title
|
Optional[str]
|
Optional title to show before the visualizations. |
None
|
Source code in src/zenml/models/v2/core/artifact_version.py
460 461 462 463 464 465 466 467 468 |
|
ArtifactVersionResponseBody
Bases: ProjectScopedResponseBody
Response body for artifact versions.
Source code in src/zenml/models/v2/core/artifact_version.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
|
str_field_max_length_check(value)
classmethod
Checks if the length of the value exceeds the maximum str length.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Any
|
the value set in the field |
required |
Returns:
Type | Description |
---|---|
Any
|
the value itself. |
Raises:
Type | Description |
---|---|
AssertionError
|
if the length of the field is longer than the maximum threshold. |
Source code in src/zenml/models/v2/core/artifact_version.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
|
ArtifactVersionResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for artifact versions.
Source code in src/zenml/models/v2/core/artifact_version.py
234 235 236 237 238 239 240 241 242 243 244 245 246 |
|
ArtifactVersionUpdate
Bases: BaseUpdate
Artifact version update model.
Source code in src/zenml/models/v2/core/artifact_version.py
169 170 171 172 173 174 |
|
ArtifactVisualizationRequest
Bases: BaseRequest
Request model for artifact visualization.
Source code in src/zenml/models/v2/core/artifact_visualization.py
30 31 32 33 34 |
|
ArtifactVisualizationResponse
Bases: BaseIdentifiedResponse[ArtifactVisualizationResponseBody, ArtifactVisualizationResponseMetadata, ArtifactVisualizationResponseResources]
Response model for artifact visualizations.
Source code in src/zenml/models/v2/core/artifact_visualization.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
artifact_version_id
property
The artifact_version_id
property.
Returns:
Type | Description |
---|---|
UUID
|
the value of the property. |
type
property
uri
property
The uri
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this artifact visualization.
Returns:
Type | Description |
---|---|
ArtifactVisualizationResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/artifact_visualization.py
70 71 72 73 74 75 76 77 78 |
|
ArtifactVisualizationResponseBody
Bases: BaseDatedResponseBody
Response body for artifact visualizations.
Source code in src/zenml/models/v2/core/artifact_visualization.py
44 45 46 47 48 |
|
ArtifactVisualizationResponseMetadata
Bases: BaseResponseMetadata
Response metadata model for artifact visualizations.
Source code in src/zenml/models/v2/core/artifact_visualization.py
51 52 53 54 |
|
AuthenticationMethodModel
Bases: BaseModel
Authentication method specification.
Describes the schema for the configuration and secrets that need to be provided to configure an authentication method.
Source code in src/zenml/models/v2/misc/service_connector_type.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
|
config_class
property
Get the configuration class for the authentication method.
Returns:
Type | Description |
---|---|
Optional[Type[BaseModel]]
|
The configuration class for the authentication method. |
__init__(config_class=None, **values)
Initialize the authentication method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config_class
|
Optional[Type[BaseModel]]
|
The configuration class for the authentication method. |
None
|
**values
|
Any
|
The data to initialize the authentication method with. |
{}
|
Source code in src/zenml/models/v2/misc/service_connector_type.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
|
supports_temporary_credentials()
Check if the authentication method supports temporary credentials.
Returns:
Type | Description |
---|---|
bool
|
True if the authentication method supports temporary credentials, |
bool
|
False otherwise. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
157 158 159 160 161 162 163 164 165 166 167 168 |
|
validate_expiration(expiration_seconds)
Validate the expiration time.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
expiration_seconds
|
Optional[int]
|
The expiration time in seconds. If None, the default expiration time is used, if applicable. |
required |
Returns:
Type | Description |
---|---|
Optional[int]
|
The expiration time in seconds or None if not applicable. |
Raises:
Type | Description |
---|---|
ValueError
|
If the expiration time is not valid. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
|
BaseDatedResponseBody
Bases: BaseResponseBody
Base body model for entities that track a creation and update timestamp.
Used as a base class for all body models associated with responses. Features a creation and update timestamp.
Source code in src/zenml/models/v2/base/base.py
327 328 329 330 331 332 333 334 335 336 337 338 339 |
|
BaseFilter
Bases: BaseModel
Class to unify all filter, paginate and sort request parameters.
This Model allows fine-grained filtering, sorting and pagination of resources.
Usage example for subclasses of this class:
ResourceListModel(
name="contains:default",
project="default"
count_steps="gte:5"
sort_by="created",
page=2,
size=20
)
Source code in src/zenml/models/v2/base/filter.py
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 |
|
list_of_filters
property
Converts the class variables into a list of usable Filter Models.
Returns:
Type | Description |
---|---|
List[Filter]
|
A list of Filter models. |
offset
property
Returns the offset needed for the query on the data persistence layer.
Returns:
Type | Description |
---|---|
int
|
The offset for the query. |
sorting_params
property
Converts the class variables into a list of usable Filter Models.
Returns:
Type | Description |
---|---|
Tuple[str, SorterOps]
|
A tuple of the column to sort by and the sorting operand. |
apply_filter(query, table)
Applies the filter to a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/base/filter.py
939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 |
|
apply_sorting(query, table)
Apply sorting to the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/base/filter.py
965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 |
|
configure_rbac(authenticated_user_id, **column_allowed_ids)
Configure RBAC allowed column values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
authenticated_user_id
|
UUID
|
ID of the authenticated user. All entities owned by this user will be included. |
required |
column_allowed_ids
|
Optional[Set[UUID]]
|
Set of IDs per column to limit the query to.
If given, the remaining filters will be applied to entities
within this set only. If |
{}
|
Source code in src/zenml/models/v2/base/filter.py
690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 |
|
filter_ops(data)
classmethod
Parse incoming filters to ensure all filters are legal.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
Dict[str, Any]
|
The values of the class. |
required |
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The values of the class. |
Source code in src/zenml/models/v2/base/filter.py
645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
|
generate_custom_query_conditions_for_column(value, table, column)
staticmethod
Generate custom filter conditions for a column of a table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Any
|
The filter value. |
required |
table
|
Type[SQLModel]
|
The table which contains the column. |
required |
column
|
str
|
The column name. |
required |
Returns:
Type | Description |
---|---|
ColumnElement[bool]
|
The query conditions. |
Source code in src/zenml/models/v2/base/filter.py
862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 |
|
generate_filter(table)
Generate the filter for the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The Table that is being queried from. |
required |
Returns:
Type | Description |
---|---|
Union[ColumnElement[bool]]
|
The filter expression for the query. |
Raises:
Type | Description |
---|---|
RuntimeError
|
If a valid logical operator is not supplied. |
Source code in src/zenml/models/v2/base/filter.py
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 |
|
generate_name_or_id_query_conditions(value, table, additional_columns=None)
Generate filter conditions for name or id of a table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Union[UUID, str]
|
The filter value. |
required |
table
|
Type[NamedSchema]
|
The table to filter. |
required |
additional_columns
|
Optional[List[str]]
|
Additional table columns that should also filter for the given value as part of the or condition. |
None
|
Returns:
Type | Description |
---|---|
ColumnElement[bool]
|
The query conditions. |
Source code in src/zenml/models/v2/base/filter.py
820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 |
|
generate_rbac_filter(table)
Generates an optional RBAC filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
Optional[ColumnElement[bool]]
|
The RBAC filter. |
Source code in src/zenml/models/v2/base/filter.py
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 |
|
get_custom_filters(table)
Get custom filters.
This can be overridden by subclasses to define custom filters that are not based on the columns of the underlying table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/base/filter.py
923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 |
|
validate_sort_by(value)
classmethod
Validate that the sort_column is a valid column with a valid operand.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Any
|
The sort_by field value. |
required |
Returns:
Type | Description |
---|---|
Any
|
The validated sort_by field value. |
Raises:
Type | Description |
---|---|
ValidationError
|
If the sort_by field is not a string. |
ValueError
|
If the resource can't be sorted by this field. |
Source code in src/zenml/models/v2/base/filter.py
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 |
|
BaseIdentifiedResponse
Bases: BaseResponse[AnyDatedBody, AnyMetadata, AnyResources]
, Generic[AnyDatedBody, AnyMetadata, AnyResources]
Base domain model for resources with DB representation.
Source code in src/zenml/models/v2/base/base.py
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
|
created
property
The created
property.
Returns:
Type | Description |
---|---|
datetime
|
the value of the property. |
updated
property
The updated
property.
Returns:
Type | Description |
---|---|
datetime
|
the value of the property. |
__eq__(other)
Implementation of equality magic method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other
|
Any
|
The other object to compare to. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the other object is of the same type and has the same UUID. |
Source code in src/zenml/models/v2/base/base.py
364 365 366 367 368 369 370 371 372 373 374 375 376 |
|
__hash__()
Implementation of hash magic method.
Returns:
Type | Description |
---|---|
int
|
Hash of the UUID. |
Source code in src/zenml/models/v2/base/base.py
356 357 358 359 360 361 362 |
|
get_analytics_metadata()
Fetches the analytics metadata for base response models.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The analytics metadata. |
Source code in src/zenml/models/v2/base/base.py
452 453 454 455 456 457 458 459 460 |
|
get_body()
Fetch the body of the entity.
Returns:
Type | Description |
---|---|
AnyDatedBody
|
The body field of the response. |
Raises:
Type | Description |
---|---|
IllegalOperationError
|
If the user lacks permission to access the entity represented by this response. |
Source code in src/zenml/models/v2/base/base.py
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
|
get_hydrated_version()
Abstract method to fetch the hydrated version of the model.
Raises:
Type | Description |
---|---|
NotImplementedError
|
in case the method is not implemented. |
Source code in src/zenml/models/v2/base/base.py
402 403 404 405 406 407 408 409 410 411 412 413 |
|
get_metadata()
Fetch the metadata of the entity.
Returns:
Type | Description |
---|---|
AnyMetadata
|
The metadata field of the response. |
Raises:
Type | Description |
---|---|
IllegalOperationError
|
If the user lacks permission to access this entity represented by this response. |
Source code in src/zenml/models/v2/base/base.py
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
|
BasePluginFlavorResponse
Bases: BaseResponse[AnyPluginBody, AnyPluginMetadata, AnyPluginResources]
, Generic[AnyPluginBody, AnyPluginMetadata, AnyPluginResources]
Base response for all Plugin Flavors.
Source code in src/zenml/models/v2/base/base_plugin_flavor.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
get_hydrated_version()
Abstract method to fetch the hydrated version of the model.
Returns:
Type | Description |
---|---|
BasePluginFlavorResponse[AnyPluginBody, AnyPluginMetadata, AnyPluginResources]
|
Hydrated version of the PluginFlavorResponse |
Source code in src/zenml/models/v2/base/base_plugin_flavor.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
BaseRequest
Bases: BaseZenModel
Base request model.
Used as a base class for all request models.
Source code in src/zenml/models/v2/base/base.py
52 53 54 55 56 |
|
BaseResponse
Bases: BaseZenModel
, Generic[AnyBody, AnyMetadata, AnyResources]
Base domain model for all responses.
Source code in src/zenml/models/v2/base/base.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
|
get_body()
Fetch the body of the entity.
Returns:
Type | Description |
---|---|
AnyBody
|
The body field of the response. |
Raises:
Type | Description |
---|---|
RuntimeError
|
If the body was not included in the response. |
Source code in src/zenml/models/v2/base/base.py
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
get_hydrated_version()
Abstract method to fetch the hydrated version of the model.
Raises:
Type | Description |
---|---|
NotImplementedError
|
in case the method is not implemented. |
Source code in src/zenml/models/v2/base/base.py
221 222 223 224 225 226 227 228 229 230 231 232 |
|
get_metadata()
Fetch the metadata of the entity.
Returns:
Type | Description |
---|---|
AnyMetadata
|
The metadata field of the response. |
Source code in src/zenml/models/v2/base/base.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
|
get_resources()
Fetch the resources related to this entity.
Returns:
Type | Description |
---|---|
AnyResources
|
The resources field of the response. |
Raises:
Type | Description |
---|---|
RuntimeError
|
If the resources field was not included in the response. |
Source code in src/zenml/models/v2/base/base.py
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
|
hydrate()
Hydrate the response.
Source code in src/zenml/models/v2/base/base.py
213 214 215 216 217 218 219 |
|
BaseResponseBody
Bases: BaseZenModel
Base body model.
Source code in src/zenml/models/v2/base/base.py
72 73 |
|
BaseResponseMetadata
Bases: BaseZenModel
Base metadata model.
Used as a base class for all metadata models associated with responses.
Source code in src/zenml/models/v2/base/base.py
76 77 78 79 80 |
|
BaseResponseResources
Bases: BaseZenModel
Base resources model.
Used as a base class for all resource models associated with responses.
Source code in src/zenml/models/v2/base/base.py
83 84 85 86 87 88 89 |
|
BaseUpdate
Bases: BaseZenModel
Base update model.
Used as a base class for all update models.
Source code in src/zenml/models/v2/base/base.py
62 63 64 65 66 |
|
BaseZenModel
Bases: YAMLSerializationMixin
, AnalyticsTrackedModelMixin
Base model class for all ZenML models.
This class is used as a base class for all ZenML models. It provides functionality for tracking analytics events.
Source code in src/zenml/models/v2/base/base.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
BoolFilter
Bases: Filter
Filter for all Boolean fields.
Source code in src/zenml/models/v2/base/filter.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
|
generate_query_conditions_from_column(column)
Generate query conditions for a boolean column.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
column
|
Any
|
The boolean column of an SQLModel table on which to filter. |
required |
Returns:
Type | Description |
---|---|
Any
|
A list of query conditions. |
Source code in src/zenml/models/v2/base/filter.py
156 157 158 159 160 161 162 163 164 165 166 167 168 |
|
BuildItem
Bases: BaseModel
Pipeline build item.
Attributes:
Name | Type | Description |
---|---|---|
image |
str
|
The image name or digest. |
dockerfile |
Optional[str]
|
The contents of the Dockerfile used to build the image. |
requirements |
Optional[str]
|
The pip requirements installed in the image. This is a string consisting of multiple concatenated requirements.txt files. |
settings_checksum |
Optional[str]
|
Checksum of the settings used for the build. |
contains_code |
bool
|
Whether the image contains user files. |
requires_code_download |
bool
|
Whether the image needs to download files. |
Source code in src/zenml/models/v2/misc/build_item.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
CodeReferenceRequest
Bases: BaseRequest
Request model for code references.
Source code in src/zenml/models/v2/core/code_reference.py
36 37 38 39 40 41 42 43 44 45 |
|
CodeReferenceResponse
Bases: BaseIdentifiedResponse[CodeReferenceResponseBody, CodeReferenceResponseMetadata, CodeReferenceResponseResources]
Response model for code references.
Source code in src/zenml/models/v2/core/code_reference.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
code_repository
property
The code_repository
property.
Returns:
Type | Description |
---|---|
CodeRepositoryResponse
|
the value of the property. |
commit
property
The commit
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
subdirectory
property
The subdirectory
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this code reference.
Returns:
Type | Description |
---|---|
CodeReferenceResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/code_reference.py
85 86 87 88 89 90 91 92 93 |
|
CodeReferenceResponseBody
Bases: BaseDatedResponseBody
Response body for code references.
Source code in src/zenml/models/v2/core/code_reference.py
56 57 58 59 60 61 62 63 64 65 |
|
CodeReferenceResponseMetadata
Bases: BaseResponseMetadata
Response metadata for code references.
Source code in src/zenml/models/v2/core/code_reference.py
68 69 |
|
CodeRepositoryFilter
Bases: ProjectScopedFilter
Model to enable advanced filtering of all code repositories.
Source code in src/zenml/models/v2/core/code_repository.py
184 185 186 187 188 189 190 |
|
CodeRepositoryRequest
Bases: ProjectScopedRequest
Request model for code repositories.
Source code in src/zenml/models/v2/core/code_repository.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
CodeRepositoryResponse
Bases: ProjectScopedResponse[CodeRepositoryResponseBody, CodeRepositoryResponseMetadata, CodeRepositoryResponseResources]
Response model for code repositories.
Source code in src/zenml/models/v2/core/code_repository.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
|
config
property
The config
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
logo_url
property
The logo_url
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
source
property
get_hydrated_version()
Get the hydrated version of this code repository.
Returns:
Type | Description |
---|---|
CodeRepositoryResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/code_repository.py
133 134 135 136 137 138 139 140 141 |
|
CodeRepositoryResponseBody
Bases: ProjectScopedResponseBody
Response body for code repositories.
Source code in src/zenml/models/v2/core/code_repository.py
91 92 93 94 95 96 97 98 99 |
|
CodeRepositoryResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for code repositories.
Source code in src/zenml/models/v2/core/code_repository.py
102 103 104 105 106 107 108 109 110 111 112 |
|
CodeRepositoryUpdate
Bases: BaseUpdate
Update model for code repositories.
Source code in src/zenml/models/v2/core/code_repository.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
ComponentBase
Bases: BaseModel
Base model for components.
Source code in src/zenml/models/v2/core/component.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
ComponentFilter
Bases: UserScopedFilter
Model to enable advanced stack component filtering.
Source code in src/zenml/models/v2/core/component.py
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
|
generate_filter(table)
Generate the filter for the query.
Stack components can be scoped by type to narrow the search.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The Table that is being queried from. |
required |
Returns:
Type | Description |
---|---|
Union[ColumnElement[bool]]
|
The filter expression for the query. |
Source code in src/zenml/models/v2/core/component.py
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
|
set_scope_type(component_type)
Set the type of component on which to perform the filtering to scope the response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
str
|
The type of component to scope the query to. |
required |
Source code in src/zenml/models/v2/core/component.py
383 384 385 386 387 388 389 |
|
ComponentInfo
Bases: BaseModel
Information about each stack components when creating a full stack.
Source code in src/zenml/models/v2/misc/info_models.py
34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
ComponentRequest
Bases: ComponentBase
, UserScopedRequest
Request model for stack components.
Source code in src/zenml/models/v2/core/component.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
name_cant_be_a_secret_reference(name)
classmethod
Validator to ensure that the given name is not a secret reference.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name to validate. |
required |
Returns:
Type | Description |
---|---|
str
|
The name if it is not a secret reference. |
Raises:
Type | Description |
---|---|
ValueError
|
If the name is a secret reference. |
Source code in src/zenml/models/v2/core/component.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
ComponentResponse
Bases: UserScopedResponse[ComponentResponseBody, ComponentResponseMetadata, ComponentResponseResources]
Response model for stack components.
Source code in src/zenml/models/v2/core/component.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
|
configuration
property
The configuration
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
connector
property
The connector
property.
Returns:
Type | Description |
---|---|
Optional[ServiceConnectorResponse]
|
the value of the property. |
connector_resource_id
property
The connector_resource_id
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
flavor
property
flavor_name
property
The flavor_name
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
integration
property
The integration
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
labels
property
The labels
property.
Returns:
Type | Description |
---|---|
Optional[Dict[str, Any]]
|
the value of the property. |
logo_url
property
The logo_url
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
type
property
get_analytics_metadata()
Add the component labels to analytics metadata.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict of analytics metadata. |
Source code in src/zenml/models/v2/core/component.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
|
get_hydrated_version()
Get the hydrated version of this component.
Returns:
Type | Description |
---|---|
ComponentResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/component.py
248 249 250 251 252 253 254 255 256 |
|
ComponentResponseBody
Bases: UserScopedResponseBody
Response body for stack components.
Source code in src/zenml/models/v2/core/component.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
|
ComponentResponseMetadata
Bases: UserScopedResponseMetadata
Response metadata for stack components.
Source code in src/zenml/models/v2/core/component.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|
ComponentResponseResources
Bases: UserScopedResponseResources
Response resources for stack components.
Source code in src/zenml/models/v2/core/component.py
204 205 206 207 208 209 |
|
ComponentUpdate
Bases: BaseUpdate
Update model for stack components.
Source code in src/zenml/models/v2/core/component.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
DefaultComponentRequest
Bases: ComponentRequest
Internal component request model used only for default stack components.
Source code in src/zenml/models/v2/core/component.py
123 124 |
|
DefaultStackRequest
Bases: StackRequest
Internal stack request model used only for default stacks.
Source code in src/zenml/models/v2/core/stack.py
132 133 |
|
DeployedStack
Bases: BaseModel
Information about a deployed stack.
Source code in src/zenml/models/v2/misc/stack_deployment.py
85 86 87 88 89 90 91 92 93 94 95 96 |
|
EventSourceFilter
Bases: ProjectScopedFilter
Model to enable advanced filtering of all EventSourceModels.
Source code in src/zenml/models/v2/core/event_source.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
|
EventSourceFlavorResponse
Bases: BasePluginFlavorResponse[EventSourceFlavorResponseBody, EventSourceFlavorResponseMetadata, EventSourceFlavorResponseResources]
Response model for Event Source Flavors.
Source code in src/zenml/models/v2/core/event_source_flavor.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
filter_config_schema
property
The filter_config_schema
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
source_config_schema
property
The source_config_schema
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
EventSourceFlavorResponseBody
Bases: BasePluginResponseBody
Response body for event flavors.
Source code in src/zenml/models/v2/core/event_source_flavor.py
26 27 |
|
EventSourceFlavorResponseMetadata
Bases: BasePluginResponseMetadata
Response metadata for event flavors.
Source code in src/zenml/models/v2/core/event_source_flavor.py
30 31 32 33 34 |
|
EventSourceFlavorResponseResources
Bases: BasePluginResponseResources
Response resources for event source flavors.
Source code in src/zenml/models/v2/core/event_source_flavor.py
37 38 |
|
EventSourceRequest
Bases: ProjectScopedRequest
BaseModel for all event sources.
Source code in src/zenml/models/v2/core/event_source.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
EventSourceResponse
Bases: ProjectScopedResponse[EventSourceResponseBody, EventSourceResponseMetadata, EventSourceResponseResources]
Response model for event sources.
Source code in src/zenml/models/v2/core/event_source.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
|
configuration
property
The configuration
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
flavor
property
The flavor
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
is_active
property
The is_active
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
plugin_subtype
property
get_hydrated_version()
Get the hydrated version of this event source.
Returns:
Type | Description |
---|---|
EventSourceResponse
|
An instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/event_source.py
161 162 163 164 165 166 167 168 169 |
|
set_configuration(configuration)
Set the configuration
property.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
configuration
|
Dict[str, Any]
|
The value to set. |
required |
Source code in src/zenml/models/v2/core/event_source.py
217 218 219 220 221 222 223 |
|
EventSourceResponseBody
Bases: ProjectScopedResponseBody
ResponseBody for event sources.
Source code in src/zenml/models/v2/core/event_source.py
111 112 113 114 115 116 117 118 119 120 121 122 123 |
|
EventSourceResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for event sources.
Source code in src/zenml/models/v2/core/event_source.py
126 127 128 129 130 131 132 133 134 135 136 |
|
EventSourceResponseResources
Bases: ProjectScopedResponseResources
Class for all resource models associated with the code repository entity.
Source code in src/zenml/models/v2/core/event_source.py
139 140 141 142 143 144 |
|
EventSourceUpdate
Bases: BaseUpdate
Update model for event sources.
Source code in src/zenml/models/v2/core/event_source.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
from_response(response)
classmethod
Create an update model from a response model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
response
|
EventSourceResponse
|
The response model to create the update model from. |
required |
Returns:
Type | Description |
---|---|
EventSourceUpdate
|
The update model. |
Source code in src/zenml/models/v2/core/event_source.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
ExternalUserModel
Bases: BaseModel
External user model.
Source code in src/zenml/models/v2/misc/external_user.py
22 23 24 25 26 27 28 29 30 |
|
FlavorFilter
Bases: UserScopedFilter
Model to enable advanced stack component flavor filtering.
Source code in src/zenml/models/v2/core/flavor.py
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
|
FlavorRequest
Bases: UserScopedRequest
Request model for stack component flavors.
Source code in src/zenml/models/v2/core/flavor.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
FlavorResponse
Bases: UserScopedResponse[FlavorResponseBody, FlavorResponseMetadata, FlavorResponseResources]
Response model for stack component flavors.
Source code in src/zenml/models/v2/core/flavor.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
|
config_schema
property
The config_schema
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
connector_requirements
property
Returns the connector requirements for the flavor.
Returns:
Type | Description |
---|---|
Optional[ServiceConnectorRequirements]
|
The connector requirements for the flavor. |
connector_resource_id_attr
property
The connector_resource_id_attr
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
connector_resource_type
property
The connector_resource_type
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
connector_type
property
The connector_type
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
docs_url
property
The docs_url
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
integration
property
The integration
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
is_custom
property
The is_custom
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
logo_url
property
The logo_url
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
sdk_docs_url
property
The sdk_docs_url
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
source
property
The source
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
type
property
get_hydrated_version()
Get the hydrated version of the flavor.
Returns:
Type | Description |
---|---|
FlavorResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/flavor.py
251 252 253 254 255 256 257 258 259 |
|
FlavorResponseBody
Bases: UserScopedResponseBody
Response body for stack component flavors.
Source code in src/zenml/models/v2/core/flavor.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
|
FlavorResponseMetadata
Bases: UserScopedResponseMetadata
Response metadata for stack component flavors.
Source code in src/zenml/models/v2/core/flavor.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
|
FlavorUpdate
Bases: BaseUpdate
Update model for stack component flavors.
Source code in src/zenml/models/v2/core/flavor.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
LoadedVisualization
Bases: BaseModel
Model for loaded visualizations.
Source code in src/zenml/models/v2/misc/loaded_visualization.py
23 24 25 26 27 |
|
LogsRequest
Bases: BaseRequest
Request model for logs.
Source code in src/zenml/models/v2/core/logs.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
str_field_max_length_check(value)
classmethod
Checks if the length of the value exceeds the maximum text length.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Any
|
the value set in the field |
required |
Returns:
Type | Description |
---|---|
Any
|
the value itself. |
Raises:
Type | Description |
---|---|
AssertionError
|
if the length of the field is longer than the maximum threshold. |
Source code in src/zenml/models/v2/core/logs.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
text_field_max_length_check(value)
classmethod
Checks if the length of the value exceeds the maximum text length.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Any
|
the value set in the field |
required |
Returns:
Type | Description |
---|---|
Any
|
the value itself. |
Raises:
Type | Description |
---|---|
AssertionError
|
if the length of the field is longer than the maximum threshold. |
Source code in src/zenml/models/v2/core/logs.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
LogsResponse
Bases: BaseIdentifiedResponse[LogsResponseBody, LogsResponseMetadata, LogsResponseResources]
Response model for logs.
Source code in src/zenml/models/v2/core/logs.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
|
artifact_store_id
property
The artifact_store_id
property.
Returns:
Type | Description |
---|---|
Union[str, UUID]
|
the value of the property. |
pipeline_run_id
property
The pipeline_run_id
property.
Returns:
Type | Description |
---|---|
Optional[Union[str, UUID]]
|
the value of the property. |
step_run_id
property
The step_run_id
property.
Returns:
Type | Description |
---|---|
Optional[Union[str, UUID]]
|
the value of the property. |
uri
property
The uri
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of these logs.
Returns:
Type | Description |
---|---|
LogsResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/logs.py
151 152 153 154 155 156 157 158 159 |
|
LogsResponseBody
Bases: BaseDatedResponseBody
Response body for logs.
Source code in src/zenml/models/v2/core/logs.py
92 93 94 95 96 97 98 |
|
LogsResponseMetadata
Bases: BaseResponseMetadata
Response metadata for logs.
Source code in src/zenml/models/v2/core/logs.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
str_field_max_length_check(value)
classmethod
Checks if the length of the value exceeds the maximum text length.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Any
|
the value set in the field |
required |
Returns:
Type | Description |
---|---|
Any
|
the value itself. |
Raises:
Type | Description |
---|---|
AssertionError
|
if the length of the field is longer than the maximum threshold. |
Source code in src/zenml/models/v2/core/logs.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
ModelFilter
Bases: ProjectScopedFilter
, TaggableFilter
Model to enable advanced filtering of all models.
Source code in src/zenml/models/v2/core/model.py
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
|
apply_sorting(query, table)
Apply sorting to the query for Models.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/core/model.py
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
|
ModelRequest
Bases: ProjectScopedRequest
Request model for models.
Source code in src/zenml/models/v2/core/model.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
ModelResponse
Bases: ProjectScopedResponse[ModelResponseBody, ModelResponseMetadata, ModelResponseResources]
Response model for models.
Source code in src/zenml/models/v2/core/model.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
|
audience
property
The audience
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
ethics
property
The ethics
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
latest_version_id
property
The latest_version_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
latest_version_name
property
The latest_version_name
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
license
property
The license
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
limitations
property
The limitations
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
save_models_to_registry
property
The save_models_to_registry
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
tags
property
trade_offs
property
The trade_offs
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
use_cases
property
The use_cases
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
versions
property
List all versions of the model.
Returns:
Type | Description |
---|---|
List[Model]
|
The list of all model version. |
get_hydrated_version()
Get the hydrated version of this model.
Returns:
Type | Description |
---|---|
ModelResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/model.py
202 203 204 205 206 207 208 209 210 |
|
ModelResponseBody
Bases: ProjectScopedResponseBody
Response body for models.
Source code in src/zenml/models/v2/core/model.py
132 133 134 135 136 137 138 139 |
|
ModelResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for models.
Source code in src/zenml/models/v2/core/model.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
|
ModelUpdate
Bases: BaseUpdate
Update model for models.
Source code in src/zenml/models/v2/core/model.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
ModelVersionArtifactFilter
Bases: BaseFilter
Model version pipeline run links filter model.
Source code in src/zenml/models/v2/core/model_version_artifact.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[Union[ColumnElement[bool]]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/model_version_artifact.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
|
ModelVersionArtifactRequest
Bases: BaseRequest
Request model for links between model versions and artifacts.
Source code in src/zenml/models/v2/core/model_version_artifact.py
43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
ModelVersionArtifactResponse
Bases: BaseIdentifiedResponse[ModelVersionArtifactResponseBody, BaseResponseMetadata, ModelVersionArtifactResponseResources]
Response model for links between model versions and artifacts.
Source code in src/zenml/models/v2/core/model_version_artifact.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
artifact_version
property
The artifact_version
property.
Returns:
Type | Description |
---|---|
ArtifactVersionResponse
|
the value of the property. |
model_version
property
The model_version
property.
Returns:
Type | Description |
---|---|
UUID
|
the value of the property. |
ModelVersionArtifactResponseBody
Bases: BaseDatedResponseBody
Response body for links between model versions and artifacts.
Source code in src/zenml/models/v2/core/model_version_artifact.py
65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
ModelVersionFilter
Bases: ProjectScopedFilter
, TaggableFilter
, RunMetadataFilterMixin
Filter model for model versions.
Source code in src/zenml/models/v2/core/model_version.py
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 |
|
apply_filter(query, table)
Applies the filter to a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Raises:
Type | Description |
---|---|
ValueError
|
if the filter is not scoped to a model. |
Source code in src/zenml/models/v2/core/model_version.py
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 |
|
ModelVersionPipelineRunFilter
Bases: BaseFilter
Model version pipeline run links filter model.
Source code in src/zenml/models/v2/core/model_version_pipeline_run.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/model_version_pipeline_run.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
|
ModelVersionPipelineRunRequest
Bases: BaseRequest
Request model for links between model versions and pipeline runs.
Source code in src/zenml/models/v2/core/model_version_pipeline_run.py
42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
ModelVersionPipelineRunResponse
Bases: BaseIdentifiedResponse[ModelVersionPipelineRunResponseBody, BaseResponseMetadata, ModelVersionPipelineRunResponseResources]
Response model for links between model versions and pipeline runs.
Source code in src/zenml/models/v2/core/model_version_pipeline_run.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
model_version
property
The model_version
property.
Returns:
Type | Description |
---|---|
UUID
|
the value of the property. |
pipeline_run
property
ModelVersionPipelineRunResponseBody
Bases: BaseDatedResponseBody
Response body for links between model versions and pipeline runs.
Source code in src/zenml/models/v2/core/model_version_pipeline_run.py
64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
ModelVersionRequest
Bases: ProjectScopedRequest
Request model for model versions.
Source code in src/zenml/models/v2/core/model_version.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
ModelVersionResponse
Bases: ProjectScopedResponse[ModelVersionResponseBody, ModelVersionResponseMetadata, ModelVersionResponseResources]
Response model for model versions.
Source code in src/zenml/models/v2/core/model_version.py
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
|
data_artifact_ids
property
The data_artifact_ids
property.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, UUID]]
|
the value of the property. |
data_artifacts
property
Get all data artifacts linked to this model version.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dictionary of data artifacts with versions as |
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dict[str, Dict[str, ArtifactResponse]] |
deployment_artifact_ids
property
The deployment_artifact_ids
property.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, UUID]]
|
the value of the property. |
deployment_artifacts
property
Get all deployment artifacts linked to this model version.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dictionary of deployment artifacts with versions as |
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dict[str, Dict[str, ArtifactResponse]] |
description
property
The description
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
model
property
model_artifact_ids
property
The model_artifact_ids
property.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, UUID]]
|
the value of the property. |
model_artifacts
property
Get all model artifacts linked to this model version.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dictionary of model artifacts with versions as |
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dict[str, Dict[str, ArtifactResponse]] |
number
property
The number
property.
Returns:
Type | Description |
---|---|
int
|
the value of the property. |
pipeline_run_ids
property
The pipeline_run_ids
property.
Returns:
Type | Description |
---|---|
Dict[str, UUID]
|
the value of the property. |
pipeline_runs
property
Get all pipeline runs linked to this version.
Returns:
Type | Description |
---|---|
Dict[str, PipelineRunResponse]
|
Dictionary of Pipeline Runs as PipelineRunResponseModel |
run_metadata
property
The run_metadata
property.
Returns:
Type | Description |
---|---|
Dict[str, MetadataType]
|
the value of the property. |
stage
property
The stage
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
tags
property
get_artifact(name, version=None)
Get the artifact linked to this model version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the artifact to retrieve. |
required |
version
|
Optional[str]
|
The version of the artifact to retrieve (None for latest/non-versioned) |
None
|
Returns:
Type | Description |
---|---|
Optional[ArtifactVersionResponse]
|
Specific version of an artifact or None |
Source code in src/zenml/models/v2/core/model_version.py
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
|
get_data_artifact(name, version=None)
Get the data artifact linked to this model version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the data artifact to retrieve. |
required |
version
|
Optional[str]
|
The version of the data artifact to retrieve (None for latest/non-versioned) |
None
|
Returns:
Type | Description |
---|---|
Optional[ArtifactVersionResponse]
|
Specific version of the data artifact or None |
Source code in src/zenml/models/v2/core/model_version.py
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 |
|
get_deployment_artifact(name, version=None)
Get the deployment artifact linked to this model version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the deployment artifact to retrieve. |
required |
version
|
Optional[str]
|
The version of the deployment artifact to retrieve (None for latest/non-versioned) |
None
|
Returns:
Type | Description |
---|---|
Optional[ArtifactVersionResponse]
|
Specific version of the deployment artifact or None |
Source code in src/zenml/models/v2/core/model_version.py
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
|
get_hydrated_version()
Get the hydrated version of this model version.
Returns:
Type | Description |
---|---|
ModelVersionResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/model_version.py
307 308 309 310 311 312 313 314 315 |
|
get_model_artifact(name, version=None)
Get the model artifact linked to this model version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the model artifact to retrieve. |
required |
version
|
Optional[str]
|
The version of the model artifact to retrieve (None for latest/non-versioned) |
None
|
Returns:
Type | Description |
---|---|
Optional[ArtifactVersionResponse]
|
Specific version of the model artifact or None |
Source code in src/zenml/models/v2/core/model_version.py
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
|
get_pipeline_run(name)
Get pipeline run linked to this version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the pipeline run to retrieve. |
required |
Returns:
Type | Description |
---|---|
PipelineRunResponse
|
PipelineRun as PipelineRunResponseModel |
Source code in src/zenml/models/v2/core/model_version.py
525 526 527 528 529 530 531 532 533 534 535 536 |
|
set_stage(stage, force=False)
Sets this Model Version to a desired stage.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stage
|
Union[str, ModelStages]
|
the target stage for model version. |
required |
force
|
bool
|
whether to force archiving of current model version in target stage or raise. |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
if model_stage is not valid. |
Source code in src/zenml/models/v2/core/model_version.py
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
|
to_model_class(suppress_class_validation_warnings=True)
Convert response model to Model object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
suppress_class_validation_warnings
|
bool
|
internally used to suppress repeated warnings. |
True
|
Returns:
Type | Description |
---|---|
Model
|
Model object |
Source code in src/zenml/models/v2/core/model_version.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
|
ModelVersionResponseBody
Bases: ProjectScopedResponseBody
Response body for model versions.
Source code in src/zenml/models/v2/core/model_version.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
|
ModelVersionResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for model versions.
Source code in src/zenml/models/v2/core/model_version.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
ModelVersionResponseResources
Bases: ProjectScopedResponseResources
Class for all resource models associated with the model version entity.
Source code in src/zenml/models/v2/core/model_version.py
194 195 196 197 198 199 |
|
ModelVersionUpdate
Bases: BaseUpdate
Update model for model versions.
Source code in src/zenml/models/v2/core/model_version.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|
NumericFilter
Bases: Filter
Filter for all numeric fields.
Source code in src/zenml/models/v2/base/filter.py
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
|
generate_query_conditions_from_column(column)
Generate query conditions for a numeric column.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
column
|
Any
|
The numeric column of an SQLModel table on which to filter. |
required |
Returns:
Type | Description |
---|---|
Any
|
A list of query conditions. |
Source code in src/zenml/models/v2/base/filter.py
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
|
OAuthDeviceAuthorizationRequest
Bases: BaseModel
OAuth2 device authorization grant request.
Source code in src/zenml/models/v2/misc/auth_models.py
28 29 30 31 32 |
|
OAuthDeviceAuthorizationResponse
Bases: BaseModel
OAuth2 device authorization grant response.
Source code in src/zenml/models/v2/misc/auth_models.py
104 105 106 107 108 109 110 111 112 |
|
OAuthDeviceFilter
Bases: UserScopedFilter
Model to enable advanced filtering of OAuth2 devices.
Source code in src/zenml/models/v2/core/device.py
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
|
OAuthDeviceInternalRequest
Bases: BaseRequest
Internal request model for OAuth2 devices.
Source code in src/zenml/models/v2/core/device.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
OAuthDeviceInternalResponse
Bases: OAuthDeviceResponse
OAuth2 device response model used internally for authentication.
Source code in src/zenml/models/v2/core/device.py
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
|
verify_device_code(device_code)
Verifies a given device code against the stored (hashed) device code.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_code
|
str
|
The device code to verify. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the device code is valid, False otherwise. |
Source code in src/zenml/models/v2/core/device.py
422 423 424 425 426 427 428 429 430 431 432 433 434 |
|
verify_user_code(user_code)
Verifies a given user code against the stored (hashed) user code.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_code
|
str
|
The user code to verify. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the user code is valid, False otherwise. |
Source code in src/zenml/models/v2/core/device.py
408 409 410 411 412 413 414 415 416 417 418 419 420 |
|
OAuthDeviceInternalUpdate
Bases: OAuthDeviceUpdate
OAuth2 device update model used internally for authentication.
Source code in src/zenml/models/v2/core/device.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
OAuthDeviceResponse
Bases: UserScopedResponse[OAuthDeviceResponseBody, OAuthDeviceResponseMetadata, OAuthDeviceResponseResources]
Response model for OAuth2 devices.
Source code in src/zenml/models/v2/core/device.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
|
city
property
The city
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
client_id
property
The client_id
property.
Returns:
Type | Description |
---|---|
UUID
|
the value of the property. |
country
property
The country
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
expires
property
The expires
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
failed_auth_attempts
property
The failed_auth_attempts
property.
Returns:
Type | Description |
---|---|
int
|
the value of the property. |
hostname
property
The hostname
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
ip_address
property
The ip_address
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
last_login
property
The last_login
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
os
property
The os
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
python_version
property
The python_version
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
region
property
The region
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
status
property
trusted_device
property
The trusted_device
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
zenml_version
property
The zenml_version
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this OAuth2 device.
Returns:
Type | Description |
---|---|
OAuthDeviceResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/device.py
241 242 243 244 245 246 247 248 249 |
|
OAuthDeviceResponseBody
Bases: UserScopedResponseBody
Response body for OAuth2 devices.
Source code in src/zenml/models/v2/core/device.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
OAuthDeviceResponseMetadata
Bases: UserScopedResponseMetadata
Response metadata for OAuth2 devices.
Source code in src/zenml/models/v2/core/device.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
|
OAuthDeviceTokenRequest
Bases: BaseModel
OAuth2 device authorization grant request.
Source code in src/zenml/models/v2/misc/auth_models.py
42 43 44 45 46 47 |
|
OAuthDeviceUpdate
Bases: BaseUpdate
OAuth2 device update model.
Source code in src/zenml/models/v2/core/device.py
85 86 87 88 89 90 91 92 |
|
OAuthDeviceUserAgentHeader
Bases: BaseModel
OAuth2 device user agent header.
Source code in src/zenml/models/v2/misc/auth_models.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
decode(header_str)
classmethod
Decode the user agent header.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
header_str
|
str
|
The user agent header string value. |
required |
Returns:
Type | Description |
---|---|
OAuthDeviceUserAgentHeader
|
The decoded user agent header. |
Source code in src/zenml/models/v2/misc/auth_models.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
encode()
Encode the user agent header.
Returns:
Type | Description |
---|---|
str
|
The encoded user agent header. |
Source code in src/zenml/models/v2/misc/auth_models.py
85 86 87 88 89 90 91 92 93 94 95 96 |
|
OAuthDeviceVerificationRequest
Bases: BaseModel
OAuth2 device authorization verification request.
Source code in src/zenml/models/v2/misc/auth_models.py
35 36 37 38 39 |
|
OAuthRedirectResponse
Bases: BaseModel
Redirect response.
Source code in src/zenml/models/v2/misc/auth_models.py
133 134 135 136 |
|
OAuthTokenResponse
Bases: BaseModel
OAuth2 device authorization token response.
Source code in src/zenml/models/v2/misc/auth_models.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
Page
Bases: BaseModel
, Generic[B]
Return Model for List Models to accommodate pagination.
Source code in src/zenml/models/v2/base/page.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
size
property
Return the item count of the page.
Returns:
Type | Description |
---|---|
int
|
The amount of items in the page. |
__contains__(item)
Returns whether the page contains a specific item.
This enables item in page
checks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
item
|
B
|
The item to check for. |
required |
Returns:
Type | Description |
---|---|
bool
|
Whether the item is in the page. |
Source code in src/zenml/models/v2/base/page.py
81 82 83 84 85 86 87 88 89 90 91 92 |
|
__getitem__(index)
Return the item at the given index.
This enables page[index]
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int
|
The index to get the item from. |
required |
Returns:
Type | Description |
---|---|
B
|
The item at the given index. |
Source code in src/zenml/models/v2/base/page.py
57 58 59 60 61 62 63 64 65 66 67 68 |
|
__iter__()
Return an iterator over the items in the page.
This enables for item in page
loops, but breaks dict(page)
.
Yields:
Type | Description |
---|---|
B
|
An iterator over the items in the page. |
Source code in src/zenml/models/v2/base/page.py
70 71 72 73 74 75 76 77 78 79 |
|
__len__()
Return the item count of the page.
This enables len(page)
.
Returns:
Type | Description |
---|---|
int
|
The amount of items in the page. |
Source code in src/zenml/models/v2/base/page.py
47 48 49 50 51 52 53 54 55 |
|
PipelineBuildBase
Bases: BaseZenModel
Base model for pipeline builds.
Source code in src/zenml/models/v2/core/pipeline_build.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
requires_code_download
property
Whether the build requires code download.
Returns:
Type | Description |
---|---|
bool
|
Whether the build requires code download. |
get_image(component_key, step=None)
Get the image built for a specific key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_key
|
str
|
The key for which to get the image. |
required |
step
|
Optional[str]
|
The pipeline step for which to get the image. If no image exists for this step, will fall back to the pipeline image for the same key. |
None
|
Returns:
Type | Description |
---|---|
str
|
The image name or digest. |
Source code in src/zenml/models/v2/core/pipeline_build.py
107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
get_image_key(component_key, step=None)
staticmethod
Get the image key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_key
|
str
|
The component key. |
required |
step
|
Optional[str]
|
The pipeline step for which the image was built. |
None
|
Returns:
Type | Description |
---|---|
str
|
The image key. |
Source code in src/zenml/models/v2/core/pipeline_build.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
get_settings_checksum(component_key, step=None)
Get the settings checksum for a specific key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_key
|
str
|
The key for which to get the checksum. |
required |
step
|
Optional[str]
|
The pipeline step for which to get the checksum. If no image exists for this step, will fall back to the pipeline image for the same key. |
None
|
Returns:
Type | Description |
---|---|
Optional[str]
|
The settings checksum. |
Source code in src/zenml/models/v2/core/pipeline_build.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
PipelineBuildFilter
Bases: ProjectScopedFilter
Model to enable advanced filtering of all pipeline builds.
Source code in src/zenml/models/v2/core/pipeline_build.py
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/pipeline_build.py
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
|
PipelineBuildRequest
Bases: PipelineBuildBase
, ProjectScopedRequest
Request model for pipelines builds.
Source code in src/zenml/models/v2/core/pipeline_build.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
PipelineBuildResponse
Bases: ProjectScopedResponse[PipelineBuildResponseBody, PipelineBuildResponseMetadata, PipelineBuildResponseResources]
Response model for pipeline builds.
Source code in src/zenml/models/v2/core/pipeline_build.py
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
|
checksum
property
The checksum
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
contains_code
property
The contains_code
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
duration
property
The duration
property.
Returns:
Type | Description |
---|---|
Optional[int]
|
the value of the property. |
images
property
is_local
property
The is_local
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
pipeline
property
The pipeline
property.
Returns:
Type | Description |
---|---|
Optional[PipelineResponse]
|
the value of the property. |
python_version
property
The python_version
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
requires_code_download
property
Whether the build requires code download.
Returns:
Type | Description |
---|---|
bool
|
Whether the build requires code download. |
stack
property
stack_checksum
property
The stack_checksum
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
zenml_version
property
The zenml_version
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
get_hydrated_version()
Return the hydrated version of this pipeline build.
Returns:
Type | Description |
---|---|
PipelineBuildResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/pipeline_build.py
247 248 249 250 251 252 253 254 255 |
|
get_image(component_key, step=None)
Get the image built for a specific key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_key
|
str
|
The key for which to get the image. |
required |
step
|
Optional[str]
|
The pipeline step for which to get the image. If no image exists for this step, will fall back to the pipeline image for the same key. |
None
|
Returns:
Type | Description |
---|---|
str
|
The image name or digest. |
Source code in src/zenml/models/v2/core/pipeline_build.py
315 316 317 318 319 320 321 322 323 324 325 326 327 |
|
get_image_key(component_key, step=None)
staticmethod
Get the image key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_key
|
str
|
The component key. |
required |
step
|
Optional[str]
|
The pipeline step for which the image was built. |
None
|
Returns:
Type | Description |
---|---|
str
|
The image key. |
Source code in src/zenml/models/v2/core/pipeline_build.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
|
get_settings_checksum(component_key, step=None)
Get the settings checksum for a specific key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_key
|
str
|
The key for which to get the checksum. |
required |
step
|
Optional[str]
|
The pipeline step for which to get the checksum. If no image exists for this step, will fall back to the pipeline image for the same key. |
None
|
Returns:
Type | Description |
---|---|
Optional[str]
|
The settings checksum. |
Source code in src/zenml/models/v2/core/pipeline_build.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
|
to_yaml()
Create a yaml representation of the pipeline build.
Create a yaml representation of the pipeline build that can be used to create a PipelineBuildBase instance.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The yaml representation of the pipeline build. |
Source code in src/zenml/models/v2/core/pipeline_build.py
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
|
PipelineBuildResponseBody
Bases: ProjectScopedResponseBody
Response body for pipeline builds.
Source code in src/zenml/models/v2/core/pipeline_build.py
196 197 |
|
PipelineBuildResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for pipeline builds.
Source code in src/zenml/models/v2/core/pipeline_build.py
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
|
PipelineDeploymentBase
Bases: BaseZenModel
Base model for pipeline deployments.
Source code in src/zenml/models/v2/core/pipeline_deployment.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
should_prevent_build_reuse
property
Whether the deployment prevents a build reuse.
Returns:
Type | Description |
---|---|
bool
|
Whether the deployment prevents a build reuse. |
PipelineDeploymentFilter
Bases: ProjectScopedFilter
Model to enable advanced filtering of all pipeline deployments.
Source code in src/zenml/models/v2/core/pipeline_deployment.py
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
PipelineDeploymentRequest
Bases: PipelineDeploymentBase
, ProjectScopedRequest
Request model for pipeline deployments.
Source code in src/zenml/models/v2/core/pipeline_deployment.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
PipelineDeploymentResponse
Bases: ProjectScopedResponse[PipelineDeploymentResponseBody, PipelineDeploymentResponseMetadata, PipelineDeploymentResponseResources]
Response model for pipeline deployments.
Source code in src/zenml/models/v2/core/pipeline_deployment.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
|
build
property
The build
property.
Returns:
Type | Description |
---|---|
Optional[PipelineBuildResponse]
|
the value of the property. |
client_environment
property
The client_environment
property.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
the value of the property. |
client_version
property
The client_version
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
code_path
property
The code_path
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
code_reference
property
The code_reference
property.
Returns:
Type | Description |
---|---|
Optional[CodeReferenceResponse]
|
the value of the property. |
pipeline
property
The pipeline
property.
Returns:
Type | Description |
---|---|
Optional[PipelineResponse]
|
the value of the property. |
pipeline_configuration
property
The pipeline_configuration
property.
Returns:
Type | Description |
---|---|
PipelineConfiguration
|
the value of the property. |
pipeline_spec
property
The pipeline_spec
property.
Returns:
Type | Description |
---|---|
Optional[PipelineSpec]
|
the value of the property. |
pipeline_version_hash
property
The pipeline_version_hash
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
run_name_template
property
The run_name_template
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
schedule
property
The schedule
property.
Returns:
Type | Description |
---|---|
Optional[ScheduleResponse]
|
the value of the property. |
server_version
property
The server_version
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
stack
property
step_configurations
property
The step_configurations
property.
Returns:
Type | Description |
---|---|
Dict[str, Step]
|
the value of the property. |
template_id
property
The template_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
get_hydrated_version()
Return the hydrated version of this pipeline deployment.
Returns:
Type | Description |
---|---|
PipelineDeploymentResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/pipeline_deployment.py
206 207 208 209 210 211 212 213 214 |
|
PipelineDeploymentResponseBody
Bases: ProjectScopedResponseBody
Response body for pipeline deployments.
Source code in src/zenml/models/v2/core/pipeline_deployment.py
130 131 |
|
PipelineDeploymentResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for pipeline deployments.
Source code in src/zenml/models/v2/core/pipeline_deployment.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
PipelineFilter
Bases: ProjectScopedFilter
, TaggableFilter
Pipeline filter model.
Source code in src/zenml/models/v2/core/pipeline.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
|
apply_filter(query, table)
Applies the filter to a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/core/pipeline.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
|
apply_sorting(query, table)
Apply sorting to the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/core/pipeline.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
|
PipelineRequest
Bases: ProjectScopedRequest
Request model for pipelines.
Source code in src/zenml/models/v2/core/pipeline.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
PipelineResponse
Bases: ProjectScopedResponse[PipelineResponseBody, PipelineResponseMetadata, PipelineResponseResources]
Response model for pipelines.
Source code in src/zenml/models/v2/core/pipeline.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
|
last_run
property
Returns the last run of this pipeline.
Returns:
Type | Description |
---|---|
PipelineRunResponse
|
The last run of this pipeline. |
Raises:
Type | Description |
---|---|
RuntimeError
|
If no runs were found for this pipeline. |
last_successful_run
property
Returns the last successful run of this pipeline.
Returns:
Type | Description |
---|---|
PipelineRunResponse
|
The last successful run of this pipeline. |
Raises:
Type | Description |
---|---|
RuntimeError
|
If no successful runs were found for this pipeline. |
latest_run_id
property
The latest_run_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
latest_run_status
property
The latest_run_status
property.
Returns:
Type | Description |
---|---|
Optional[ExecutionStatus]
|
the value of the property. |
num_runs
property
Returns the number of runs of this pipeline.
Returns:
Type | Description |
---|---|
int
|
The number of runs of this pipeline. |
runs
property
Returns the 20 most recent runs of this pipeline in descending order.
Returns:
Type | Description |
---|---|
List[PipelineRunResponse]
|
The 20 most recent runs of this pipeline in descending order. |
tags
property
get_hydrated_version()
Get the hydrated version of this pipeline.
Returns:
Type | Description |
---|---|
PipelineResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/pipeline.py
146 147 148 149 150 151 152 153 154 |
|
get_runs(**kwargs)
Get runs of this pipeline.
Can be used to fetch runs other than self.runs
and supports
fine-grained filtering and pagination.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Further arguments for filtering or pagination that are
passed to |
{}
|
Returns:
Type | Description |
---|---|
List[PipelineRunResponse]
|
List of runs of this pipeline. |
Source code in src/zenml/models/v2/core/pipeline.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
PipelineResponseBody
Bases: ProjectScopedResponseBody
Response body for pipelines.
Source code in src/zenml/models/v2/core/pipeline.py
98 99 100 101 102 103 104 105 106 107 108 |
|
PipelineResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for pipelines.
Source code in src/zenml/models/v2/core/pipeline.py
111 112 113 114 115 116 117 |
|
PipelineResponseResources
Bases: ProjectScopedResponseResources
Class for all resource models associated with the pipeline entity.
Source code in src/zenml/models/v2/core/pipeline.py
120 121 122 123 124 125 126 127 128 129 |
|
PipelineRunFilter
Bases: ProjectScopedFilter
, TaggableFilter
, RunMetadataFilterMixin
Model to enable advanced filtering of all pipeline runs.
Source code in src/zenml/models/v2/core/pipeline_run.py
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 |
|
apply_sorting(query, table)
Apply sorting to the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/core/pipeline_run.py
909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/pipeline_run.py
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 |
|
PipelineRunRequest
Bases: ProjectScopedRequest
Request model for pipeline runs.
Source code in src/zenml/models/v2/core/pipeline_run.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|
PipelineRunResponse
Bases: ProjectScopedResponse[PipelineRunResponseBody, PipelineRunResponseMetadata, PipelineRunResponseResources]
Response model for pipeline runs.
Source code in src/zenml/models/v2/core/pipeline_run.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
|
artifact_versions
property
Get all artifact versions that are outputs of steps of this run.
Returns:
Type | Description |
---|---|
List[ArtifactVersionResponse]
|
All output artifact versions of this run (including cached ones). |
build
property
The build
property.
Returns:
Type | Description |
---|---|
Optional[PipelineBuildResponse]
|
the value of the property. |
client_environment
property
The client_environment
property.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
the value of the property. |
code_path
property
The code_path
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
code_reference
property
The schedule
property.
Returns:
Type | Description |
---|---|
Optional[CodeReferenceResponse]
|
the value of the property. |
config
property
The config
property.
Returns:
Type | Description |
---|---|
PipelineConfiguration
|
the value of the property. |
deployment_id
property
The deployment_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
end_time
property
The end_time
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
is_templatable
property
The is_templatable
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
model_version
property
The model_version
property.
Returns:
Type | Description |
---|---|
Optional[ModelVersionResponse]
|
the value of the property. |
model_version_id
property
The model_version_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
orchestrator_environment
property
The orchestrator_environment
property.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
the value of the property. |
orchestrator_run_id
property
The orchestrator_run_id
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
pipeline
property
The pipeline
property.
Returns:
Type | Description |
---|---|
Optional[PipelineResponse]
|
the value of the property. |
produced_artifact_versions
property
Get all artifact versions produced during this pipeline run.
Returns:
Type | Description |
---|---|
List[ArtifactVersionResponse]
|
A list of all artifact versions produced during this pipeline run. |
run_metadata
property
The run_metadata
property.
Returns:
Type | Description |
---|---|
Dict[str, MetadataType]
|
the value of the property. |
schedule
property
The schedule
property.
Returns:
Type | Description |
---|---|
Optional[ScheduleResponse]
|
the value of the property. |
stack
property
start_time
property
The start_time
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
status
property
step_substitutions
property
The step_substitutions
property.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, str]]
|
the value of the property. |
steps
property
tags
property
template_id
property
The template_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
trigger_execution
property
The trigger_execution
property.
Returns:
Type | Description |
---|---|
Optional[TriggerExecutionResponse]
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this pipeline run.
Returns:
Type | Description |
---|---|
PipelineRunResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/pipeline_run.py
279 280 281 282 283 284 285 286 287 |
|
refresh_run_status()
Method to refresh the status of a run if it is initializing/running.
Returns:
Type | Description |
---|---|
PipelineRunResponse
|
The updated pipeline. |
Raises:
Type | Description |
---|---|
ValueError
|
If the stack of the run response is None. |
Source code in src/zenml/models/v2/core/pipeline_run.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
|
PipelineRunResponseBody
Bases: ProjectScopedResponseBody
Response body for pipeline runs.
Source code in src/zenml/models/v2/core/pipeline_run.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
PipelineRunResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for pipeline runs.
Source code in src/zenml/models/v2/core/pipeline_run.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
|
PipelineRunResponseResources
Bases: ProjectScopedResponseResources
Class for all resource models associated with the pipeline run entity.
Source code in src/zenml/models/v2/core/pipeline_run.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
|
PipelineRunUpdate
Bases: BaseUpdate
Pipeline run update model.
Source code in src/zenml/models/v2/core/pipeline_run.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
PipelineUpdate
Bases: BaseUpdate
Update model for pipelines.
Source code in src/zenml/models/v2/core/pipeline.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
ProjectFilter
Bases: BaseFilter
Model to enable advanced filtering of all projects.
Source code in src/zenml/models/v2/core/project.py
192 193 194 195 196 197 198 199 200 201 202 203 |
|
ProjectRequest
Bases: BaseRequest
Request model for projects.
Source code in src/zenml/models/v2/core/project.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
ProjectResponse
Bases: BaseIdentifiedResponse[ProjectResponseBody, ProjectResponseMetadata, ProjectResponseResources]
Response model for projects.
Source code in src/zenml/models/v2/core/project.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
description
property
The description
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
display_name
property
The display_name
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this project.
Returns:
Type | Description |
---|---|
ProjectResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/project.py
158 159 160 161 162 163 164 165 166 |
|
ProjectResponseBody
Bases: BaseDatedResponseBody
Response body for projects.
Source code in src/zenml/models/v2/core/project.py
121 122 123 124 125 126 127 |
|
ProjectResponseMetadata
Bases: BaseResponseMetadata
Response metadata for projects.
Source code in src/zenml/models/v2/core/project.py
130 131 132 133 134 135 136 137 |
|
ProjectScopedFilter
Bases: UserScopedFilter
Model to enable advanced scoping with project.
Source code in src/zenml/models/v2/base/scoped.py
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
|
apply_filter(query, table)
Applies the filter to a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Raises:
Type | Description |
---|---|
ValueError
|
If the project scope is missing from the filter. |
Source code in src/zenml/models/v2/base/scoped.py
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
|
ProjectScopedRequest
Bases: UserScopedRequest
Base project-scoped request domain model.
Used as a base class for all domain models that are project-scoped.
Source code in src/zenml/models/v2/base/scoped.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
get_analytics_metadata()
Fetches the analytics metadata for project scoped models.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The analytics metadata. |
Source code in src/zenml/models/v2/base/scoped.py
91 92 93 94 95 96 97 98 99 |
|
ProjectScopedResponse
Bases: UserScopedResponse[ProjectBody, ProjectMetadata, ProjectResources]
, Generic[ProjectBody, ProjectMetadata, ProjectResources]
Base project-scoped domain model.
Used as a base class for all domain models that are project-scoped.
Source code in src/zenml/models/v2/base/scoped.py
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
|
project
property
get_analytics_metadata()
Fetches the analytics metadata for project scoped models.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The analytics metadata. |
Source code in src/zenml/models/v2/base/scoped.py
322 323 324 325 326 327 328 329 330 331 |
|
ProjectScopedResponseBody
Bases: UserScopedResponseBody
Base project-scoped body.
Source code in src/zenml/models/v2/base/scoped.py
289 290 |
|
ProjectScopedResponseMetadata
Bases: UserScopedResponseMetadata
Base project-scoped metadata.
Source code in src/zenml/models/v2/base/scoped.py
293 294 295 296 |
|
ProjectScopedResponseResources
Bases: UserScopedResponseResources
Base project-scoped resources.
Source code in src/zenml/models/v2/base/scoped.py
299 300 |
|
ProjectStatistics
Bases: BaseZenModel
Project statistics.
Source code in src/zenml/models/v2/misc/statistics.py
23 24 25 26 27 28 29 30 31 |
|
ProjectUpdate
Bases: BaseUpdate
Update model for projects.
Source code in src/zenml/models/v2/core/project.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
ResourceTypeModel
Bases: BaseModel
Resource type specification.
Describes the authentication methods and resource instantiation model for one or more resource types.
Source code in src/zenml/models/v2/misc/service_connector_type.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
emojified_resource_type
property
Get the emojified resource type.
Returns:
Type | Description |
---|---|
str
|
The emojified resource type. |
ResourcesInfo
Bases: BaseModel
Information about the resources needed for CLI and UI.
Source code in src/zenml/models/v2/misc/info_models.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
RunMetadataEntry
Bases: BaseModel
Utility class to sort/list run metadata entries.
Source code in src/zenml/models/v2/misc/run_metadata.py
32 33 34 35 36 37 38 |
|
RunMetadataFilterMixin
Bases: BaseFilter
Model to enable filtering and sorting by run metadata.
Source code in src/zenml/models/v2/base/scoped.py
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 |
|
get_custom_filters(table)
Get custom run metadata filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/base/scoped.py
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 |
|
validate_run_metadata_format()
Validates that run_metadata entries are in the correct format.
Each run_metadata entry must be in one of the following formats: 1. "key:value" - Direct equality comparison (key equals value) 2. "key:filterop:value" - Where filterop is one of the GenericFilterOps: - equals: Exact match - notequals: Not equal to - contains: String contains value - startswith: String starts with value - endswith: String ends with value - oneof: Value is one of the specified options - gte: Greater than or equal to - gt: Greater than - lte: Less than or equal to - lt: Less than - in: Value is in a list
Examples: - "status:completed" - Find entries where status equals "completed" - "name:contains:test" - Find entries where name contains "test" - "duration:gt:10" - Find entries where duration is greater than 10
Returns:
Type | Description |
---|---|
RunMetadataFilterMixin
|
self |
Raises:
Type | Description |
---|---|
ValueError
|
If any entry in run_metadata does not contain a colon. |
Source code in src/zenml/models/v2/base/scoped.py
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
|
RunMetadataRequest
Bases: ProjectScopedRequest
Request model for run metadata.
Source code in src/zenml/models/v2/core/run_metadata.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
validate_values_keys()
Validates if the keys in the metadata are properly defined.
Returns:
Type | Description |
---|---|
RunMetadataRequest
|
self |
Raises:
Type | Description |
---|---|
ValueError
|
if one of the key in the metadata contains |
Source code in src/zenml/models/v2/core/run_metadata.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
RunMetadataResource
Bases: BaseModel
Utility class to help identify resources to tag metadata to.
Source code in src/zenml/models/v2/misc/run_metadata.py
25 26 27 28 29 |
|
RunTemplateFilter
Bases: ProjectScopedFilter
, TaggableFilter
Model for filtering of run templates.
Source code in src/zenml/models/v2/core/run_template.py
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/run_template.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
|
RunTemplateRequest
Bases: ProjectScopedRequest
Request model for run templates.
Source code in src/zenml/models/v2/core/run_template.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
RunTemplateResponse
Bases: ProjectScopedResponse[RunTemplateResponseBody, RunTemplateResponseMetadata, RunTemplateResponseResources]
Response model for run templates.
Source code in src/zenml/models/v2/core/run_template.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
|
build
property
The build
property.
Returns:
Type | Description |
---|---|
Optional[PipelineBuildResponse]
|
the value of the property. |
code_reference
property
The code_reference
property.
Returns:
Type | Description |
---|---|
Optional[CodeReferenceResponse]
|
the value of the property. |
config_schema
property
The config_schema
property.
Returns:
Type | Description |
---|---|
Optional[Dict[str, Any]]
|
the value of the property. |
config_template
property
The config_template
property.
Returns:
Type | Description |
---|---|
Optional[Dict[str, Any]]
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
hidden
property
The hidden
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
latest_run_id
property
The latest_run_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
latest_run_status
property
The latest_run_status
property.
Returns:
Type | Description |
---|---|
Optional[ExecutionStatus]
|
the value of the property. |
pipeline
property
The pipeline
property.
Returns:
Type | Description |
---|---|
Optional[PipelineResponse]
|
the value of the property. |
pipeline_spec
property
The pipeline_spec
property.
Returns:
Type | Description |
---|---|
Optional[PipelineSpec]
|
the value of the property. |
runnable
property
The runnable
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
source_deployment
property
The source_deployment
property.
Returns:
Type | Description |
---|---|
Optional[PipelineDeploymentResponse]
|
the value of the property. |
tags
property
get_hydrated_version()
Return the hydrated version of this run template.
Returns:
Type | Description |
---|---|
RunTemplateResponse
|
The hydrated run template. |
Source code in src/zenml/models/v2/core/run_template.py
198 199 200 201 202 203 204 205 206 207 208 |
|
RunTemplateResponseBody
Bases: ProjectScopedResponseBody
Response body for run templates.
Source code in src/zenml/models/v2/core/run_template.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
RunTemplateResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for run templates.
Source code in src/zenml/models/v2/core/run_template.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
RunTemplateResponseResources
Bases: ProjectScopedResponseResources
All resource models associated with the run template.
Source code in src/zenml/models/v2/core/run_template.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
|
RunTemplateUpdate
Bases: BaseUpdate
Run template update model.
Source code in src/zenml/models/v2/core/run_template.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
ScheduleFilter
Bases: ProjectScopedFilter
Model to enable advanced filtering of all Users.
Source code in src/zenml/models/v2/core/schedule.py
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
|
ScheduleRequest
Bases: ProjectScopedRequest
Request model for schedules.
Source code in src/zenml/models/v2/core/schedule.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
ScheduleResponse
Bases: ProjectScopedResponse[ScheduleResponseBody, ScheduleResponseMetadata, ScheduleResponseResources]
Response model for schedules.
Source code in src/zenml/models/v2/core/schedule.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
|
active
property
The active
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
catchup
property
The catchup
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
cron_expression
property
The cron_expression
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
end_time
property
The end_time
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
interval_second
property
The interval_second
property.
Returns:
Type | Description |
---|---|
Optional[timedelta]
|
the value of the property. |
orchestrator_id
property
The orchestrator_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
pipeline_id
property
The pipeline_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
run_metadata
property
The run_metadata
property.
Returns:
Type | Description |
---|---|
Dict[str, MetadataType]
|
the value of the property. |
run_once_start_time
property
The run_once_start_time
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
start_time
property
The start_time
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
utc_end_time
property
Optional ISO-formatted string of the UTC end time.
Returns:
Type | Description |
---|---|
Optional[str]
|
Optional ISO-formatted string of the UTC end time. |
utc_start_time
property
Optional ISO-formatted string of the UTC start time.
Returns:
Type | Description |
---|---|
Optional[str]
|
Optional ISO-formatted string of the UTC start time. |
get_hydrated_version()
Get the hydrated version of this schedule.
Returns:
Type | Description |
---|---|
ScheduleResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/schedule.py
177 178 179 180 181 182 183 184 185 |
|
ScheduleResponseBody
Bases: ProjectScopedResponseBody
Response body for schedules.
Source code in src/zenml/models/v2/core/schedule.py
135 136 137 138 139 140 141 142 143 144 |
|
ScheduleResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for schedules.
Source code in src/zenml/models/v2/core/schedule.py
147 148 149 150 151 152 153 154 155 156 |
|
ScheduleUpdate
Bases: BaseUpdate
Update model for schedules.
Source code in src/zenml/models/v2/core/schedule.py
126 127 128 129 |
|
SecretFilter
Bases: UserScopedFilter
Model to enable advanced secret filtering.
Source code in src/zenml/models/v2/core/secret.py
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
|
apply_filter(query, table)
Applies the filter to a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/core/secret.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
|
SecretRequest
Bases: UserScopedRequest
Request model for secrets.
Source code in src/zenml/models/v2/core/secret.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
secret_values
property
A dictionary with all un-obfuscated values stored in this secret.
The values are returned as strings, not SecretStr. If a value is None, it is not included in the returned dictionary. This is to enable the use of None values in the update model to indicate that a secret value should be deleted.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
A dictionary containing the secret's values. |
SecretResponse
Bases: UserScopedResponse[SecretResponseBody, SecretResponseMetadata, SecretResponseResources]
Response model for secrets.
Source code in src/zenml/models/v2/core/secret.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
has_missing_values
property
Returns True if the secret has missing values (i.e. None).
Values can be missing from a secret for example if the user retrieves a secret but does not have the permission to view the secret values.
Returns:
Type | Description |
---|---|
bool
|
True if the secret has any values set to None. |
private
property
The private
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
secret_values
property
A dictionary with all un-obfuscated values stored in this secret.
The values are returned as strings, not SecretStr. If a value is None, it is not included in the returned dictionary. This is to enable the use of None values in the update model to indicate that a secret value should be deleted.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
A dictionary containing the secret's values. |
values
property
The values
property.
Returns:
Type | Description |
---|---|
Dict[str, Optional[SecretStr]]
|
the value of the property. |
add_secret(key, value)
Adds a secret value to the secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The key of the secret value. |
required |
value
|
str
|
The secret value. |
required |
Source code in src/zenml/models/v2/core/secret.py
225 226 227 228 229 230 231 232 |
|
get_hydrated_version()
Get the hydrated version of this secret.
Returns:
Type | Description |
---|---|
SecretResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/secret.py
164 165 166 167 168 169 170 171 172 |
|
remove_secret(key)
Removes a secret value from the secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The key of the secret value. |
required |
Source code in src/zenml/models/v2/core/secret.py
234 235 236 237 238 239 240 |
|
remove_secrets()
Removes all secret values from the secret but keep the keys.
Source code in src/zenml/models/v2/core/secret.py
242 243 244 |
|
set_secrets(values)
Sets the secret values of the secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
values
|
Dict[str, str]
|
The secret values to set. |
required |
Source code in src/zenml/models/v2/core/secret.py
246 247 248 249 250 251 252 |
|
SecretResponseBody
Bases: UserScopedResponseBody
Response body for secrets.
Source code in src/zenml/models/v2/core/secret.py
127 128 129 130 131 132 133 134 135 136 137 |
|
SecretResponseMetadata
Bases: UserScopedResponseMetadata
Response metadata for secrets.
Source code in src/zenml/models/v2/core/secret.py
140 141 |
|
SecretUpdate
Bases: BaseUpdate
Update model for secrets.
Source code in src/zenml/models/v2/core/secret.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
get_secret_values_update()
Returns a dictionary with the secret values to update.
Returns:
Type | Description |
---|---|
Dict[str, Optional[str]]
|
A dictionary with the secret values to update. |
Source code in src/zenml/models/v2/core/secret.py
109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
ServerActivationRequest
Bases: ServerSettingsUpdate
Model for activating the server.
Source code in src/zenml/models/v2/core/server_settings.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
|
ServerDatabaseType
Bases: StrEnum
Enum for server database types.
Source code in src/zenml/models/v2/misc/server_models.py
42 43 44 45 46 47 |
|
ServerDeploymentType
Bases: StrEnum
Enum for server deployment types.
Source code in src/zenml/models/v2/misc/server_models.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
ServerLoadInfo
Bases: BaseModel
Domain model for ZenML server load information.
Source code in src/zenml/models/v2/misc/server_models.py
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ServerModel
Bases: BaseModel
Domain model for ZenML servers.
Source code in src/zenml/models/v2/misc/server_models.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
|
is_local()
Return whether the server is running locally.
Returns:
Type | Description |
---|---|
bool
|
True if the server is running locally, False otherwise. |
Source code in src/zenml/models/v2/misc/server_models.py
146 147 148 149 150 151 152 153 154 155 156 |
|
is_pro_server()
Return whether the server is a ZenML Pro server.
Returns:
Type | Description |
---|---|
bool
|
True if the server is a ZenML Pro server, False otherwise. |
Source code in src/zenml/models/v2/misc/server_models.py
158 159 160 161 162 163 164 |
|
ServerSettingsResponse
Bases: BaseResponse[ServerSettingsResponseBody, ServerSettingsResponseMetadata, ServerSettingsResponseResources]
Response model for server settings.
Source code in src/zenml/models/v2/core/server_settings.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|
active
property
The active
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
display_announcements
property
The display_announcements
property.
Returns:
Type | Description |
---|---|
Optional[bool]
|
the value of the property. |
display_updates
property
The display_updates
property.
Returns:
Type | Description |
---|---|
Optional[bool]
|
the value of the property. |
enable_analytics
property
The enable_analytics
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
last_user_activity
property
The last_user_activity
property.
Returns:
Type | Description |
---|---|
datetime
|
the value of the property. |
logo_url
property
The logo_url
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
server_id
property
The server_id
property.
Returns:
Type | Description |
---|---|
UUID
|
the value of the property. |
server_name
property
The server_name
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
updated
property
The updated
property.
Returns:
Type | Description |
---|---|
datetime
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of the server settings.
Returns:
Type | Description |
---|---|
ServerSettingsResponse
|
An instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/server_settings.py
110 111 112 113 114 115 116 117 118 |
|
ServerSettingsResponseBody
Bases: BaseResponseBody
Response body for server settings.
Source code in src/zenml/models/v2/core/server_settings.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
ServerSettingsResponseMetadata
Bases: BaseResponseMetadata
Response metadata for server settings.
Source code in src/zenml/models/v2/core/server_settings.py
93 94 |
|
ServerSettingsResponseResources
Bases: BaseResponseResources
Response resources for server settings.
Source code in src/zenml/models/v2/core/server_settings.py
97 98 |
|
ServerSettingsUpdate
Bases: BaseUpdate
Model for updating server settings.
Source code in src/zenml/models/v2/core/server_settings.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
ServerStatistics
Bases: BaseZenModel
Server statistics.
Source code in src/zenml/models/v2/misc/statistics.py
34 35 36 37 38 39 40 41 42 43 44 45 |
|
ServiceAccountFilter
Bases: BaseFilter
Model to enable advanced filtering of service accounts.
Source code in src/zenml/models/v2/core/service_account.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
apply_filter(query, table)
Override to filter out user accounts from the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/core/service_account.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
ServiceAccountRequest
Bases: BaseRequest
Request model for service accounts.
Source code in src/zenml/models/v2/core/service_account.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
ServiceAccountResponse
Bases: BaseIdentifiedResponse[ServiceAccountResponseBody, ServiceAccountResponseMetadata, ServiceAccountResponseResources]
Response model for service accounts.
Source code in src/zenml/models/v2/core/service_account.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
active
property
The active
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this service account.
Returns:
Type | Description |
---|---|
ServiceAccountResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/service_account.py
126 127 128 129 130 131 132 133 134 |
|
to_user_model()
Converts the service account to a user model.
For now, a lot of code still relies on the active user and resource owners being a UserResponse object, which is a superset of the ServiceAccountResponse object. We need this method to convert the service account to a user.
Returns:
Type | Description |
---|---|
UserResponse
|
The user model. |
Source code in src/zenml/models/v2/core/service_account.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
|
ServiceAccountResponseBody
Bases: BaseDatedResponseBody
Response body for service accounts.
Source code in src/zenml/models/v2/core/service_account.py
87 88 89 90 |
|
ServiceAccountResponseMetadata
Bases: BaseResponseMetadata
Response metadata for service accounts.
Source code in src/zenml/models/v2/core/service_account.py
93 94 95 96 97 98 99 100 |
|
ServiceAccountUpdate
Bases: BaseUpdate
Update model for service accounts.
Source code in src/zenml/models/v2/core/service_account.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
ServiceConnectorFilter
Bases: UserScopedFilter
Model to enable advanced filtering of service connectors.
Source code in src/zenml/models/v2/core/service_connector.py
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 |
|
validate_labels()
Parse the labels string into a label dictionary and vice-versa.
Returns:
Type | Description |
---|---|
ServiceConnectorFilter
|
The validated values. |
Source code in src/zenml/models/v2/core/service_connector.py
843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 |
|
ServiceConnectorInfo
Bases: BaseModel
Information about the service connector when creating a full stack.
Source code in src/zenml/models/v2/misc/info_models.py
26 27 28 29 30 31 |
|
ServiceConnectorRequest
Bases: UserScopedRequest
Request model for service connectors.
Source code in src/zenml/models/v2/core/service_connector.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
|
emojified_connector_type
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
str
|
The emojified connector type. |
emojified_resource_types
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
List[str]
|
The emojified connector type. |
type
property
Get the connector type.
Returns:
Type | Description |
---|---|
str
|
The connector type. |
get_analytics_metadata()
Format the resource types in the analytics metadata.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict of analytics metadata. |
Source code in src/zenml/models/v2/core/service_connector.py
120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
validate_and_configure_resources(connector_type, resource_types=None, resource_id=None, configuration=None, secrets=None)
Validate and configure the resources that the connector can be used to access.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_type
|
ServiceConnectorTypeModel
|
The connector type specification used to validate the connector configuration. |
required |
resource_types
|
Optional[Union[str, List[str]]]
|
The type(s) of resource that the connector instance can be used to access. If omitted, a multi-type connector is configured. |
None
|
resource_id
|
Optional[str]
|
Uniquely identifies a specific resource instance that the connector instance can be used to access. |
None
|
configuration
|
Optional[Dict[str, Any]]
|
The connector configuration. |
None
|
secrets
|
Optional[Dict[str, Optional[SecretStr]]]
|
The connector secrets. |
None
|
Source code in src/zenml/models/v2/core/service_connector.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
|
ServiceConnectorRequirements
Bases: BaseModel
Service connector requirements.
Describes requirements that a service connector consumer has for a service connector instance that it needs in order to access a resource.
Attributes:
Name | Type | Description |
---|---|---|
connector_type |
Optional[str]
|
The type of service connector that is required. If omitted, any service connector type can be used. |
resource_type |
str
|
The type of resource that the service connector instance must be able to access. |
resource_id_attr |
Optional[str]
|
The name of an attribute in the stack component configuration that contains the resource ID of the resource that the service connector instance must be able to access. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
|
is_satisfied_by(connector, component)
Check if the requirements are satisfied by a connector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector
|
Union[ServiceConnectorResponse, ServiceConnectorRequest]
|
The connector to check. |
required |
component
|
Union[ComponentResponse, ComponentBase]
|
The stack component that the connector is associated with. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the requirements are satisfied, False otherwise, and a |
str
|
message describing the reason for the failure. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
|
ServiceConnectorResourcesInfo
Bases: BaseModel
Information about the service connector resources needed for CLI and UI.
Source code in src/zenml/models/v2/misc/info_models.py
73 74 75 76 77 78 |
|
ServiceConnectorResourcesModel
Bases: BaseModel
Service connector resources list.
Lists the resource types and resource instances that a service connector can provide access to.
Source code in src/zenml/models/v2/misc/service_connector_type.py
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 |
|
emojified_connector_type
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
str
|
The emojified connector type. |
resource_types
property
Get the resource types.
Returns:
Type | Description |
---|---|
List[str]
|
The resource types. |
resources_dict
property
Get the resources as a dictionary indexed by resource type.
Returns:
Type | Description |
---|---|
Dict[str, ServiceConnectorTypedResourcesModel]
|
The resources as a dictionary indexed by resource type. |
type
property
Get the connector type.
Returns:
Type | Description |
---|---|
str
|
The connector type. |
from_connector_model(connector_model, resource_type=None)
classmethod
Initialize a resource model from a connector model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_model
|
ServiceConnectorResponse
|
The connector model. |
required |
resource_type
|
Optional[str]
|
The resource type to set on the resource model. If omitted, the resource type is set according to the connector model. |
None
|
Returns:
Type | Description |
---|---|
ServiceConnectorResourcesModel
|
A resource list model instance. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 |
|
get_default_resource_id()
Get the default resource ID, if included in the resource list.
The default resource ID is a resource ID supplied by the connector implementation only for resource types that do not support multiple instances.
Returns:
Type | Description |
---|---|
Optional[str]
|
The default resource ID, or None if no resource ID is set. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 |
|
get_emojified_resource_types(resource_type=None)
Get the emojified resource type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_type
|
Optional[str]
|
The resource type to get the emojified resource type for. If omitted, the emojified resource type for all resource types is returned. |
None
|
Returns:
Type | Description |
---|---|
List[str]
|
The list of emojified resource types. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 |
|
set_error(error, resource_type=None)
Set a global error message or an error for a single resource type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
error
|
str
|
The error message. |
required |
resource_type
|
Optional[str]
|
The resource type to set the error message for. If omitted, or if there is only one resource type involved, the error message is (also) set globally. |
None
|
Raises:
Type | Description |
---|---|
KeyError
|
If the resource type is not found in the resources list. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 |
|
set_resource_ids(resource_type, resource_ids)
Set the resource IDs for a resource type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_type
|
str
|
The resource type to set the resource IDs for. |
required |
resource_ids
|
List[str]
|
The resource IDs to set. |
required |
Raises:
Type | Description |
---|---|
KeyError
|
If the resource type is not found in the resources list. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 |
|
ServiceConnectorResponse
Bases: UserScopedResponse[ServiceConnectorResponseBody, ServiceConnectorResponseMetadata, ServiceConnectorResponseResources]
Response model for service connectors.
Source code in src/zenml/models/v2/core/service_connector.py
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 |
|
auth_method
property
The auth_method
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
configuration
property
The configuration
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
connector_type
property
The connector_type
property.
Returns:
Type | Description |
---|---|
Union[str, ServiceConnectorTypeModel]
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
emojified_connector_type
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
str
|
The emojified connector type. |
emojified_resource_types
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
List[str]
|
The emojified connector type. |
expiration_seconds
property
The expiration_seconds
property.
Returns:
Type | Description |
---|---|
Optional[int]
|
the value of the property. |
expires_at
property
The expires_at
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
expires_skew_tolerance
property
The expires_skew_tolerance
property.
Returns:
Type | Description |
---|---|
Optional[int]
|
the value of the property. |
full_configuration
property
Get the full connector configuration, including secrets.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
The full connector configuration, including secrets. |
is_multi_instance
property
Checks if the connector is multi-instance.
A multi-instance connector is configured to access multiple instances of the configured resource type.
Returns:
Type | Description |
---|---|
bool
|
True if the connector is multi-instance, False otherwise. |
is_multi_type
property
Checks if the connector is multi-type.
A multi-type connector can be used to access multiple types of resources.
Returns:
Type | Description |
---|---|
bool
|
True if the connector is multi-type, False otherwise. |
is_single_instance
property
Checks if the connector is single-instance.
A single-instance connector is configured to access only a single instance of the configured resource type or does not support multiple resource instances.
Returns:
Type | Description |
---|---|
bool
|
True if the connector is single-instance, False otherwise. |
labels
property
The labels
property.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
the value of the property. |
resource_id
property
The resource_id
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
resource_types
property
The resource_types
property.
Returns:
Type | Description |
---|---|
List[str]
|
the value of the property. |
secret_id
property
The secret_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
secrets
property
The secrets
property.
Returns:
Type | Description |
---|---|
Dict[str, Optional[SecretStr]]
|
the value of the property. |
supports_instances
property
The supports_instances
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
type
property
Get the connector type.
Returns:
Type | Description |
---|---|
str
|
The connector type. |
get_analytics_metadata()
Add the service connector labels to analytics metadata.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict of analytics metadata. |
Source code in src/zenml/models/v2/core/service_connector.py
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
|
get_hydrated_version()
Get the hydrated version of this service connector.
Returns:
Type | Description |
---|---|
ServiceConnectorResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/service_connector.py
515 516 517 518 519 520 521 522 523 |
|
set_connector_type(value)
Auxiliary method to set the connector type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Union[str, ServiceConnectorTypeModel]
|
the new value for the connector type. |
required |
Source code in src/zenml/models/v2/core/service_connector.py
620 621 622 623 624 625 626 627 628 |
|
validate_and_configure_resources(connector_type, resource_types=None, resource_id=None, configuration=None, secrets=None)
Validate and configure the resources that the connector can be used to access.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_type
|
ServiceConnectorTypeModel
|
The connector type specification used to validate the connector configuration. |
required |
resource_types
|
Optional[Union[str, List[str]]]
|
The type(s) of resource that the connector instance can be used to access. If omitted, a multi-type connector is configured. |
None
|
resource_id
|
Optional[str]
|
Uniquely identifies a specific resource instance that the connector instance can be used to access. |
None
|
configuration
|
Optional[Dict[str, Any]]
|
The connector configuration. |
None
|
secrets
|
Optional[Dict[str, Optional[SecretStr]]]
|
The connector secrets. |
None
|
Source code in src/zenml/models/v2/core/service_connector.py
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
|
ServiceConnectorResponseBody
Bases: UserScopedResponseBody
Response body for service connectors.
Source code in src/zenml/models/v2/core/service_connector.py
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
|
ServiceConnectorResponseMetadata
Bases: UserScopedResponseMetadata
Response metadata for service connectors.
Source code in src/zenml/models/v2/core/service_connector.py
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 |
|
ServiceConnectorTypeModel
Bases: BaseModel
Service connector type specification.
Describes the types of resources to which the service connector can be used to gain access and the authentication methods that are supported by the service connector.
The connector type, resource types, resource IDs and authentication methods can all be used as search criteria to lookup and filter service connector instances that are compatible with the requirements of a consumer (e.g. a stack component).
Source code in src/zenml/models/v2/misc/service_connector_type.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
|
auth_method_dict
property
Returns a map of authentication methods to authentication method specifications.
Returns:
Type | Description |
---|---|
Dict[str, AuthenticationMethodModel]
|
A map of authentication methods to authentication method |
Dict[str, AuthenticationMethodModel]
|
specifications. |
connector_class
property
Get the service connector class.
Returns:
Type | Description |
---|---|
Optional[Type[ServiceConnector]]
|
The service connector class. |
emojified_connector_type
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
str
|
The emojified connector type. |
emojified_resource_types
property
Get the emojified connector types.
Returns:
Type | Description |
---|---|
List[str]
|
The emojified connector types. |
resource_type_dict
property
Returns a map of resource types to resource type specifications.
Returns:
Type | Description |
---|---|
Dict[str, ResourceTypeModel]
|
A map of resource types to resource type specifications. |
find_resource_specifications(auth_method, resource_type=None)
Find the specifications for a configurable resource.
Validate the supplied connector configuration parameters against the connector specification and return the matching authentication method specification and resource specification.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth_method
|
str
|
The name of the authentication method. |
required |
resource_type
|
Optional[str]
|
The type of resource being configured. |
None
|
Returns:
Type | Description |
---|---|
AuthenticationMethodModel
|
The authentication method specification and resource specification |
Optional[ResourceTypeModel]
|
for the specified authentication method and resource type. |
Raises:
Type | Description |
---|---|
KeyError
|
If the authentication method is not supported by the connector for the specified resource type and ID. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
|
set_connector_class(connector_class)
Set the service connector class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_class
|
Type[ServiceConnector]
|
The service connector class. |
required |
Source code in src/zenml/models/v2/misc/service_connector_type.py
321 322 323 324 325 326 327 328 329 |
|
validate_auth_methods(values)
classmethod
Validate that the authentication methods are unique.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
values
|
List[AuthenticationMethodModel]
|
The list of authentication methods. |
required |
Returns:
Type | Description |
---|---|
List[AuthenticationMethodModel]
|
The list of authentication methods. |
Raises:
Type | Description |
---|---|
ValueError
|
If two or more authentication method specifications share the same authentication method value. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
|
validate_resource_types(values)
classmethod
Validate that the resource types are unique.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
values
|
List[ResourceTypeModel]
|
The list of resource types. |
required |
Returns:
Type | Description |
---|---|
List[ResourceTypeModel]
|
The list of resource types. |
Raises:
Type | Description |
---|---|
ValueError
|
If two or more resource type specifications list the same resource type. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
|
ServiceConnectorTypedResourcesModel
Bases: BaseModel
Service connector typed resources list.
Lists the resource instances that a service connector can provide access to.
Source code in src/zenml/models/v2/misc/service_connector_type.py
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 |
|
ServiceConnectorUpdate
Bases: BaseUpdate
Model used for service connector updates.
Most fields in the update model are optional and will not be updated if omitted. However, the following fields are "special" and leaving them out will also cause the corresponding value to be removed from the service connector in the database:
- the
resource_id
field - the
expiration_seconds
field
In addition to the above exceptions, the following rules apply:
- the
configuration
andsecrets
fields together represent a full valid configuration update, not just a partial update. If either is set (i.e. not None) in the update, their values are merged together and will replace the existing configuration and secrets values. - the
labels
field is also a full labels update: if set (i.e. notNone
), all existing labels are removed and replaced by the new labels in the update.
NOTE: the attributes here override the ones in the base class, so they have a None default value.
Source code in src/zenml/models/v2/core/service_connector.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
|
type
property
Get the connector type.
Returns:
Type | Description |
---|---|
Optional[str]
|
The connector type. |
convert_to_request()
Method to generate a service connector request object from self.
For certain operations, the service connector update model need to adhere to the limitations set by the request model. In order to use update models in such situations, we need to be able to convert an update model into a request model.
Returns:
Type | Description |
---|---|
ServiceConnectorRequest
|
The equivalent request model |
Raises:
Type | Description |
---|---|
RuntimeError
|
if the model can not be converted to a request model. |
Source code in src/zenml/models/v2/core/service_connector.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
|
get_analytics_metadata()
Format the resource types in the analytics metadata.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict of analytics metadata. |
Source code in src/zenml/models/v2/core/service_connector.py
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
|
validate_and_configure_resources(connector_type, resource_types=None, resource_id=None, configuration=None, secrets=None)
Validate and configure the resources that the connector can be used to access.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_type
|
ServiceConnectorTypeModel
|
The connector type specification used to validate the connector configuration. |
required |
resource_types
|
Optional[Union[str, List[str]]]
|
The type(s) of resource that the connector instance can be used to access. If omitted, a multi-type connector is configured. |
None
|
resource_id
|
Optional[str]
|
Uniquely identifies a specific resource instance that the connector instance can be used to access. |
None
|
configuration
|
Optional[Dict[str, Any]]
|
The connector configuration. |
None
|
secrets
|
Optional[Dict[str, Optional[SecretStr]]]
|
The connector secrets. |
None
|
Source code in src/zenml/models/v2/core/service_connector.py
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
|
ServiceFilter
Bases: ProjectScopedFilter
Model to enable advanced filtering of services.
Source code in src/zenml/models/v2/core/service.py
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
|
generate_filter(table)
Generate the filter for the query.
Services can be scoped by type to narrow the search.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The Table that is being queried from. |
required |
Returns:
Type | Description |
---|---|
Union[ColumnElement[bool]]
|
The filter expression for the query. |
Source code in src/zenml/models/v2/core/service.py
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
|
set_flavor(flavor)
Set the flavor of the service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
flavor
|
str
|
The flavor of the service. |
required |
Source code in src/zenml/models/v2/core/service.py
467 468 469 470 471 472 473 |
|
set_type(type)
Set the type of the service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type
|
str
|
The type of the service. |
required |
Source code in src/zenml/models/v2/core/service.py
459 460 461 462 463 464 465 |
|
ServiceRequest
Bases: ProjectScopedRequest
Request model for services.
Source code in src/zenml/models/v2/core/service.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
ServiceResponse
Bases: ProjectScopedResponse[ServiceResponseBody, ServiceResponseMetadata, ServiceResponseResources]
Response model for services.
Source code in src/zenml/models/v2/core/service.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
|
admin_state
property
The admin_state
property.
Returns:
Type | Description |
---|---|
Optional[ServiceState]
|
the value of the property. |
config
property
The config
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
created
property
The created
property.
Returns:
Type | Description |
---|---|
datetime
|
the value of the property. |
endpoint
property
The endpoint
property.
Returns:
Type | Description |
---|---|
Optional[Dict[str, Any]]
|
the value of the property. |
health_check_url
property
The health_check_url
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
labels
property
The labels
property.
Returns:
Type | Description |
---|---|
Optional[Dict[str, str]]
|
the value of the property. |
model_version
property
The model_version
property.
Returns:
Type | Description |
---|---|
Optional[ModelVersionResponse]
|
the value of the property. |
pipeline_run
property
The pipeline_run
property.
Returns:
Type | Description |
---|---|
Optional[PipelineRunResponse]
|
the value of the property. |
prediction_url
property
The prediction_url
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
service_source
property
The service_source
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
service_type
property
state
property
status
property
The status
property.
Returns:
Type | Description |
---|---|
Optional[Dict[str, Any]]
|
the value of the property. |
updated
property
The updated
property.
Returns:
Type | Description |
---|---|
datetime
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this artifact.
Returns:
Type | Description |
---|---|
ServiceResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/service.py
265 266 267 268 269 270 271 272 273 |
|
ServiceResponseBody
Bases: ProjectScopedResponseBody
Response body for services.
Source code in src/zenml/models/v2/core/service.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
|
ServiceResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for services.
Source code in src/zenml/models/v2/core/service.py
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
|
ServiceResponseResources
Bases: ProjectScopedResponseResources
Class for all resource models associated with the service entity.
Source code in src/zenml/models/v2/core/service.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
|
ServiceType
Bases: BaseModel
Service type descriptor.
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
service type |
flavor |
str
|
service flavor |
name |
str
|
name of the service type |
description |
str
|
description of the service type |
logo_url |
str
|
logo of the service type |
Source code in src/zenml/models/v2/misc/service.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
ServiceUpdate
Bases: BaseUpdate
Update model for stack components.
Source code in src/zenml/models/v2/core/service.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
|
StackDeploymentConfig
Bases: BaseModel
Configuration about a stack deployment.
Source code in src/zenml/models/v2/misc/stack_deployment.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
StackDeploymentInfo
Bases: BaseModel
Information about a stack deployment.
Source code in src/zenml/models/v2/misc/stack_deployment.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
StackFilter
Bases: UserScopedFilter
Model to enable advanced stack filtering.
Source code in src/zenml/models/v2/core/stack.py
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/stack.py
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
|
StackRequest
Bases: UserScopedRequest
Request model for stack creation.
Source code in src/zenml/models/v2/core/stack.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
is_valid
property
Check if the stack is valid.
Returns:
Type | Description |
---|---|
bool
|
True if the stack is valid, False otherwise. |
StackResponse
Bases: UserScopedResponse[StackResponseBody, StackResponseMetadata, StackResponseResources]
Response model for stacks.
Source code in src/zenml/models/v2/core/stack.py
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
|
components
property
The components
property.
Returns:
Type | Description |
---|---|
Dict[StackComponentType, List[ComponentResponse]]
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
is_valid
property
Check if the stack is valid.
Returns:
Type | Description |
---|---|
bool
|
True if the stack is valid, False otherwise. |
labels
property
The labels
property.
Returns:
Type | Description |
---|---|
Optional[Dict[str, Any]]
|
the value of the property. |
stack_spec_path
property
The stack_spec_path
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
get_analytics_metadata()
Add the stack components to the stack analytics metadata.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict of analytics metadata. |
Source code in src/zenml/models/v2/core/stack.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
|
get_hydrated_version()
Get the hydrated version of this stack.
Returns:
Type | Description |
---|---|
StackResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/stack.py
213 214 215 216 217 218 219 220 221 |
|
to_yaml()
Create yaml representation of the Stack Model.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The yaml representation of the Stack Model. |
Source code in src/zenml/models/v2/core/stack.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
|
StackResponseBody
Bases: UserScopedResponseBody
Response body for stacks.
Source code in src/zenml/models/v2/core/stack.py
170 171 |
|
StackResponseMetadata
Bases: UserScopedResponseMetadata
Response metadata for stacks.
Source code in src/zenml/models/v2/core/stack.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
|
StackUpdate
Bases: BaseUpdate
Update model for stacks.
Source code in src/zenml/models/v2/core/stack.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
|
StepRunFilter
Bases: ProjectScopedFilter
, RunMetadataFilterMixin
Model to enable advanced filtering of step runs.
Source code in src/zenml/models/v2/core/step_run.py
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/step_run.py
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
|
StepRunRequest
Bases: ProjectScopedRequest
Request model for step runs.
Source code in src/zenml/models/v2/core/step_run.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
StepRunResponse
Bases: ProjectScopedResponse[StepRunResponseBody, StepRunResponseMetadata, StepRunResponseResources]
Response model for step runs.
Source code in src/zenml/models/v2/core/step_run.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 |
|
cache_key
property
The cache_key
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
code_hash
property
The code_hash
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
config
property
The config
property.
Returns:
Type | Description |
---|---|
StepConfiguration
|
the value of the property. |
deployment_id
property
The deployment_id
property.
Returns:
Type | Description |
---|---|
UUID
|
the value of the property. |
docstring
property
The docstring
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
end_time
property
The end_time
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
input
property
Returns the input artifact that was used to run this step.
Returns:
Type | Description |
---|---|
ArtifactVersionResponse
|
The input artifact. |
Raises:
Type | Description |
---|---|
ValueError
|
If there were zero or multiple inputs to this step. |
inputs
property
The inputs
property.
Returns:
Type | Description |
---|---|
Dict[str, StepRunInputResponse]
|
the value of the property. |
logs
property
model_version
property
The model_version
property.
Returns:
Type | Description |
---|---|
Optional[ModelVersionResponse]
|
the value of the property. |
model_version_id
property
The model_version_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
original_step_run_id
property
The original_step_run_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
output
property
Returns the output artifact that was written by this step.
Returns:
Type | Description |
---|---|
ArtifactVersionResponse
|
The output artifact. |
Raises:
Type | Description |
---|---|
ValueError
|
If there were zero or multiple step outputs. |
outputs
property
The outputs
property.
Returns:
Type | Description |
---|---|
Dict[str, List[ArtifactVersionResponse]]
|
the value of the property. |
parent_step_ids
property
The parent_step_ids
property.
Returns:
Type | Description |
---|---|
List[UUID]
|
the value of the property. |
pipeline_run_id
property
The pipeline_run_id
property.
Returns:
Type | Description |
---|---|
UUID
|
the value of the property. |
run_metadata
property
The run_metadata
property.
Returns:
Type | Description |
---|---|
Dict[str, MetadataType]
|
the value of the property. |
source_code
property
The source_code
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
spec
property
The spec
property.
Returns:
Type | Description |
---|---|
StepSpec
|
the value of the property. |
start_time
property
The start_time
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
status
property
get_hydrated_version()
Get the hydrated version of this step run.
Returns:
Type | Description |
---|---|
StepRunResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/step_run.py
279 280 281 282 283 284 285 286 287 |
|
StepRunResponseBody
Bases: ProjectScopedResponseBody
Response body for step runs.
Source code in src/zenml/models/v2/core/step_run.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
|
StepRunResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for step runs.
Source code in src/zenml/models/v2/core/step_run.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
|
StepRunResponseResources
Bases: ProjectScopedResponseResources
Class for all resource models associated with the step run entity.
Source code in src/zenml/models/v2/core/step_run.py
253 254 255 256 257 258 259 260 261 262 263 264 |
|
StepRunUpdate
Bases: BaseUpdate
Update model for step runs.
Source code in src/zenml/models/v2/core/step_run.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
|
StrFilter
Bases: Filter
Filter for all string fields.
Source code in src/zenml/models/v2/base/filter.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
|
check_value_if_operation_oneof()
Validator to check if value is a list if oneof operation is used.
Raises:
Type | Description |
---|---|
ValueError
|
If the value is not a list |
Returns:
Type | Description |
---|---|
StrFilter
|
self |
Source code in src/zenml/models/v2/base/filter.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
|
generate_query_conditions_from_column(column)
Generate query conditions for a string column.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
column
|
Any
|
The string column of an SQLModel table on which to filter. |
required |
Returns:
Type | Description |
---|---|
Any
|
A list of query conditions. |
Source code in src/zenml/models/v2/base/filter.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
|
TagFilter
Bases: UserScopedFilter
Model to enable advanced filtering of all tags.
Source code in src/zenml/models/v2/core/tag.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/tag.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
TagRequest
Bases: UserScopedRequest
Request model for tags.
Source code in src/zenml/models/v2/core/tag.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
validate_name_not_uuid(value)
classmethod
Validates that the tag name is not a UUID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
str
|
The tag name to validate. |
required |
Returns:
Type | Description |
---|---|
str
|
The validated tag name. |
Raises:
Type | Description |
---|---|
ValueError
|
If the tag name can be converted to a UUID. |
Source code in src/zenml/models/v2/core/tag.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
TagResource
Bases: BaseModel
Utility class to help identify resources to tag.
Source code in src/zenml/models/v2/misc/tag.py
23 24 25 26 27 |
|
TagResourceRequest
Bases: BaseRequest
Request model for links between tags and resources.
Source code in src/zenml/models/v2/core/tag_resource.py
30 31 32 33 34 35 |
|
TagResourceResponse
Bases: BaseIdentifiedResponse[TagResourceResponseBody, BaseResponseMetadata, TagResourceResponseResources]
Response model for the links between tags and resources.
Source code in src/zenml/models/v2/core/tag_resource.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
resource_id
property
The resource_id
property.
Returns:
Type | Description |
---|---|
UUID
|
the value of the property. |
resource_type
property
The resource_type
property.
Returns:
Type | Description |
---|---|
TaggableResourceTypes
|
the value of the property. |
tag_id
property
The tag_id
property.
Returns:
Type | Description |
---|---|
UUID
|
the value of the property. |
TagResourceResponseBody
Bases: BaseDatedResponseBody
Response body for the links between tags and resources.
Source code in src/zenml/models/v2/core/tag_resource.py
45 46 47 48 49 50 |
|
TagResponse
Bases: UserScopedResponse[TagResponseBody, TagResponseMetadata, TagResponseResources]
Response model for tags.
Source code in src/zenml/models/v2/core/tag.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
color
property
exclusive
property
The exclusive
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
tagged_count
property
The tagged_count
property.
Returns:
Type | Description |
---|---|
int
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this tag.
Returns:
Type | Description |
---|---|
TagResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/tag.py
153 154 155 156 157 158 159 160 161 |
|
TagResponseBody
Bases: UserScopedResponseBody
Response body for tags.
Source code in src/zenml/models/v2/core/tag.py
118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
TagResponseMetadata
Bases: UserScopedResponseMetadata
Response metadata for tags.
Source code in src/zenml/models/v2/core/tag.py
133 134 |
|
TagUpdate
Bases: BaseUpdate
Update model for tags.
Source code in src/zenml/models/v2/core/tag.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|
validate_name_not_uuid(value)
classmethod
Validates that the tag name is not a UUID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Optional[str]
|
The tag name to validate. |
required |
Returns:
Type | Description |
---|---|
Optional[str]
|
The validated tag name. |
Raises:
Type | Description |
---|---|
ValueError
|
If the tag name can be converted to a UUID. |
Source code in src/zenml/models/v2/core/tag.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|
TaggableFilter
Bases: BaseFilter
Model to enable filtering and sorting by tags.
Source code in src/zenml/models/v2/base/scoped.py
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 |
|
add_tag_to_tags()
Deprecated the tag attribute in favor of the tags attribute.
Returns:
Type | Description |
---|---|
TaggableFilter
|
self |
Source code in src/zenml/models/v2/base/scoped.py
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
|
apply_filter(query, table)
Applies the filter to a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/base/scoped.py
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
|
apply_sorting(query, table)
Apply sorting to the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/base/scoped.py
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 |
|
get_custom_filters(table)
Get custom tag filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/base/scoped.py
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
|
TriggerExecutionFilter
Bases: ProjectScopedFilter
Model to enable advanced filtering of all trigger executions.
Source code in src/zenml/models/v2/core/trigger_execution.py
112 113 114 115 116 117 118 119 |
|
TriggerExecutionRequest
Bases: BaseRequest
Model for creating a new Trigger execution.
Source code in src/zenml/models/v2/core/trigger_execution.py
38 39 40 41 42 |
|
TriggerExecutionResponse
Bases: BaseIdentifiedResponse[TriggerExecutionResponseBody, TriggerExecutionResponseMetadata, TriggerExecutionResponseResources]
Response model for trigger executions.
Source code in src/zenml/models/v2/core/trigger_execution.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
event_metadata
property
The event_metadata
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
trigger
property
get_hydrated_version()
Get the hydrated version of this trigger execution.
Returns:
Type | Description |
---|---|
TriggerExecutionResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/trigger_execution.py
78 79 80 81 82 83 84 85 86 |
|
TriggerExecutionResponseBody
Bases: BaseDatedResponseBody
Response body for trigger executions.
Source code in src/zenml/models/v2/core/trigger_execution.py
51 52 |
|
TriggerExecutionResponseMetadata
Bases: BaseResponseMetadata
Response metadata for trigger executions.
Source code in src/zenml/models/v2/core/trigger_execution.py
55 56 57 58 |
|
TriggerExecutionResponseResources
Bases: BaseResponseResources
Class for all resource models associated with the trigger entity.
Source code in src/zenml/models/v2/core/trigger_execution.py
61 62 63 64 65 66 |
|
TriggerFilter
Bases: ProjectScopedFilter
Model to enable advanced filtering of all triggers.
Source code in src/zenml/models/v2/core/trigger.py
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/trigger.py
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
|
TriggerRequest
Bases: ProjectScopedRequest
Model for creating a new trigger.
Source code in src/zenml/models/v2/core/trigger.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
TriggerResponse
Bases: ProjectScopedResponse[TriggerResponseBody, TriggerResponseMetadata, TriggerResponseResources]
Response model for models.
Source code in src/zenml/models/v2/core/trigger.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
|
action
property
action_flavor
property
The action_flavor
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
action_subtype
property
The action_subtype
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
event_filter
property
The event_filter
property.
Returns:
Type | Description |
---|---|
Optional[Dict[str, Any]]
|
the value of the property. |
event_source
property
The event_source
property.
Returns:
Type | Description |
---|---|
Optional[EventSourceResponse]
|
the value of the property. |
event_source_flavor
property
The event_source_flavor
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
event_source_subtype
property
The event_source_subtype
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
executions
property
The event_source
property.
Returns:
Type | Description |
---|---|
Page[TriggerExecutionResponse]
|
the value of the property. |
is_active
property
The is_active
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this trigger.
Returns:
Type | Description |
---|---|
TriggerResponse
|
An instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/trigger.py
223 224 225 226 227 228 229 230 231 |
|
TriggerResponseBody
Bases: ProjectScopedResponseBody
Response body for triggers.
Source code in src/zenml/models/v2/core/trigger.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
TriggerResponseMetadata
Bases: ProjectScopedResponseMetadata
Response metadata for triggers.
Source code in src/zenml/models/v2/core/trigger.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
TriggerResponseResources
Bases: ProjectScopedResponseResources
Class for all resource models associated with the trigger entity.
Source code in src/zenml/models/v2/core/trigger.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
|
TriggerUpdate
Bases: BaseUpdate
Update model for triggers.
Source code in src/zenml/models/v2/core/trigger.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
UUIDFilter
Bases: StrFilter
Filter for all uuid fields which are mostly treated like strings.
Source code in src/zenml/models/v2/base/filter.py
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
|
generate_query_conditions_from_column(column)
Generate query conditions for a UUID column.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
column
|
Any
|
The UUID column of an SQLModel table on which to filter. |
required |
Returns:
Type | Description |
---|---|
Any
|
A list of query conditions. |
Source code in src/zenml/models/v2/base/filter.py
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
|
UserAuthModel
Bases: BaseZenModel
Authentication Model for the User.
This model is only used server-side. The server endpoints can use this model to authenticate the user credentials (Token, Password).
Source code in src/zenml/models/v2/misc/user_auth.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
get_hashed_activation_token()
Returns the hashed activation token, if configured.
Returns:
Type | Description |
---|---|
Optional[str]
|
The hashed activation token. |
Source code in src/zenml/models/v2/misc/user_auth.py
139 140 141 142 143 144 145 |
|
get_hashed_password()
Returns the hashed password, if configured.
Returns:
Type | Description |
---|---|
Optional[str]
|
The hashed password. |
Source code in src/zenml/models/v2/misc/user_auth.py
131 132 133 134 135 136 137 |
|
get_password()
Get the password.
Returns:
Type | Description |
---|---|
Optional[str]
|
The password as a plain string, if it exists. |
Source code in src/zenml/models/v2/misc/user_auth.py
121 122 123 124 125 126 127 128 129 |
|
verify_activation_token(activation_token, user=None)
classmethod
Verifies a given activation token against the stored token.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
activation_token
|
str
|
Input activation token to be verified. |
required |
user
|
Optional[UserAuthModel]
|
User for which the activation token is to be verified. |
None
|
Returns:
Type | Description |
---|---|
bool
|
True if the token is valid. |
Source code in src/zenml/models/v2/misc/user_auth.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
verify_password(plain_password, user=None)
classmethod
Verifies a given plain password against the stored password.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
plain_password
|
str
|
Input password to be verified. |
required |
user
|
Optional[UserAuthModel]
|
User for which the password is to be verified. |
None
|
Returns:
Type | Description |
---|---|
bool
|
True if the passwords match. |
Source code in src/zenml/models/v2/misc/user_auth.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
|
UserFilter
Bases: BaseFilter
Model to enable advanced filtering of all Users.
Source code in src/zenml/models/v2/core/user.py
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
|
apply_filter(query, table)
Override to filter out service accounts from the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/core/user.py
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
|
UserRequest
Bases: UserBase
, BaseRequest
Request model for users.
Source code in src/zenml/models/v2/core/user.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
UserResponse
Bases: BaseIdentifiedResponse[UserResponseBody, UserResponseMetadata, UserResponseResources]
Response model for user and service accounts.
This returns the activation_token that is required for the user-invitation-flow of the frontend. The email is returned optionally as well for use by the analytics on the client-side.
Source code in src/zenml/models/v2/core/user.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
|
activation_token
property
The activation_token
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
active
property
The active
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
default_project_id
property
The default_project_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
email
property
The email
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
email_opted_in
property
The email_opted_in
property.
Returns:
Type | Description |
---|---|
Optional[bool]
|
the value of the property. |
external_user_id
property
The external_user_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
full_name
property
The full_name
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
is_admin
property
The is_admin
property.
Returns:
Type | Description |
---|---|
bool
|
Whether the user is an admin. |
is_service_account
property
The is_service_account
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
user_metadata
property
The user_metadata
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
get_hydrated_version()
Get the hydrated version of this user.
Returns:
Type | Description |
---|---|
UserResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/user.py
341 342 343 344 345 346 347 348 349 |
|
UserResponseBody
Bases: BaseDatedResponseBody
Response body for users.
Source code in src/zenml/models/v2/core/user.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
|
UserResponseMetadata
Bases: BaseResponseMetadata
Response metadata for users.
Source code in src/zenml/models/v2/core/user.py
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
|
UserScopedFilter
Bases: BaseFilter
Model to enable advanced user-based scoping.
Source code in src/zenml/models/v2/base/scoped.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
|
apply_filter(query, table)
Applies the filter to a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/base/scoped.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
|
apply_sorting(query, table)
Apply sorting to the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/base/scoped.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/base/scoped.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
|
set_scope_user(user_id)
Set the user that is performing the filtering to scope the response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_id
|
UUID
|
The user ID to scope the response to. |
required |
Source code in src/zenml/models/v2/base/scoped.py
186 187 188 189 190 191 192 |
|
UserScopedRequest
Bases: BaseRequest
Base user-owned request model.
Used as a base class for all domain models that are "owned" by a user.
Source code in src/zenml/models/v2/base/scoped.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
get_analytics_metadata()
Fetches the analytics metadata for user scoped models.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The analytics metadata. |
Source code in src/zenml/models/v2/base/scoped.py
72 73 74 75 76 77 78 79 80 |
|
UserScopedResponse
Bases: BaseIdentifiedResponse[UserBody, UserMetadata, UserResources]
, Generic[UserBody, UserMetadata, UserResources]
Base user-owned model.
Used as a base class for all domain models that are "owned" by a user.
Source code in src/zenml/models/v2/base/scoped.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
user
property
get_analytics_metadata()
Fetches the analytics metadata for user scoped models.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The analytics metadata. |
Source code in src/zenml/models/v2/base/scoped.py
137 138 139 140 141 142 143 144 145 146 |
|
UserScopedResponseBody
Bases: BaseDatedResponseBody
Base user-owned body.
Source code in src/zenml/models/v2/base/scoped.py
106 107 108 109 110 111 |
|
UserScopedResponseMetadata
Bases: BaseResponseMetadata
Base user-owned metadata.
Source code in src/zenml/models/v2/base/scoped.py
114 115 |
|
UserUpdate
Bases: UserBase
, BaseUpdate
Update model for users.
Source code in src/zenml/models/v2/core/user.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
|
create_copy(exclude)
Create a copy of the current instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exclude
|
AbstractSet[str]
|
Fields to exclude from the copy. |
required |
Returns:
Type | Description |
---|---|
UserUpdate
|
A copy of the current instance. |
Source code in src/zenml/models/v2/core/user.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
|
user_email_updates()
Validate that the UserUpdateModel conforms to the email-opt-in-flow.
Returns:
Type | Description |
---|---|
UserUpdate
|
The validated values. |
Raises:
Type | Description |
---|---|
ValueError
|
If the email was not provided when the email_opted_in field was set to True. |
Source code in src/zenml/models/v2/core/user.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
|