Zen Stores
zenml.zen_stores
ZenStores define ways to store ZenML relevant data locally or remotely.
Modules
base_zen_store
Base Zen Store implementation.
Classes
BaseZenStore(skip_default_registrations: bool = False, **kwargs: Any)
Bases: BaseModel, ZenStoreInterface, ABC
Base class for accessing and persisting ZenML core objects.
Attributes:
| Name | Type | Description |
|---|---|---|
config |
StoreConfiguration
|
The configuration of the store. |
Create and initialize a store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
skip_default_registrations
|
bool
|
If |
False
|
**kwargs
|
Any
|
Additional keyword arguments to pass to the Pydantic constructor. |
{}
|
Source code in src/zenml/zen_stores/base_zen_store.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
type: StoreType
property
url: str
property
The URL of the store.
Returns:
| Type | Description |
|---|---|
str
|
The URL of the store. |
convert_config(data: Dict[str, Any]) -> Dict[str, Any]
classmethod
Method to infer the correct type of the config and convert.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dict[str, Any]
|
The provided configuration object, can potentially be a generic object |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the provided config object's type does not match any of the current implementations. |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The converted configuration object. |
Source code in src/zenml/zen_stores/base_zen_store.py
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 | |
create_store(config: StoreConfiguration, skip_default_registrations: bool = False, **kwargs: Any) -> BaseZenStore
staticmethod
Create and initialize a store from a store configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
StoreConfiguration
|
The store configuration to use. |
required |
skip_default_registrations
|
bool
|
If |
False
|
**kwargs
|
Any
|
Additional keyword arguments to pass to the store class |
{}
|
Returns:
| Type | Description |
|---|---|
BaseZenStore
|
The initialized store. |
Source code in src/zenml/zen_stores/base_zen_store.py
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 | |
get_default_store_config(path: str) -> StoreConfiguration
staticmethod
Get the default store configuration.
The default store is a SQLite store that saves the DB contents on the local filesystem.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The local path where the store DB will be stored. |
required |
Returns:
| Type | Description |
|---|---|
StoreConfiguration
|
The default store configuration. |
Source code in src/zenml/zen_stores/base_zen_store.py
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 | |
get_store_class(store_type: StoreType) -> Type[BaseZenStore]
staticmethod
Returns the class of the given store type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
store_type
|
StoreType
|
The type of the store to get the class for. |
required |
Returns:
| Type | Description |
|---|---|
Type[BaseZenStore]
|
The class of the given store type or None if the type is unknown. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If the store type is unsupported. |
Source code in src/zenml/zen_stores/base_zen_store.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 | |
get_store_config_class(store_type: StoreType) -> Type[StoreConfiguration]
staticmethod
Returns the store config class of the given store type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
store_type
|
StoreType
|
The type of the store to get the class for. |
required |
Returns:
| Type | Description |
|---|---|
Type[StoreConfiguration]
|
The config class of the given store type. |
Source code in src/zenml/zen_stores/base_zen_store.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 | |
get_store_info() -> ServerModel
Get information about the store.
Returns:
| Type | Description |
|---|---|
ServerModel
|
Information about the store. |
Source code in src/zenml/zen_stores/base_zen_store.py
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 | |
get_store_type(url: str) -> StoreType
staticmethod
Returns the store type associated with a URL schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
The store URL. |
required |
Returns:
| Type | Description |
|---|---|
StoreType
|
The store type associated with the supplied URL schema. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If no store type was found to support the supplied URL. |
Source code in src/zenml/zen_stores/base_zen_store.py
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 | |
is_local_store() -> bool
Check if the store is local or connected to a local ZenML server.
Returns:
| Type | Description |
|---|---|
bool
|
True if the store is local, False otherwise. |
Source code in src/zenml/zen_stores/base_zen_store.py
433 434 435 436 437 438 439 | |
validate_active_config(active_project_id: Optional[UUID] = None, active_stack_id: Optional[UUID] = None, config_name: str = '') -> Tuple[Optional[ProjectResponse], StackResponse]
Validate the active configuration.
Call this method to validate the supplied active project and active stack values.
This method returns a valid project and stack values. If the supplied project and stack are not set or are not valid (e.g. they do not exist or are not accessible), the default project and default stack will be returned in their stead.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
active_project_id
|
Optional[UUID]
|
The ID of the active project. |
None
|
active_stack_id
|
Optional[UUID]
|
The ID of the active stack. |
None
|
config_name
|
str
|
The name of the configuration to validate (used in the displayed logs/messages). |
''
|
Returns:
| Type | Description |
|---|---|
Tuple[Optional[ProjectResponse], StackResponse]
|
A tuple containing the active project and active stack. |
Source code in src/zenml/zen_stores/base_zen_store.py
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 | |
Functions
dag_generator
DAG generator helper.
Classes
DAGGeneratorHelper()
Helper class for generating pipeline run DAGs.
Initialize the DAG generator helper.
Source code in src/zenml/zen_stores/dag_generator.py
26 27 28 29 30 31 | |
add_artifact_node(node_id: str, name: str, id: Optional[UUID] = None, **metadata: Any) -> PipelineRunDAG.Node
Add an artifact node to the DAG.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
str
|
The ID of the node. |
required |
name
|
str
|
The name of the artifact. |
required |
id
|
Optional[UUID]
|
The ID of the artifact. |
None
|
**metadata
|
Any
|
Additional node metadata. |
{}
|
Returns:
| Type | Description |
|---|---|
Node
|
The added artifact node. |
Source code in src/zenml/zen_stores/dag_generator.py
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 | |
add_edge(source: str, target: str, **metadata: Any) -> None
Add an edge to the DAG.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
The source node ID. |
required |
target
|
str
|
The target node ID. |
required |
metadata
|
Any
|
Additional edge metadata. |
{}
|
Source code in src/zenml/zen_stores/dag_generator.py
166 167 168 169 170 171 172 173 174 175 176 177 178 | |
add_step_node(node_id: str, name: str, id: Optional[UUID] = None, **metadata: Any) -> PipelineRunDAG.Node
Add a step node to the DAG.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
str
|
The ID of the node. |
required |
name
|
str
|
The name of the step. |
required |
id
|
Optional[UUID]
|
The ID of the step. |
None
|
**metadata
|
Any
|
Additional node metadata. |
{}
|
Returns:
| Type | Description |
|---|---|
Node
|
The added step node. |
Source code in src/zenml/zen_stores/dag_generator.py
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 | |
add_triggered_run_node(node_id: str, name: str, id: Optional[UUID] = None, **metadata: Any) -> PipelineRunDAG.Node
Add a triggered run node to the DAG.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
str
|
The ID of the node. |
required |
name
|
str
|
The name of the triggered run. |
required |
id
|
Optional[UUID]
|
The ID of the triggered run. |
None
|
**metadata
|
Any
|
Additional node metadata. |
{}
|
Returns:
| Type | Description |
|---|---|
Node
|
The added triggered run node. |
Source code in src/zenml/zen_stores/dag_generator.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 | |
finalize_dag(pipeline_run_id: UUID, status: ExecutionStatus) -> PipelineRunDAG
Finalize the DAG.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_run_id
|
UUID
|
The ID of the pipeline run. |
required |
status
|
ExecutionStatus
|
The status of the pipeline run. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunDAG
|
The finalized DAG. |
Source code in src/zenml/zen_stores/dag_generator.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
get_artifact_node_id(name: str, step_name: str, io_type: str, is_input: bool) -> str
Get the ID of an artifact node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the input or output artifact. |
required |
step_name
|
str
|
The name of the step. |
required |
io_type
|
str
|
The type of the input or output artifact. |
required |
is_input
|
bool
|
Whether the artifact is an input or output artifact. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The ID of the artifact node. |
Source code in src/zenml/zen_stores/dag_generator.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
get_step_node_by_name(name: str) -> PipelineRunDAG.Node
Get a step node by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the step. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the step node with the given name is not found. |
Returns:
| Type | Description |
|---|---|
Node
|
The step node. |
Source code in src/zenml/zen_stores/dag_generator.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
get_step_node_id(name: str) -> str
Get the ID of a step node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the step. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The ID of the step node. |
Source code in src/zenml/zen_stores/dag_generator.py
33 34 35 36 37 38 39 40 41 42 43 44 | |
get_triggered_run_node_id(name: str) -> str
Get the ID of a triggered run node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the triggered run. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The ID of the triggered run node. |
Source code in src/zenml/zen_stores/dag_generator.py
67 68 69 70 71 72 73 74 75 76 77 78 | |
migrations
Alembic database migration utilities.
Modules
alembic
Alembic utilities wrapper.
The Alembic class defined here acts as a wrapper around the Alembic library that automatically configures Alembic to use the ZenML SQL store database connection.
Alembic(engine: Engine, metadata: MetaData = SQLModel.metadata, context: Optional[EnvironmentContext] = None, **kwargs: Any)
Alembic environment and migration API.
This class provides a wrapper around the Alembic library that automatically configures Alembic to use the ZenML SQL store database connection.
Initialize the Alembic wrapper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
engine
|
Engine
|
The SQLAlchemy engine to use. |
required |
metadata
|
MetaData
|
The SQLAlchemy metadata to use. |
metadata
|
context
|
Optional[EnvironmentContext]
|
The Alembic environment context to use. If not set, a new context is created pointing to the ZenML migrations directory. |
None
|
**kwargs
|
Any
|
Additional keyword arguments to pass to the Alembic environment context. |
{}
|
Source code in src/zenml/zen_stores/migrations/alembic.py
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 | |
current_revisions() -> List[str]
Get the current database revisions.
Returns:
| Type | Description |
|---|---|
List[str]
|
List of head revisions. |
Source code in src/zenml/zen_stores/migrations/alembic.py
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 | |
db_is_empty() -> bool
Check if the database is empty.
Returns:
| Type | Description |
|---|---|
bool
|
True if the database is empty, False otherwise. |
Source code in src/zenml/zen_stores/migrations/alembic.py
112 113 114 115 116 117 118 119 120 121 | |
downgrade(revision: str) -> None
Revert the database to a previous version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
revision
|
str
|
String revision target. |
required |
Source code in src/zenml/zen_stores/migrations/alembic.py
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |
head_revisions() -> List[str]
Get the head database revisions.
Returns:
| Type | Description |
|---|---|
List[str]
|
List of head revisions. |
Source code in src/zenml/zen_stores/migrations/alembic.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
run_migrations(fn: Optional[Callable[[_RevIdType, MigrationContext], List[Any]]]) -> None
Run an online migration function in the current migration context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fn
|
Optional[Callable[[_RevIdType, MigrationContext], List[Any]]]
|
Migration function to run. If not set, the function configured externally by the Alembic CLI command is used. |
required |
Source code in src/zenml/zen_stores/migrations/alembic.py
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 | |
stamp(revision: str) -> None
Stamp the revision table with the given revision without running any migrations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
revision
|
str
|
String revision target. |
required |
Source code in src/zenml/zen_stores/migrations/alembic.py
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
upgrade(revision: str = 'heads') -> None
Upgrade the database to a later version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
revision
|
str
|
String revision target. |
'heads'
|
Source code in src/zenml/zen_stores/migrations/alembic.py
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | |
AlembicVersion
Bases: Base
Alembic version table.
include_object(object: Any, name: Optional[str], type_: str, *args: Any, **kwargs: Any) -> bool
Function used to exclude tables from the migration scripts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
object
|
Any
|
The schema item object to check. |
required |
name
|
Optional[str]
|
The name of the object to check. |
required |
type_
|
str
|
The type of the object to check. |
required |
*args
|
Any
|
Additional arguments. |
()
|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the object should be included, False otherwise. |
Source code in src/zenml/zen_stores/migrations/alembic.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
utils
ZenML database migration, backup and recovery utilities.
MigrationUtils
Bases: BaseModel
Utilities for database migration, backup and recovery.
engine: Engine
property
The SQLAlchemy engine.
Returns:
| Type | Description |
|---|---|
Engine
|
The SQLAlchemy engine. |
master_engine: Engine
property
The SQLAlchemy engine for the master database.
Returns:
| Type | Description |
|---|---|
Engine
|
The SQLAlchemy engine for the master database. |
backup_database_to_db(backup_db_name: str) -> None
Backup the database to a backup database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backup_db_name
|
str
|
Backup database name to backup to. |
required |
Source code in src/zenml/zen_stores/migrations/utils.py
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 | |
backup_database_to_file(dump_file: str) -> None
Backup the database to a file.
This method dumps the entire database into a JSON file. Instead of using a SQL dump, we use a proprietary JSON dump because:
* it is (mostly) not dependent on the SQL dialect or database version
* it is safer with respect to SQL injection attacks
* it is easier to read and debug
The JSON file contains a list of JSON objects instead of a single JSON object, because it allows for buffered reading and writing of the file and thus reduces the memory footprint. Each JSON object can contain either schema or data information about a single table. For tables with a large amount of data, the data is split into multiple JSON objects with the first object always containing the schema.
The format of the dump is as depicted in the following example:
{
"table": "table1",
"create_stmt": "CREATE TABLE table1 (id INTEGER NOT NULL, "
"name VARCHAR(255), PRIMARY KEY (id))"
}
{
"table": "table1",
"data": [
{
"id": 1,
"name": "foo"
},
{
"id": 1,
"name": "bar"
},
...
]
}
{
"table": "table1",
"data": [
{
"id": 101,
"name": "fee"
},
{
"id": 102,
"name": "bee"
},
...
]
}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dump_file
|
str
|
The path to the dump file. |
required |
Source code in src/zenml/zen_stores/migrations/utils.py
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 | |
backup_database_to_memory() -> List[Dict[str, Any]]
Backup the database in memory.
Returns:
| Type | Description |
|---|---|
List[Dict[str, Any]]
|
The in-memory representation of the database backup. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the database cannot be backed up successfully. |
Source code in src/zenml/zen_stores/migrations/utils.py
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 | |
backup_database_to_storage(store_db_info: Callable[[Dict[str, Any]], None]) -> None
Backup the database to a storage location.
Backup the database to an abstract storage location. The storage location is specified by a function that is called repeatedly to store the database information. The function is called with a single argument, which is a dictionary containing either the table schema or table data. The dictionary contains the following keys:
* `table`: The name of the table.
* `create_stmt`: The table creation statement.
* `data`: A list of rows in the table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
store_db_info
|
Callable[[Dict[str, Any]], None]
|
The function to call to store the database information. |
required |
Source code in src/zenml/zen_stores/migrations/utils.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 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 | |
create_database(database: Optional[str] = None, drop: bool = False) -> None
Creates a mysql database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
database
|
Optional[str]
|
The name of the database to create. If not set, the database name from the configuration will be used. |
None
|
drop
|
bool
|
Whether to drop the database if it already exists. |
False
|
Source code in src/zenml/zen_stores/migrations/utils.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
create_engine(database: Optional[str] = None) -> Engine
Get the SQLAlchemy engine for a database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
database
|
Optional[str]
|
The name of the database. If not set, a master engine will be returned. |
None
|
Returns:
| Type | Description |
|---|---|
Engine
|
The SQLAlchemy engine. |
Source code in src/zenml/zen_stores/migrations/utils.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
database_exists(database: Optional[str] = None) -> bool
Check if a database exists.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
database
|
Optional[str]
|
The name of the database to check. If not set, the database name from the configuration will be used. |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
Whether the database exists. |
Raises:
| Type | Description |
|---|---|
OperationalError
|
If connecting to the database failed. |
Source code in src/zenml/zen_stores/migrations/utils.py
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 | |
drop_database(database: Optional[str] = None) -> None
Drops a mysql database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
database
|
Optional[str]
|
The name of the database to drop. If not set, the database name from the configuration will be used. |
None
|
Source code in src/zenml/zen_stores/migrations/utils.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
is_mysql_missing_database_error(error: OperationalError) -> bool
classmethod
Checks if the given error is due to a missing database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
error
|
OperationalError
|
The error to check. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
If the error because the MySQL database doesn't exist. |
Source code in src/zenml/zen_stores/migrations/utils.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
restore_database_from_db(backup_db_name: str) -> None
Restore the database from the backup database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backup_db_name
|
str
|
Backup database name to restore from. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the backup database does not exist. |
Source code in src/zenml/zen_stores/migrations/utils.py
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 | |
restore_database_from_file(dump_file: str) -> None
Restore the database from a backup dump file.
See the documentation of the backup_database_to_file method for
details on the format of the dump file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dump_file
|
str
|
The path to the dump file. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the database cannot be restored successfully. |
Source code in src/zenml/zen_stores/migrations/utils.py
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 | |
restore_database_from_memory(db_dump: List[Dict[str, Any]]) -> None
Restore the database from an in-memory backup.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
db_dump
|
List[Dict[str, Any]]
|
The in-memory database backup to restore from generated
by the |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the database cannot be restored successfully. |
Source code in src/zenml/zen_stores/migrations/utils.py
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 | |
restore_database_from_storage(load_db_info: Callable[[], Generator[Dict[str, Any], None, None]]) -> None
Restore the database from a backup storage location.
Restores the database from an abstract storage location. The storage location is specified by a function that is called repeatedly to load the database information from the external storage chunk by chunk. The function must yield a dictionary containing either the table schema or table data. The dictionary contains the following keys:
* `table`: The name of the table.
* `create_stmt`: The table creation statement.
* `data`: A list of rows in the table.
The function must return None when there is no more data to load.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
load_db_info
|
Callable[[], Generator[Dict[str, Any], None, None]]
|
The function to call to load the database information. |
required |
Source code in src/zenml/zen_stores/migrations/utils.py
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 | |
rest_zen_store
REST Zen Store implementation.
Classes
RestZenStore(skip_default_registrations: bool = False, **kwargs: Any)
Bases: BaseZenStore
Store implementation for accessing data from a REST API.
Source code in src/zenml/zen_stores/base_zen_store.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
server_info: ServerModel
property
Get cached information about the server.
Returns:
| Type | Description |
|---|---|
ServerModel
|
Cached information about the server. |
session: requests.Session
property
Initialize and return a requests session.
Returns:
| Type | Description |
|---|---|
Session
|
A requests session. |
authenticate(force: bool = False) -> None
Authenticate or re-authenticate to the ZenML server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
force
|
bool
|
If True, force a re-authentication even if a valid API token is currently cached. This is useful when the current API token is known to be invalid or expired. |
False
|
Source code in src/zenml/zen_stores/rest_zen_store.py
4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 | |
backup_secrets(ignore_errors: bool = True, delete_secrets: bool = False) -> None
Backs up all secrets to the configured backup secrets store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ignore_errors
|
bool
|
Whether to ignore individual errors during the backup process and attempt to backup all secrets. |
True
|
delete_secrets
|
bool
|
Whether to delete the secrets that have been successfully backed up from the primary secrets store. Setting this flag effectively moves all secrets from the primary secrets store to the backup secrets store. |
False
|
Source code in src/zenml/zen_stores/rest_zen_store.py
2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 | |
batch_create_artifact_versions(artifact_versions: List[ArtifactVersionRequest]) -> List[ArtifactVersionResponse]
Creates a batch of artifact versions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_versions
|
List[ArtifactVersionRequest]
|
The artifact versions to create. |
required |
Returns:
| Type | Description |
|---|---|
List[ArtifactVersionResponse]
|
The created artifact versions. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 | |
batch_create_tag_resource(tag_resources: List[TagResourceRequest]) -> List[TagResourceResponse]
Create a batch of tag resource relationships.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resources
|
List[TagResourceRequest]
|
The tag resource relationships to be created. |
required |
Returns:
| Type | Description |
|---|---|
List[TagResourceResponse]
|
The newly created tag resource relationships. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 | |
batch_delete_tag_resource(tag_resources: List[TagResourceRequest]) -> None
Delete a batch of tag resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resources
|
List[TagResourceRequest]
|
The tag resource relationships to be deleted. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 | |
create_action(action: ActionRequest) -> ActionResponse
Create an action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
ActionRequest
|
The action to create. |
required |
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The created action. |
Source code in src/zenml/zen_stores/rest_zen_store.py
599 600 601 602 603 604 605 606 607 608 609 610 611 612 | |
create_api_key(service_account_id: UUID, api_key: APIKeyRequest) -> APIKeyResponse
Create a new API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to create the API key. |
required |
api_key
|
APIKeyRequest
|
The API key to create. |
required |
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The created API key. |
Source code in src/zenml/zen_stores/rest_zen_store.py
693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 | |
create_artifact(artifact: ArtifactRequest) -> ArtifactResponse
Creates a new artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact
|
ArtifactRequest
|
The artifact to create. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The newly created artifact. |
Source code in src/zenml/zen_stores/rest_zen_store.py
916 917 918 919 920 921 922 923 924 925 926 927 928 929 | |
create_artifact_version(artifact_version: ArtifactVersionRequest) -> ArtifactVersionResponse
Creates an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version
|
ArtifactVersionRequest
|
The artifact version to create. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The created artifact version. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 | |
create_build(build: PipelineBuildRequest) -> PipelineBuildResponse
Creates a new build.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build
|
PipelineBuildRequest
|
The build to create. |
required |
Returns:
| Type | Description |
|---|---|
PipelineBuildResponse
|
The newly created build. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 | |
create_code_repository(code_repository: CodeRepositoryRequest) -> CodeRepositoryResponse
Creates a new code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository
|
CodeRepositoryRequest
|
Code repository to be created. |
required |
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The newly created code repository. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 | |
create_curated_visualization(visualization: CuratedVisualizationRequest) -> CuratedVisualizationResponse
Create a curated visualization via REST API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization
|
CuratedVisualizationRequest
|
The curated visualization to create. |
required |
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The created curated visualization. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 | |
create_deployment(deployment: DeploymentRequest) -> DeploymentResponse
Create a new deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment
|
DeploymentRequest
|
The deployment to create. |
required |
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The newly created deployment. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 | |
create_event_source(event_source: EventSourceRequest) -> EventSourceResponse
Create an event_source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source
|
EventSourceRequest
|
The event_source to create. |
required |
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The created event_source. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 | |
create_flavor(flavor: FlavorRequest) -> FlavorResponse
Creates a new stack component flavor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor
|
FlavorRequest
|
The stack component flavor to create. |
required |
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The newly created flavor. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | |
create_model(model: ModelRequest) -> ModelResponse
Creates a new model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
ModelRequest
|
the Model to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The newly created model. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 | |
create_model_version(model_version: ModelVersionRequest) -> ModelVersionResponse
Creates a new model version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version
|
ModelVersionRequest
|
the Model Version to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
The newly created model version. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 | |
create_model_version_artifact_link(model_version_artifact_link: ModelVersionArtifactRequest) -> ModelVersionArtifactResponse
Creates a new model version link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_artifact_link
|
ModelVersionArtifactRequest
|
the Model Version to Artifact Link to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionArtifactResponse
|
The newly created model version to artifact link. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 | |
create_model_version_pipeline_run_link(model_version_pipeline_run_link: ModelVersionPipelineRunRequest) -> ModelVersionPipelineRunResponse
Creates a new model version to pipeline run link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_pipeline_run_link
|
ModelVersionPipelineRunRequest
|
the Model Version to Pipeline Run Link to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionPipelineRunResponse
|
|
ModelVersionPipelineRunResponse
|
|
Source code in src/zenml/zen_stores/rest_zen_store.py
4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 | |
create_pipeline(pipeline: PipelineRequest) -> PipelineResponse
Creates a new pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline
|
PipelineRequest
|
The pipeline to create. |
required |
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The newly created pipeline. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 | |
create_project(project: ProjectRequest) -> ProjectResponse
Creates a new project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
ProjectRequest
|
The project to create. |
required |
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The newly created project. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 | |
create_run_metadata(run_metadata: RunMetadataRequest) -> None
Creates run metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_metadata
|
RunMetadataRequest
|
The run metadata to create. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
2269 2270 2271 2272 2273 2274 2275 | |
create_run_step(step_run: StepRunRequest) -> StepRunResponse
Creates a step run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run
|
StepRunRequest
|
The step run to create. |
required |
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The created step run. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 | |
create_run_template(template: RunTemplateRequest) -> RunTemplateResponse
Create a new run template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template
|
RunTemplateRequest
|
The template to create. |
required |
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
The newly created template. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 | |
create_schedule(schedule: ScheduleRequest) -> ScheduleResponse
Creates a new schedule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule
|
ScheduleRequest
|
The schedule to create. |
required |
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The newly created schedule. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 | |
create_secret(secret: SecretRequest) -> SecretResponse
Creates a new secret.
The new secret is also validated against the scoping rules enforced in the secrets store:
- only one private secret with the given name can exist.
- only one public secret with the given name can exist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret
|
SecretRequest
|
The secret to create. |
required |
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The newly created secret. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 | |
create_service(service_request: ServiceRequest) -> ServiceResponse
Create a new service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_request
|
ServiceRequest
|
The service to create. |
required |
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The created service. |
Source code in src/zenml/zen_stores/rest_zen_store.py
829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 | |
create_service_account(service_account: ServiceAccountRequest) -> ServiceAccountResponse
Creates a new service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account
|
ServiceAccountRequest
|
Service account to be created. |
required |
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The newly created service account. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 | |
create_service_connector(service_connector: ServiceConnectorRequest) -> ServiceConnectorResponse
Creates a new service connector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector
|
ServiceConnectorRequest
|
Service connector to be created. |
required |
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
The newly created service connector. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 | |
create_snapshot(snapshot: PipelineSnapshotRequest) -> PipelineSnapshotResponse
Creates a new snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot
|
PipelineSnapshotRequest
|
The snapshot to create. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The newly created snapshot. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 | |
create_stack(stack: StackRequest) -> StackResponse
Register a new stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack
|
StackRequest
|
The stack to register. |
required |
Returns:
| Type | Description |
|---|---|
StackResponse
|
The registered stack. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 | |
create_stack_component(component: ComponentRequest) -> ComponentResponse
Create a stack component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component
|
ComponentRequest
|
The stack component to create. |
required |
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
The created stack component. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 | |
create_tag(tag: TagRequest) -> TagResponse
Creates a new tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
TagRequest
|
the tag to be created. |
required |
Returns:
| Type | Description |
|---|---|
TagResponse
|
The newly created tag. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 | |
create_tag_resource(tag_resource: TagResourceRequest) -> TagResourceResponse
Create a new tag resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resource
|
TagResourceRequest
|
The tag resource to be created. |
required |
Returns:
| Type | Description |
|---|---|
TagResourceResponse
|
The newly created tag resource. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 | |
create_trigger(trigger: TriggerRequest) -> TriggerResponse
Create an trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger
|
TriggerRequest
|
The trigger to create. |
required |
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The created trigger. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 | |
create_user(user: UserRequest) -> UserResponse
Creates a new user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
UserRequest
|
User to be created. |
required |
Returns:
| Type | Description |
|---|---|
UserResponse
|
The newly created user. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 | |
deactivate_user(user_name_or_id: Union[str, UUID]) -> UserResponse
Deactivates a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name_or_id
|
Union[str, UUID]
|
The name or ID of the user to delete. |
required |
Returns:
| Type | Description |
|---|---|
UserResponse
|
The deactivated user containing the activation token. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 | |
delete(path: str, body: Optional[BaseModel] = None, params: Optional[Dict[str, Any]] = None, timeout: Optional[int] = None, **kwargs: Any) -> Json
Make a DELETE request to the given endpoint path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path to the endpoint. |
required |
body
|
Optional[BaseModel]
|
The body to send. |
None
|
params
|
Optional[Dict[str, Any]]
|
The query parameters to pass to the endpoint. |
None
|
timeout
|
Optional[int]
|
The request timeout in seconds. |
None
|
kwargs
|
Any
|
Additional keyword arguments to pass to the request. |
{}
|
Returns:
| Type | Description |
|---|---|
Json
|
The response body. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 | |
delete_action(action_id: UUID) -> None
Delete an action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
UUID
|
The ID of the action to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
680 681 682 683 684 685 686 687 688 689 | |
delete_all_model_version_artifact_links(model_version_id: UUID, only_links: bool = True) -> None
Deletes all links between model version and an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
ID of the model version containing the link. |
required |
only_links
|
bool
|
Flag deciding whether to delete only links or all. |
True
|
Source code in src/zenml/zen_stores/rest_zen_store.py
3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 | |
delete_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID]) -> None
Delete an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to delete the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 | |
delete_artifact(artifact_id: UUID) -> None
Deletes an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_id
|
UUID
|
The ID of the artifact to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
991 992 993 994 995 996 997 | |
delete_artifact_version(artifact_version_id: UUID) -> None
Deletes an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_id
|
UUID
|
The ID of the artifact version to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
1100 1101 1102 1103 1104 1105 1106 1107 1108 | |
delete_authorized_device(device_id: UUID) -> None
Deletes an OAuth 2.0 authorized device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_id
|
UUID
|
The ID of the device to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
4130 4131 4132 4133 4134 4135 4136 | |
delete_build(build_id: UUID) -> None
Deletes a build.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build_id
|
UUID
|
The ID of the build to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 | |
delete_code_repository(code_repository_id: UUID) -> None
Deletes a code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository_id
|
UUID
|
The ID of the code repository to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
1256 1257 1258 1259 1260 1261 1262 1263 1264 | |
delete_curated_visualization(visualization_id: UUID) -> None
Delete a curated visualization via REST API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization_id
|
UUID
|
The ID of the curated visualization to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 | |
delete_deployment(deployment_id: UUID) -> None
Delete a deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_id
|
UUID
|
The ID of the deployment to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 | |
delete_event_source(event_source_id: UUID) -> None
Delete an event_source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_id
|
UUID
|
The ID of the event_source to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 | |
delete_flavor(flavor_id: UUID) -> None
Delete a stack component flavor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_id
|
UUID
|
The ID of the stack component flavor to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 | |
delete_model(model_id: UUID) -> None
Deletes a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_id
|
UUID
|
id of the model to be deleted. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
3760 3761 3762 3763 3764 3765 3766 | |
delete_model_version(model_version_id: UUID) -> None
Deletes a model version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
name or id of the model version to be deleted. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 | |
delete_model_version_artifact_link(model_version_id: UUID, model_version_artifact_link_name_or_id: Union[str, UUID]) -> None
Deletes a model version to artifact link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
ID of the model version containing the link. |
required |
model_version_artifact_link_name_or_id
|
Union[str, UUID]
|
name or ID of the model version to artifact link to be deleted. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 | |
delete_model_version_pipeline_run_link(model_version_id: UUID, model_version_pipeline_run_link_name_or_id: Union[str, UUID]) -> None
Deletes a model version to pipeline run link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
ID of the model version containing the link. |
required |
model_version_pipeline_run_link_name_or_id
|
Union[str, UUID]
|
name or ID of the model version to pipeline run link to be deleted. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 | |
delete_pipeline(pipeline_id: UUID) -> None
Deletes a pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
UUID
|
The ID of the pipeline to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 | |
delete_project(project_name_or_id: Union[str, UUID]) -> None
Deletes a project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name_or_id
|
Union[str, UUID]
|
Name or ID of the project to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 | |
delete_run(run_id: UUID) -> None
Deletes a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_id
|
UUID
|
The ID of the pipeline run to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 | |
delete_run_template(template_id: UUID) -> None
Delete a run template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
The ID of the template to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 | |
delete_schedule(schedule_id: UUID) -> None
Deletes a schedule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_id
|
UUID
|
The ID of the schedule to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 | |
delete_secret(secret_id: UUID) -> None
Delete a secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The id of the secret to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 | |
delete_service(service_id: UUID) -> None
Delete a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
UUID
|
The ID of the service to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
906 907 908 909 910 911 912 | |
delete_service_account(service_account_name_or_id: Union[str, UUID]) -> None
Delete a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_name_or_id
|
Union[str, UUID]
|
The name or the ID of the service account to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 | |
delete_service_connector(service_connector_id: UUID) -> None
Deletes a service connector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
2780 2781 2782 2783 2784 2785 2786 2787 2788 | |
delete_snapshot(snapshot_id: UUID) -> None
Deletes a snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
The ID of the snapshot to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 | |
delete_stack(stack_id: UUID) -> None
Delete a stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_id
|
UUID
|
The ID of the stack to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 | |
delete_stack_component(component_id: UUID) -> None
Delete a stack component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
UUID
|
The ID of the stack component to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 | |
delete_tag(tag_id: UUID) -> None
Deletes a tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_id
|
UUID
|
id of the tag to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 | |
delete_tag_resource(tag_resource: TagResourceRequest) -> None
Delete a tag resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resource
|
TagResourceRequest
|
The tag resource relationship to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 | |
delete_trigger(trigger_id: UUID) -> None
Delete an trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_id
|
UUID
|
The ID of the trigger to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 | |
delete_trigger_execution(trigger_execution_id: UUID) -> None
Delete a trigger execution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_execution_id
|
UUID
|
The ID of the trigger execution to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 | |
delete_user(user_name_or_id: Union[str, UUID]) -> None
Deletes a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name_or_id
|
Union[str, UUID]
|
The name or ID of the user to delete. |
required |
Source code in src/zenml/zen_stores/rest_zen_store.py
3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 | |
get(path: str, params: Optional[Dict[str, Any]] = None, timeout: Optional[int] = None, **kwargs: Any) -> Json
Make a GET request to the given endpoint path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path to the endpoint. |
required |
params
|
Optional[Dict[str, Any]]
|
The query parameters to pass to the endpoint. |
None
|
timeout
|
Optional[int]
|
The request timeout in seconds. |
None
|
kwargs
|
Any
|
Additional keyword arguments to pass to the request. |
{}
|
Returns:
| Type | Description |
|---|---|
Json
|
The response body. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 | |
get_action(action_id: UUID, hydrate: bool = True) -> ActionResponse
Get an action by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
UUID
|
The ID of the action to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The action. |
Source code in src/zenml/zen_stores/rest_zen_store.py
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | |
get_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID], hydrate: bool = True) -> APIKeyResponse
Get an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to fetch the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The API key with the given ID. |
Source code in src/zenml/zen_stores/rest_zen_store.py
712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 | |
get_api_token(token_type: APITokenType = APITokenType.WORKLOAD, expires_in: Optional[int] = None, schedule_id: Optional[UUID] = None, pipeline_run_id: Optional[UUID] = None, deployment_id: Optional[UUID] = None) -> str
Get an API token.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
token_type
|
APITokenType
|
The type of the token to get. |
WORKLOAD
|
expires_in
|
Optional[int]
|
The time in seconds until the token expires. |
None
|
schedule_id
|
Optional[UUID]
|
The ID of the schedule to get a token for. |
None
|
pipeline_run_id
|
Optional[UUID]
|
The ID of the pipeline run to get a token for. |
None
|
deployment_id
|
Optional[UUID]
|
The ID of the deployment to get a token for. |
None
|
Returns:
| Type | Description |
|---|---|
str
|
The API token. |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the server response is not valid. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 | |
get_artifact(artifact_id: UUID, hydrate: bool = True) -> ArtifactResponse
Gets an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_id
|
UUID
|
The ID of the artifact to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The artifact. |
Source code in src/zenml/zen_stores/rest_zen_store.py
931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 | |
get_artifact_version(artifact_version_id: UUID, hydrate: bool = True) -> ArtifactVersionResponse
Gets an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_id
|
UUID
|
The ID of the artifact version to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The artifact version. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | |
get_artifact_visualization(artifact_visualization_id: UUID, hydrate: bool = True) -> ArtifactVisualizationResponse
Gets an artifact visualization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_visualization_id
|
UUID
|
The ID of the artifact visualization to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ArtifactVisualizationResponse
|
The artifact visualization. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 | |
get_authorized_device(device_id: UUID, hydrate: bool = True) -> OAuthDeviceResponse
Gets a specific OAuth 2.0 authorized device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_id
|
UUID
|
The ID of the device to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
OAuthDeviceResponse
|
The requested device, if it was found. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 | |
get_build(build_id: UUID, hydrate: bool = True) -> PipelineBuildResponse
Get a build with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build_id
|
UUID
|
ID of the build. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
PipelineBuildResponse
|
The build. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 | |
get_code_reference(code_reference_id: UUID, hydrate: bool = True) -> CodeReferenceResponse
Gets a code reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_reference_id
|
UUID
|
The ID of the code reference to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
CodeReferenceResponse
|
The code reference. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 | |
get_code_repository(code_repository_id: UUID, hydrate: bool = True) -> CodeRepositoryResponse
Gets a specific code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository_id
|
UUID
|
The ID of the code repository to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The requested code repository, if it was found. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 | |
get_curated_visualization(visualization_id: UUID, hydrate: bool = True) -> CuratedVisualizationResponse
Get a curated visualization by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization_id
|
UUID
|
The ID of the curated visualization to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The curated visualization with the given ID. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 | |
get_deployment(deployment_id: UUID, hydrate: bool = True) -> DeploymentResponse
Get a deployment with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_id
|
UUID
|
ID of the deployment. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The deployment. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 | |
get_deployment_id() -> UUID
Get the ID of the deployment.
Returns:
| Type | Description |
|---|---|
UUID
|
The ID of the deployment. |
Source code in src/zenml/zen_stores/rest_zen_store.py
558 559 560 561 562 563 564 | |
get_event_source(event_source_id: UUID, hydrate: bool = True) -> EventSourceResponse
Get an event_source by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_id
|
UUID
|
The ID of the event_source to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The event_source. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 | |
get_flavor(flavor_id: UUID, hydrate: bool = True) -> FlavorResponse
Get a stack component flavor by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_id
|
UUID
|
The ID of the stack component flavor to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The stack component flavor. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 | |
get_logs(logs_id: UUID, hydrate: bool = True) -> LogsResponse
Gets logs with the given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
logs_id
|
UUID
|
The ID of the logs to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
LogsResponse
|
The logs. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 | |
get_model(model_id: UUID, hydrate: bool = True) -> ModelResponse
Get an existing model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_id
|
UUID
|
id of the model to be retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The model of interest. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 | |
get_model_version(model_version_id: UUID, hydrate: bool = True) -> ModelVersionResponse
Get an existing model version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
name, id, stage or number of the model version to be retrieved. If skipped - latest is retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
The model version of interest. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 | |
get_or_create_run(pipeline_run: PipelineRunRequest) -> Tuple[PipelineRunResponse, bool]
Gets or creates a pipeline run.
If a run with the same ID or name already exists, it is returned. Otherwise, a new run is created.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_run
|
PipelineRunRequest
|
The pipeline run to get or create. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The pipeline run, and a boolean indicating whether the run was |
bool
|
created or not. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 | |
get_or_generate_api_token() -> str
Get or generate an API token.
Returns:
| Type | Description |
|---|---|
str
|
The API token. |
Raises:
| Type | Description |
|---|---|
CredentialsNotValid
|
if an API token cannot be fetched or generated because the client credentials are not valid. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 | |
get_pipeline(pipeline_id: UUID, hydrate: bool = True) -> PipelineResponse
Get a pipeline with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
UUID
|
ID of the pipeline. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The pipeline. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 | |
get_project(project_name_or_id: Union[UUID, str], hydrate: bool = True) -> ProjectResponse
Get an existing project by name or ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name_or_id
|
Union[UUID, str]
|
Name or ID of the project to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The requested project. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 | |
get_run(run_id: UUID, hydrate: bool = True, include_full_metadata: bool = False) -> PipelineRunResponse
Gets a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_id
|
UUID
|
The ID of the pipeline run to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
include_full_metadata
|
bool
|
If True, include metadata of all steps in the response. |
False
|
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The pipeline run. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 | |
get_run_step(step_run_id: UUID, hydrate: bool = True) -> StepRunResponse
Get a step run by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run_id
|
UUID
|
The ID of the step run to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The step run. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 | |
get_run_template(template_id: UUID, hydrate: bool = True) -> RunTemplateResponse
Get a run template with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
ID of the template. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
The template. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 | |
get_schedule(schedule_id: UUID, hydrate: bool = True) -> ScheduleResponse
Get a schedule with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_id
|
UUID
|
ID of the schedule. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The schedule. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 | |
get_secret(secret_id: UUID, hydrate: bool = True) -> SecretResponse
Get a secret by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to fetch. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The secret. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 | |
get_server_settings(hydrate: bool = True) -> ServerSettingsResponse
Get the server settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ServerSettingsResponse
|
The server settings. |
Source code in src/zenml/zen_stores/rest_zen_store.py
568 569 570 571 572 573 574 575 576 577 578 579 580 581 | |
get_service(service_id: UUID, hydrate: bool = True) -> ServiceResponse
Get a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
UUID
|
The ID of the service to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The service. |
Source code in src/zenml/zen_stores/rest_zen_store.py
846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 | |
get_service_account(service_account_name_or_id: Union[str, UUID], hydrate: bool = True) -> ServiceAccountResponse
Gets a specific service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_name_or_id
|
Union[str, UUID]
|
The name or ID of the service account to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The requested service account, if it was found. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 | |
get_service_connector(service_connector_id: UUID, hydrate: bool = True, expand_secrets: bool = False) -> ServiceConnectorResponse
Gets a specific service connector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
expand_secrets
|
bool
|
Flag deciding whether to include the secrets associated with the service connector. |
False
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
The requested service connector, if it was found. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 | |
get_service_connector_client(service_connector_id: UUID, resource_type: Optional[str] = None, resource_id: Optional[str] = None) -> ServiceConnectorResponse
Get a service connector client for a service connector and given resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the base service connector to use. |
required |
resource_type
|
Optional[str]
|
The type of resource to get a client for. |
None
|
resource_id
|
Optional[str]
|
The ID of the resource to get a client for. |
None
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
A service connector client that can be used to access the given |
ServiceConnectorResponse
|
resource. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 | |
get_service_connector_type(connector_type: str) -> ServiceConnectorTypeModel
Returns the requested service connector type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connector_type
|
str
|
the service connector type identifier. |
required |
Returns:
| Type | Description |
|---|---|
ServiceConnectorTypeModel
|
The requested service connector type. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 | |
get_snapshot(snapshot_id: UUID, hydrate: bool = True, step_configuration_filter: Optional[List[str]] = None, include_config_schema: Optional[bool] = None) -> PipelineSnapshotResponse
Get a snapshot with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
ID of the snapshot. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
step_configuration_filter
|
Optional[List[str]]
|
List of step configurations to include in the response. If not given, all step configurations will be included. |
None
|
include_config_schema
|
Optional[bool]
|
Whether the config schema will be filled. |
None
|
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The snapshot. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 | |
get_stack(stack_id: UUID, hydrate: bool = True) -> StackResponse
Get a stack by its unique ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_id
|
UUID
|
The ID of the stack to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
StackResponse
|
The stack with the given ID. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 | |
get_stack_component(component_id: UUID, hydrate: bool = True) -> ComponentResponse
Get a stack component by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
UUID
|
The ID of the stack component to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
The stack component. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 | |
get_stack_deployment_config(provider: StackDeploymentProvider, stack_name: str, location: Optional[str] = None) -> StackDeploymentConfig
Return the cloud provider console URL and configuration needed to deploy the ZenML stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider
|
StackDeploymentProvider
|
The stack deployment provider. |
required |
stack_name
|
str
|
The name of the stack. |
required |
location
|
Optional[str]
|
The location where the stack should be deployed. |
None
|
Returns:
| Type | Description |
|---|---|
StackDeploymentConfig
|
The cloud provider console URL and configuration needed to deploy |
StackDeploymentConfig
|
the ZenML stack to the specified cloud provider. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 | |
get_stack_deployment_info(provider: StackDeploymentProvider) -> StackDeploymentInfo
Get information about a stack deployment provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider
|
StackDeploymentProvider
|
The stack deployment provider. |
required |
Returns:
| Type | Description |
|---|---|
StackDeploymentInfo
|
Information about the stack deployment provider. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 | |
get_stack_deployment_stack(provider: StackDeploymentProvider, stack_name: str, location: Optional[str] = None, date_start: Optional[datetime] = None) -> Optional[DeployedStack]
Return a matching ZenML stack that was deployed and registered.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider
|
StackDeploymentProvider
|
The stack deployment provider. |
required |
stack_name
|
str
|
The name of the stack. |
required |
location
|
Optional[str]
|
The location where the stack should be deployed. |
None
|
date_start
|
Optional[datetime]
|
The date when the deployment started. |
None
|
Returns:
| Type | Description |
|---|---|
Optional[DeployedStack]
|
The ZenML stack that was deployed and registered or None if the |
Optional[DeployedStack]
|
stack was not found. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 | |
get_store_info() -> ServerModel
Get information about the server.
Returns:
| Type | Description |
|---|---|
ServerModel
|
Information about the server. |
Source code in src/zenml/zen_stores/rest_zen_store.py
548 549 550 551 552 553 554 555 556 | |
get_tag(tag_id: UUID, hydrate: bool = True) -> TagResponse
Get an existing tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_id
|
UUID
|
id of the tag to be retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
TagResponse
|
The tag of interest. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 | |
get_trigger(trigger_id: UUID, hydrate: bool = True) -> TriggerResponse
Get a trigger by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_id
|
UUID
|
The ID of the trigger to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The trigger. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 | |
get_trigger_execution(trigger_execution_id: UUID, hydrate: bool = True) -> TriggerExecutionResponse
Get an trigger execution by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_execution_id
|
UUID
|
The ID of the trigger execution to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
TriggerExecutionResponse
|
The trigger execution. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 | |
get_user(user_name_or_id: Optional[Union[str, UUID]] = None, include_private: bool = False, hydrate: bool = True) -> UserResponse
Gets a specific user, when no id is specified get the active user.
The include_private parameter is ignored here as it is handled
implicitly by the /current-user endpoint that is queried when no
user_name_or_id is set. Raises a KeyError in case a user with that id
does not exist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name_or_id
|
Optional[Union[str, UUID]]
|
The name or ID of the user to get. |
None
|
include_private
|
bool
|
Whether to include private user information. |
False
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
UserResponse
|
The requested user, if it was found. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 | |
list_actions(action_filter_model: ActionFilter, hydrate: bool = False) -> Page[ActionResponse]
List all actions matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_filter_model
|
ActionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ActionResponse]
|
A list of all actions matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 | |
list_api_keys(service_account_id: UUID, filter_model: APIKeyFilter, hydrate: bool = False) -> Page[APIKeyResponse]
List all API keys for a service account matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to list the API keys. |
required |
filter_model
|
APIKeyFilter
|
All filter parameters including pagination params |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[APIKeyResponse]
|
A list of all API keys matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
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 | |
list_artifact_versions(artifact_version_filter_model: ArtifactVersionFilter, hydrate: bool = False) -> Page[ArtifactVersionResponse]
List all artifact versions matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_filter_model
|
ArtifactVersionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ArtifactVersionResponse]
|
A list of all artifact versions matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 | |
list_artifacts(filter_model: ArtifactFilter, hydrate: bool = False) -> Page[ArtifactResponse]
List all artifacts matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ArtifactFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ArtifactResponse]
|
A list of all artifacts matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 | |
list_authorized_devices(filter_model: OAuthDeviceFilter, hydrate: bool = False) -> Page[OAuthDeviceResponse]
List all OAuth 2.0 authorized devices for a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
OAuthDeviceFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[OAuthDeviceResponse]
|
A page of all matching OAuth 2.0 authorized devices. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 | |
list_builds(build_filter_model: PipelineBuildFilter, hydrate: bool = False) -> Page[PipelineBuildResponse]
List all builds matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build_filter_model
|
PipelineBuildFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineBuildResponse]
|
A page of all builds matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 | |
list_code_repositories(filter_model: CodeRepositoryFilter, hydrate: bool = False) -> Page[CodeRepositoryResponse]
List all code repositories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
CodeRepositoryFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[CodeRepositoryResponse]
|
A page of all code repositories. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 | |
list_deployments(deployment_filter_model: DeploymentFilter, hydrate: bool = False) -> Page[DeploymentResponse]
List all deployments matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_filter_model
|
DeploymentFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[DeploymentResponse]
|
A page of all deployments matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 | |
list_event_sources(event_source_filter_model: EventSourceFilter, hydrate: bool = False) -> Page[EventSourceResponse]
List all event_sources matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_filter_model
|
EventSourceFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[EventSourceResponse]
|
A list of all event_sources matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 | |
list_flavors(flavor_filter_model: FlavorFilter, hydrate: bool = False) -> Page[FlavorResponse]
List all stack component flavors matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_filter_model
|
FlavorFilter
|
All filter parameters including pagination params |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[FlavorResponse]
|
List of all the stack component flavors matching the given criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 | |
list_model_version_artifact_links(model_version_artifact_link_filter_model: ModelVersionArtifactFilter, hydrate: bool = False) -> Page[ModelVersionArtifactResponse]
Get all model version to artifact links by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_artifact_link_filter_model
|
ModelVersionArtifactFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelVersionArtifactResponse]
|
A page of all model version to artifact links. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 | |
list_model_version_pipeline_run_links(model_version_pipeline_run_link_filter_model: ModelVersionPipelineRunFilter, hydrate: bool = False) -> Page[ModelVersionPipelineRunResponse]
Get all model version to pipeline run links by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_pipeline_run_link_filter_model
|
ModelVersionPipelineRunFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelVersionPipelineRunResponse]
|
A page of all model version to pipeline run links. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 | |
list_model_versions(model_version_filter_model: ModelVersionFilter, hydrate: bool = False) -> Page[ModelVersionResponse]
Get all model versions by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_filter_model
|
ModelVersionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelVersionResponse]
|
A page of all model versions. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 | |
list_models(model_filter_model: ModelFilter, hydrate: bool = False) -> Page[ModelResponse]
Get all models by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_filter_model
|
ModelFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelResponse]
|
A page of all models. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 | |
list_pipelines(pipeline_filter_model: PipelineFilter, hydrate: bool = False) -> Page[PipelineResponse]
List all pipelines matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_filter_model
|
PipelineFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineResponse]
|
A list of all pipelines matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 | |
list_projects(project_filter_model: ProjectFilter, hydrate: bool = False) -> Page[ProjectResponse]
List all projects matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_filter_model
|
ProjectFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ProjectResponse]
|
A list of all projects matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 | |
list_run_steps(step_run_filter_model: StepRunFilter, hydrate: bool = False) -> Page[StepRunResponse]
List all step runs matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run_filter_model
|
StepRunFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[StepRunResponse]
|
A list of all step runs matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 | |
list_run_templates(template_filter_model: RunTemplateFilter, hydrate: bool = False) -> Page[RunTemplateResponse]
List all run templates matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_filter_model
|
RunTemplateFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[RunTemplateResponse]
|
A list of all templates matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 | |
list_runs(runs_filter_model: PipelineRunFilter, hydrate: bool = False, include_full_metadata: bool = False) -> Page[PipelineRunResponse]
List all pipeline runs matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
runs_filter_model
|
PipelineRunFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
include_full_metadata
|
bool
|
If True, include metadata of all steps in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineRunResponse]
|
A list of all pipeline runs matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 | |
list_schedules(schedule_filter_model: ScheduleFilter, hydrate: bool = False) -> Page[ScheduleResponse]
List all schedules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_filter_model
|
ScheduleFilter
|
All filter parameters including pagination params |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ScheduleResponse]
|
A list of schedules. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 | |
list_secrets(secret_filter_model: SecretFilter, hydrate: bool = False) -> Page[SecretResponse]
List all secrets matching the given filter criteria.
Note that returned secrets do not include any secret values. To fetch
the secret values, use get_secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_filter_model
|
SecretFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[SecretResponse]
|
A list of all secrets matching the filter criteria, with pagination |
Page[SecretResponse]
|
information and sorted according to the filter criteria. The |
Page[SecretResponse]
|
returned secrets do not include any secret values, only metadata. To |
Page[SecretResponse]
|
fetch the secret values, use |
Page[SecretResponse]
|
secret. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 | |
list_service_accounts(filter_model: ServiceAccountFilter, hydrate: bool = False) -> Page[ServiceAccountResponse]
List all service accounts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceAccountFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ServiceAccountResponse]
|
A list of filtered service accounts. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 | |
list_service_connector_resources(filter_model: ServiceConnectorFilter) -> List[ServiceConnectorResourcesModel]
List resources that can be accessed by service connectors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceConnectorFilter
|
The filter model to use when fetching service connectors. |
required |
Returns:
| Type | Description |
|---|---|
List[ServiceConnectorResourcesModel]
|
The matching list of resources that available service |
List[ServiceConnectorResourcesModel]
|
connectors have access to. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 | |
list_service_connector_types(connector_type: Optional[str] = None, resource_type: Optional[str] = None, auth_method: Optional[str] = None) -> List[ServiceConnectorTypeModel]
Get a list of service connector types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connector_type
|
Optional[str]
|
Filter by connector type. |
None
|
resource_type
|
Optional[str]
|
Filter by resource type. |
None
|
auth_method
|
Optional[str]
|
Filter by authentication method. |
None
|
Returns:
| Type | Description |
|---|---|
List[ServiceConnectorTypeModel]
|
List of service connector types. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 | |
list_service_connectors(filter_model: ServiceConnectorFilter, hydrate: bool = False, expand_secrets: bool = False) -> Page[ServiceConnectorResponse]
List all service connectors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceConnectorFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
expand_secrets
|
bool
|
Flag deciding whether to include the secrets associated with the service connector. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ServiceConnectorResponse]
|
A page of all service connectors. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 | |
list_services(filter_model: ServiceFilter, hydrate: bool = False) -> Page[ServiceResponse]
List all services matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ServiceResponse]
|
A list of all services matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 | |
list_snapshots(snapshot_filter_model: PipelineSnapshotFilter, hydrate: bool = False) -> Page[PipelineSnapshotResponse]
List all snapshots matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_filter_model
|
PipelineSnapshotFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineSnapshotResponse]
|
A page of all snapshots matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 | |
list_stack_components(component_filter_model: ComponentFilter, hydrate: bool = False) -> Page[ComponentResponse]
List all stack components matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_filter_model
|
ComponentFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ComponentResponse]
|
A list of all stack components matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 | |
list_stacks(stack_filter_model: StackFilter, hydrate: bool = False) -> Page[StackResponse]
List all stacks matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_filter_model
|
StackFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[StackResponse]
|
A list of all stacks matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 | |
list_tags(tag_filter_model: TagFilter, hydrate: bool = False) -> Page[TagResponse]
Get all tags by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_filter_model
|
TagFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[TagResponse]
|
A page of all tags. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 | |
list_trigger_executions(trigger_execution_filter_model: TriggerExecutionFilter, hydrate: bool = False) -> Page[TriggerExecutionResponse]
List all trigger executions matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_execution_filter_model
|
TriggerExecutionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[TriggerExecutionResponse]
|
A list of all trigger executions matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 | |
list_triggers(trigger_filter_model: TriggerFilter, hydrate: bool = False) -> Page[TriggerResponse]
List all triggers matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_filter_model
|
TriggerFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[TriggerResponse]
|
A list of all triggers matching the filter criteria. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 | |
list_users(user_filter_model: UserFilter, hydrate: bool = False) -> Page[UserResponse]
List all users.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_filter_model
|
UserFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[UserResponse]
|
A list of all users. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 | |
post(path: str, body: BaseModel, params: Optional[Dict[str, Any]] = None, timeout: Optional[int] = None, **kwargs: Any) -> Json
Make a POST request to the given endpoint path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path to the endpoint. |
required |
body
|
BaseModel
|
The body to send. |
required |
params
|
Optional[Dict[str, Any]]
|
The query parameters to pass to the endpoint. |
None
|
timeout
|
Optional[int]
|
The request timeout in seconds. |
None
|
kwargs
|
Any
|
Additional keyword arguments to pass to the request. |
{}
|
Returns:
| Type | Description |
|---|---|
Json
|
The response body. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 | |
prune_artifact_versions(project_name_or_id: Union[str, UUID], only_versions: bool = True) -> None
Prunes unused artifact versions and their artifacts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name_or_id
|
Union[str, UUID]
|
The project name or ID to prune artifact versions for. |
required |
only_versions
|
bool
|
Only delete artifact versions, keeping artifacts |
True
|
Source code in src/zenml/zen_stores/rest_zen_store.py
1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 | |
put(path: str, body: Optional[BaseModel] = None, params: Optional[Dict[str, Any]] = None, timeout: Optional[int] = None, **kwargs: Any) -> Json
Make a PUT request to the given endpoint path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path to the endpoint. |
required |
body
|
Optional[BaseModel]
|
The body to send. |
None
|
params
|
Optional[Dict[str, Any]]
|
The query parameters to pass to the endpoint. |
None
|
timeout
|
Optional[int]
|
The request timeout in seconds. |
None
|
kwargs
|
Any
|
Additional keyword arguments to pass to the request. |
{}
|
Returns:
| Type | Description |
|---|---|
Json
|
The response body. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 | |
restore_secrets(ignore_errors: bool = False, delete_secrets: bool = False) -> None
Restore all secrets from the configured backup secrets store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ignore_errors
|
bool
|
Whether to ignore individual errors during the restore process and attempt to restore all secrets. |
False
|
delete_secrets
|
bool
|
Whether to delete the secrets that have been successfully restored from the backup secrets store. Setting this flag effectively moves all secrets from the backup secrets store to the primary secrets store. |
False
|
Source code in src/zenml/zen_stores/rest_zen_store.py
2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 | |
rotate_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID], rotate_request: APIKeyRotateRequest) -> APIKeyResponse
Rotate an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to rotate the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to rotate. |
required |
rotate_request
|
APIKeyRotateRequest
|
The rotate request on the API key. |
required |
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The updated API key. |
Source code in src/zenml/zen_stores/rest_zen_store.py
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 | |
run_snapshot(snapshot_id: UUID, run_request: PipelineSnapshotRunRequest) -> PipelineRunResponse
Run a snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
The ID of the snapshot to run. |
required |
run_request
|
PipelineSnapshotRunRequest
|
Configuration for the run. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the server does not support running a snapshot. |
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The created pipeline run. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 | |
run_template(template_id: UUID, run_configuration: Optional[PipelineRunConfiguration] = None) -> PipelineRunResponse
Run a template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
The ID of the template to run. |
required |
run_configuration
|
Optional[PipelineRunConfiguration]
|
Configuration for the run. |
None
|
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the server does not support running a template. |
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
Model of the pipeline run. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 | |
update_action(action_id: UUID, action_update: ActionUpdate) -> ActionResponse
Update an existing action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
UUID
|
The ID of the action to update. |
required |
action_update
|
ActionUpdate
|
The update to be applied to the action. |
required |
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The updated action. |
Source code in src/zenml/zen_stores/rest_zen_store.py
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 | |
update_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID], api_key_update: APIKeyUpdate) -> APIKeyResponse
Update an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to update the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to update. |
required |
api_key_update
|
APIKeyUpdate
|
The update request on the API key. |
required |
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The updated API key. |
Source code in src/zenml/zen_stores/rest_zen_store.py
763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 | |
update_artifact(artifact_id: UUID, artifact_update: ArtifactUpdate) -> ArtifactResponse
Updates an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_id
|
UUID
|
The ID of the artifact to update. |
required |
artifact_update
|
ArtifactUpdate
|
The update to be applied to the artifact. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The updated artifact. |
Source code in src/zenml/zen_stores/rest_zen_store.py
972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 | |
update_artifact_version(artifact_version_id: UUID, artifact_version_update: ArtifactVersionUpdate) -> ArtifactVersionResponse
Updates an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_id
|
UUID
|
The ID of the artifact version to update. |
required |
artifact_version_update
|
ArtifactVersionUpdate
|
The update to be applied to the artifact version. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The updated artifact version. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | |
update_authorized_device(device_id: UUID, update: OAuthDeviceUpdate) -> OAuthDeviceResponse
Updates an existing OAuth 2.0 authorized device for internal use.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_id
|
UUID
|
The ID of the device to update. |
required |
update
|
OAuthDeviceUpdate
|
The update to be applied to the device. |
required |
Returns:
| Type | Description |
|---|---|
OAuthDeviceResponse
|
The updated OAuth 2.0 authorized device. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 | |
update_code_repository(code_repository_id: UUID, update: CodeRepositoryUpdate) -> CodeRepositoryResponse
Updates an existing code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository_id
|
UUID
|
The ID of the code repository to update. |
required |
update
|
CodeRepositoryUpdate
|
The update to be applied to the code repository. |
required |
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The updated code repository. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 | |
update_curated_visualization(visualization_id: UUID, visualization_update: CuratedVisualizationUpdate) -> CuratedVisualizationResponse
Update a curated visualization via REST API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization_id
|
UUID
|
The ID of the curated visualization to update. |
required |
visualization_update
|
CuratedVisualizationUpdate
|
The update to apply to the curated visualization. |
required |
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The updated curated visualization. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 | |
update_deployment(deployment_id: UUID, deployment_update: DeploymentUpdate) -> DeploymentResponse
Update a deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_id
|
UUID
|
The ID of the deployment to update. |
required |
deployment_update
|
DeploymentUpdate
|
The update to apply. |
required |
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The updated deployment. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 | |
update_event_source(event_source_id: UUID, event_source_update: EventSourceUpdate) -> EventSourceResponse
Update an existing event_source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_id
|
UUID
|
The ID of the event_source to update. |
required |
event_source_update
|
EventSourceUpdate
|
The update to be applied to the event_source. |
required |
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The updated event_source. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 | |
update_flavor(flavor_id: UUID, flavor_update: FlavorUpdate) -> FlavorResponse
Updates an existing user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_id
|
UUID
|
The id of the flavor to update. |
required |
flavor_update
|
FlavorUpdate
|
The update to be applied to the flavor. |
required |
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The updated flavor. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 | |
update_model(model_id: UUID, model_update: ModelUpdate) -> ModelResponse
Updates an existing model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_id
|
UUID
|
UUID of the model to be updated. |
required |
model_update
|
ModelUpdate
|
the Model to be updated. |
required |
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The updated model. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 | |
update_model_version(model_version_id: UUID, model_version_update_model: ModelVersionUpdate) -> ModelVersionResponse
Get all model versions by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
The ID of model version to be updated. |
required |
model_version_update_model
|
ModelVersionUpdate
|
The model version to be updated. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
An updated model version. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 | |
update_pipeline(pipeline_id: UUID, pipeline_update: PipelineUpdate) -> PipelineResponse
Updates a pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
UUID
|
The ID of the pipeline to be updated. |
required |
pipeline_update
|
PipelineUpdate
|
The update to be applied. |
required |
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The updated pipeline. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 | |
update_project(project_id: UUID, project_update: ProjectUpdate) -> ProjectResponse
Update an existing project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_id
|
UUID
|
The ID of the project to be updated. |
required |
project_update
|
ProjectUpdate
|
The update to be applied to the project. |
required |
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The updated project. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 | |
update_run(run_id: UUID, run_update: PipelineRunUpdate) -> PipelineRunResponse
Updates a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_id
|
UUID
|
The ID of the pipeline run to update. |
required |
run_update
|
PipelineRunUpdate
|
The update to be applied to the pipeline run. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The updated pipeline run. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 | |
update_run_step(step_run_id: UUID, step_run_update: StepRunUpdate) -> StepRunResponse
Updates a step run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run_id
|
UUID
|
The ID of the step to update. |
required |
step_run_update
|
StepRunUpdate
|
The update to be applied to the step. |
required |
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The updated step run. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 | |
update_run_template(template_id: UUID, template_update: RunTemplateUpdate) -> RunTemplateResponse
Updates a run template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
The ID of the template to update. |
required |
template_update
|
RunTemplateUpdate
|
The update to apply. |
required |
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
The updated template. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 | |
update_schedule(schedule_id: UUID, schedule_update: ScheduleUpdate) -> ScheduleResponse
Updates a schedule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_id
|
UUID
|
The ID of the schedule to be updated. |
required |
schedule_update
|
ScheduleUpdate
|
The update to be applied. |
required |
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The updated schedule. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 | |
update_secret(secret_id: UUID, secret_update: SecretUpdate) -> SecretResponse
Updates a secret.
Secret values that are specified as None in the update that are
present in the existing secret are removed from the existing secret.
Values that are present in both secrets are overwritten. All other
values in both the existing secret and the update are kept (merged).
If the update includes a change of name or scope, the scoping rules enforced in the secrets store are used to validate the update:
- only one private secret with the given name can exist.
- only one public secret with the given name can exist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to be updated. |
required |
secret_update
|
SecretUpdate
|
The update to be applied. |
required |
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The updated secret. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 | |
update_server_settings(settings_update: ServerSettingsUpdate) -> ServerSettingsResponse
Update the server settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings_update
|
ServerSettingsUpdate
|
The server settings update. |
required |
Returns:
| Type | Description |
|---|---|
ServerSettingsResponse
|
The updated server settings. |
Source code in src/zenml/zen_stores/rest_zen_store.py
583 584 585 586 587 588 589 590 591 592 593 594 595 | |
update_service(service_id: UUID, update: ServiceUpdate) -> ServiceResponse
Update a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
UUID
|
The ID of the service to update. |
required |
update
|
ServiceUpdate
|
The update to be applied to the service. |
required |
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The updated service. |
Source code in src/zenml/zen_stores/rest_zen_store.py
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 | |
update_service_account(service_account_name_or_id: Union[str, UUID], service_account_update: ServiceAccountUpdate) -> ServiceAccountResponse
Updates an existing service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_name_or_id
|
Union[str, UUID]
|
The name or the ID of the service account to update. |
required |
service_account_update
|
ServiceAccountUpdate
|
The update to be applied to the service account. |
required |
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The updated service account. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 | |
update_service_connector(service_connector_id: UUID, update: ServiceConnectorUpdate) -> ServiceConnectorResponse
Updates an existing service connector.
The update model contains the fields to be updated. If a field value is set to None in the model, the field is not updated, but there are special rules concerning some fields:
- the
configurationandsecretsfields 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
resource_idfield value is also a full replacement value: if set toNone, the resource ID is removed from the service connector. - the
expiration_secondsfield value is also a full replacement value: if set toNone, the expiration is removed from the service connector. - the
secret_idfield value in the update is ignored, given that secrets are managed internally by the ZenML store. - the
labelsfield 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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to update. |
required |
update
|
ServiceConnectorUpdate
|
The update to be applied to the service connector. |
required |
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
The updated service connector. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 | |
update_snapshot(snapshot_id: UUID, snapshot_update: PipelineSnapshotUpdate) -> PipelineSnapshotResponse
Update a snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
The ID of the snapshot to update. |
required |
snapshot_update
|
PipelineSnapshotUpdate
|
The update to apply. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The updated snapshot. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 | |
update_stack(stack_id: UUID, stack_update: StackUpdate) -> StackResponse
Update a stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_id
|
UUID
|
The ID of the stack update. |
required |
stack_update
|
StackUpdate
|
The update request on the stack. |
required |
Returns:
| Type | Description |
|---|---|
StackResponse
|
The updated stack. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 | |
update_stack_component(component_id: UUID, component_update: ComponentUpdate) -> ComponentResponse
Update an existing stack component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
UUID
|
The ID of the stack component to update. |
required |
component_update
|
ComponentUpdate
|
The update to be applied to the stack component. |
required |
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
The updated stack component. |
Source code in src/zenml/zen_stores/rest_zen_store.py
1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 | |
update_tag(tag_id: UUID, tag_update_model: TagUpdate) -> TagResponse
Update tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_id
|
UUID
|
id of the tag to be updated. |
required |
tag_update_model
|
TagUpdate
|
Tag to use for the update. |
required |
Returns:
| Type | Description |
|---|---|
TagResponse
|
An updated tag. |
Source code in src/zenml/zen_stores/rest_zen_store.py
4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 | |
update_trigger(trigger_id: UUID, trigger_update: TriggerUpdate) -> TriggerResponse
Update an existing trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_id
|
UUID
|
The ID of the trigger to update. |
required |
trigger_update
|
TriggerUpdate
|
The update to be applied to the trigger. |
required |
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The updated trigger. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 | |
update_user(user_id: UUID, user_update: UserUpdate) -> UserResponse
Updates an existing user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
UUID
|
The id of the user to update. |
required |
user_update
|
UserUpdate
|
The update to be applied to the user. |
required |
Returns:
| Type | Description |
|---|---|
UserResponse
|
The updated user. |
Source code in src/zenml/zen_stores/rest_zen_store.py
3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 | |
verify_service_connector(service_connector_id: UUID, resource_type: Optional[str] = None, resource_id: Optional[str] = None, list_resources: bool = True) -> ServiceConnectorResourcesModel
Verifies if a service connector instance has access to one or more resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to verify. |
required |
resource_type
|
Optional[str]
|
The type of resource to verify access to. |
None
|
resource_id
|
Optional[str]
|
The ID of the resource to verify access to. |
None
|
list_resources
|
bool
|
If True, the list of all resources accessible through the service connector and matching the supplied resource type and ID are returned. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResourcesModel
|
The list of resources that the service connector has access to, |
ServiceConnectorResourcesModel
|
scoped to the supplied resource type and ID, if provided. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 | |
verify_service_connector_config(service_connector: ServiceConnectorRequest, list_resources: bool = True) -> ServiceConnectorResourcesModel
Verifies if a service connector configuration has access to resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector
|
ServiceConnectorRequest
|
The service connector configuration to verify. |
required |
list_resources
|
bool
|
If True, the list of all resources accessible through the service connector and matching the supplied resource type and ID are returned. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResourcesModel
|
The list of resources that the service connector configuration has |
ServiceConnectorResourcesModel
|
access to. |
Source code in src/zenml/zen_stores/rest_zen_store.py
2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 | |
RestZenStoreConfiguration
Bases: StoreConfiguration
REST ZenML store configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
StoreType
|
The type of the store. |
username |
StoreType
|
The username to use to connect to the Zen server. |
password |
StoreType
|
The password to use to connect to the Zen server. |
api_key |
StoreType
|
The service account API key to use to connect to the Zen server. This is only set if the API key is configured explicitly via environment variables or the ZenML global configuration file. API keys configured via the CLI are stored in the credentials store instead. |
verify_ssl |
Union[bool, str]
|
Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use or the CA bundle value itself. |
http_timeout |
int
|
The timeout to use for all requests. |
supports_url_scheme(url: str) -> bool
classmethod
Check if a URL scheme is supported by this store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
The URL to check. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the URL scheme is supported, False otherwise. |
Source code in src/zenml/zen_stores/rest_zen_store.py
393 394 395 396 397 398 399 400 401 402 403 | |
validate_url(url: str) -> str
classmethod
Validates that the URL is a well-formed REST store URL.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
The URL to be validated. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The validated URL without trailing slashes. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the URL is not a well-formed REST store URL. |
Source code in src/zenml/zen_stores/rest_zen_store.py
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 | |
validate_verify_ssl(verify_ssl: Union[bool, str]) -> Union[bool, str]
classmethod
Validates that the verify_ssl either points to a file or is a bool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verify_ssl
|
Union[bool, str]
|
The verify_ssl value to be validated. |
required |
Returns:
| Type | Description |
|---|---|
Union[bool, str]
|
The validated verify_ssl value. |
Source code in src/zenml/zen_stores/rest_zen_store.py
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 | |
Functions
Modules
schemas
SQL Model Implementations.
Classes
APIKeySchema
Bases: NamedSchema
SQL Model for API keys.
from_request(service_account_id: UUID, request: APIKeyRequest) -> Tuple[APIKeySchema, str]
classmethod
Convert a APIKeyRequest to a APIKeySchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The service account id to associate the key with. |
required |
request
|
APIKeyRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
Tuple[APIKeySchema, str]
|
The converted schema and the un-hashed API key. |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.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 | |
internal_update(update: APIKeyInternalUpdate) -> APIKeySchema
Update an APIKeySchema with an APIKeyInternalUpdate.
The internal update can also update the last used timestamp.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
APIKeyInternalUpdate
|
The update model. |
required |
Returns:
| Type | Description |
|---|---|
APIKeySchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |
rotate(rotate_request: APIKeyRotateRequest) -> Tuple[APIKeySchema, str]
Rotate the key for an APIKeySchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rotate_request
|
APIKeyRotateRequest
|
The rotate request model. |
required |
Returns:
| Type | Description |
|---|---|
Tuple[APIKeySchema, str]
|
The updated |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
to_internal_model(include_metadata: bool = False, include_resources: bool = False) -> APIKeyInternalResponse
Convert a APIKeySchema to an APIKeyInternalResponse.
The internal response model includes the hashed key values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
Returns:
| Type | Description |
|---|---|
APIKeyInternalResponse
|
The created APIKeyInternalResponse. |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> APIKeyResponse
Convert a APIKeySchema to an APIKeyResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
**kwargs
|
Any
|
Keyword arguments to filter models. |
{}
|
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The created APIKeyResponse. |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
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 | |
update(update: APIKeyUpdate) -> APIKeySchema
Update an APIKeySchema with an APIKeyUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
APIKeyUpdate
|
The update model. |
required |
Returns:
| Type | Description |
|---|---|
APIKeySchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | |
ActionSchema
Bases: NamedSchema
SQL Model for actions.
from_request(request: ActionRequest) -> ActionSchema
classmethod
Convert a ActionRequest to a ActionSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ActionRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
ActionSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/action_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/action_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ActionResponse
Converts the action schema to a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
include_resources
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The converted model. |
Source code in src/zenml/zen_stores/schemas/action_schemas.py
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 | |
update(action_update: ActionUpdate) -> ActionSchema
Updates a action schema with a action update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_update
|
ActionUpdate
|
|
required |
Returns:
| Type | Description |
|---|---|
ActionSchema
|
The updated ActionSchema. |
Source code in src/zenml/zen_stores/schemas/action_schemas.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
ApiTransactionSchema
Bases: BaseSchema
SQL Model for API transactions.
from_request(request: ApiTransactionRequest) -> ApiTransactionSchema
classmethod
Create a new API transaction from a request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ApiTransactionRequest
|
The API transaction request. |
required |
Returns:
| Type | Description |
|---|---|
ApiTransactionSchema
|
The API transaction schema. |
Source code in src/zenml/zen_stores/schemas/api_transaction_schemas.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ApiTransactionResponse
Convert the SQL model to a ZenML model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether to include metadata in the response. |
False
|
include_resources
|
bool
|
Whether to include resources in the response. |
False
|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ApiTransactionResponse
|
The API transaction response. |
Source code in src/zenml/zen_stores/schemas/api_transaction_schemas.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 | |
update(update: ApiTransactionUpdate) -> ApiTransactionSchema
Update the API transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
ApiTransactionUpdate
|
The API transaction update. |
required |
Returns:
| Type | Description |
|---|---|
ApiTransactionSchema
|
The API transaction schema. |
Source code in src/zenml/zen_stores/schemas/api_transaction_schemas.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
ArtifactSchema
Bases: NamedSchema
SQL Model for artifacts.
latest_version: Optional[ArtifactVersionSchema]
property
Fetch the latest version for this artifact.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[ArtifactVersionSchema]
|
The latest version for this artifact. |
from_request(artifact_request: ArtifactRequest) -> ArtifactSchema
classmethod
Convert an ArtifactRequest to an ArtifactSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_request
|
ArtifactRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ArtifactResponse
Convert an ArtifactSchema to an ArtifactResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.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 | |
update(artifact_update: ArtifactUpdate) -> ArtifactSchema
Update an ArtifactSchema with an ArtifactUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_update
|
ArtifactUpdate
|
The update model to apply. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | |
ArtifactVersionSchema
Bases: BaseSchema, RunMetadataInterface
SQL Model for artifact versions.
producer_run_ids: Optional[Tuple[UUID, UUID]]
property
Fetch the producer run IDs for this artifact version.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[Tuple[UUID, UUID]]
|
The producer step run ID and pipeline run ID for this artifact |
Optional[Tuple[UUID, UUID]]
|
version. |
from_request(artifact_version_request: ArtifactVersionRequest) -> ArtifactVersionSchema
classmethod
Convert an ArtifactVersionRequest to an ArtifactVersionSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_request
|
ArtifactVersionRequest
|
The request model to convert. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the request does not specify a version number. |
Returns:
| Type | Description |
|---|---|
ArtifactVersionSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ArtifactVersionResponse
Convert an ArtifactVersionSchema to an ArtifactVersionResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
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 | |
update(artifact_version_update: ArtifactVersionUpdate) -> ArtifactVersionSchema
Update an ArtifactVersionSchema with an ArtifactVersionUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_update
|
ArtifactVersionUpdate
|
The update model to apply. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactVersionSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
570 571 572 573 574 575 576 577 578 579 580 581 582 | |
ArtifactVisualizationSchema
Bases: BaseSchema
SQL Model for visualizations of artifacts.
from_model(artifact_visualization_request: ArtifactVisualizationRequest, artifact_version_id: UUID) -> ArtifactVisualizationSchema
classmethod
Convert a ArtifactVisualizationRequest to a ArtifactVisualizationSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_visualization_request
|
ArtifactVisualizationRequest
|
The visualization. |
required |
artifact_version_id
|
UUID
|
The UUID of the artifact version. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactVisualizationSchema
|
The |
Source code in src/zenml/zen_stores/schemas/artifact_visualization_schemas.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ArtifactVisualizationResponse
Convert an ArtifactVisualizationSchema to a Visualization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ArtifactVisualizationResponse
|
The |
Source code in src/zenml/zen_stores/schemas/artifact_visualization_schemas.py
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 | |
BaseSchema
Bases: SQLModel
Base SQL Model for ZenML entities.
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
This method should return query options that improve the performance when trying to later on converting that schema to a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/base_schemas.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Any
In case the Schema has a corresponding Model, this allows conversion to that model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
When the base class fails to implement this. |
Source code in src/zenml/zen_stores/schemas/base_schemas.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
CodeReferenceSchema
Bases: BaseSchema
SQL Model for code references.
from_request(request: CodeReferenceRequest, project_id: UUID) -> CodeReferenceSchema
classmethod
Convert a CodeReferenceRequest to a CodeReferenceSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CodeReferenceRequest
|
The request model to convert. |
required |
project_id
|
UUID
|
The project ID. |
required |
Returns:
| Type | Description |
|---|---|
CodeReferenceSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> CodeReferenceResponse
Convert a CodeReferenceSchema to a CodeReferenceResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CodeReferenceResponse
|
The converted model. |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.py
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 | |
CodeRepositorySchema
Bases: NamedSchema
SQL Model for code repositories.
from_request(request: CodeRepositoryRequest) -> CodeRepositorySchema
classmethod
Convert a CodeRepositoryRequest to a CodeRepositorySchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CodeRepositoryRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
CodeRepositorySchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> CodeRepositoryResponse
Convert a CodeRepositorySchema to a CodeRepositoryResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The created CodeRepositoryResponse. |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.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 178 179 180 181 | |
update(update: CodeRepositoryUpdate) -> CodeRepositorySchema
Update a CodeRepositorySchema with a CodeRepositoryUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
CodeRepositoryUpdate
|
The update model. |
required |
Returns:
| Type | Description |
|---|---|
CodeRepositorySchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
CuratedVisualizationSchema
Bases: BaseSchema
SQL Model for curated visualizations.
from_request(request: CuratedVisualizationRequest) -> CuratedVisualizationSchema
classmethod
Convert a request into a schema instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CuratedVisualizationRequest
|
The request to convert. |
required |
Returns:
| Type | Description |
|---|---|
CuratedVisualizationSchema
|
The created schema. |
Source code in src/zenml/zen_stores/schemas/curated_visualization_schemas.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/curated_visualization_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> CuratedVisualizationResponse
Convert schema into response model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether to include metadata in the response. |
False
|
include_resources
|
bool
|
Whether to include resources in the response. |
False
|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The created response model. |
Source code in src/zenml/zen_stores/schemas/curated_visualization_schemas.py
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 | |
update(update: CuratedVisualizationUpdate) -> CuratedVisualizationSchema
Update a schema instance from an update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
CuratedVisualizationUpdate
|
The update definition. |
required |
Returns:
| Type | Description |
|---|---|
CuratedVisualizationSchema
|
The updated schema. |
Source code in src/zenml/zen_stores/schemas/curated_visualization_schemas.py
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 | |
DeploymentSchema
Bases: NamedSchema
SQL Model for pipeline deployment.
from_request(request: DeploymentRequest) -> DeploymentSchema
classmethod
Convert a DeploymentRequest to a DeploymentSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
DeploymentRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
DeploymentSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/deployment_schemas.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/deployment_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> DeploymentResponse
Convert a DeploymentSchema to a DeploymentResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether to include metadata in the response. |
False
|
include_resources
|
bool
|
Whether to include resources in the response. |
False
|
kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/deployment_schemas.py
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 | |
update(update: DeploymentUpdate) -> DeploymentSchema
Updates a DeploymentSchema from a DeploymentUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
DeploymentUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
DeploymentSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/deployment_schemas.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
EventSourceSchema
Bases: NamedSchema
SQL Model for tag.
from_request(request: EventSourceRequest) -> EventSourceSchema
classmethod
Convert an EventSourceRequest to an EventSourceSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
EventSourceRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
EventSourceSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/event_source_schemas.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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/event_source_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> EventSourceResponse
Convert an EventSourceSchema to an EventSourceResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
include_resources
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/event_source_schemas.py
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 | |
update(update: EventSourceUpdate) -> EventSourceSchema
Updates a EventSourceSchema from a EventSourceUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
EventSourceUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
EventSourceSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/event_source_schemas.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
FlavorSchema
Bases: NamedSchema
SQL Model for flavors.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
The type of the flavor. |
source |
str
|
The source of the flavor. |
config_schema |
str
|
The config schema of the flavor. |
integration |
Optional[str]
|
The integration associated with the flavor. |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/flavor_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> FlavorResponse
Converts a flavor schema to a flavor model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The flavor model. |
Source code in src/zenml/zen_stores/schemas/flavor_schemas.py
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 | |
update(flavor_update: FlavorUpdate) -> FlavorSchema
Update a FlavorSchema from a FlavorUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_update
|
FlavorUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
FlavorSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/flavor_schemas.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 | |
LogsSchema
Bases: BaseSchema
SQL Model for logs.
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> LogsResponse
Convert a LogsSchema to a LogsResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
LogsResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/logs_schemas.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 113 114 115 116 117 118 119 | |
ModelSchema
Bases: NamedSchema
SQL Model for model.
latest_version: Optional[ModelVersionSchema]
property
Fetch the latest version for this model.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[ModelVersionSchema]
|
The latest version for this model. |
from_request(model_request: ModelRequest) -> ModelSchema
classmethod
Convert an ModelRequest to an ModelSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_request
|
ModelRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
ModelSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/model_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ModelResponse
Convert an ModelSchema to an ModelResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/model_schemas.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 | |
update(model_update: ModelUpdate) -> ModelSchema
Updates a ModelSchema from a ModelUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_update
|
ModelUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
ModelSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | |
ModelVersionArtifactSchema
Bases: BaseSchema
SQL Model for linking of Model Versions and Artifacts M:M.
from_request(model_version_artifact_request: ModelVersionArtifactRequest) -> ModelVersionArtifactSchema
classmethod
Convert an ModelVersionArtifactRequest to a ModelVersionArtifactSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_artifact_request
|
ModelVersionArtifactRequest
|
The request link to convert. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionArtifactSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ModelVersionArtifactResponse
Convert an ModelVersionArtifactSchema to an ModelVersionArtifactResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ModelVersionArtifactResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
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 | |
ModelVersionPipelineRunSchema
Bases: BaseSchema
SQL Model for linking of Model Versions and Pipeline Runs M:M.
from_request(model_version_pipeline_run_request: ModelVersionPipelineRunRequest) -> ModelVersionPipelineRunSchema
classmethod
Convert an ModelVersionPipelineRunRequest to an ModelVersionPipelineRunSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_pipeline_run_request
|
ModelVersionPipelineRunRequest
|
The request link to convert. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionPipelineRunSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ModelVersionPipelineRunResponse
Convert an ModelVersionPipelineRunSchema to an ModelVersionPipelineRunResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ModelVersionPipelineRunResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
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 | |
ModelVersionSchema
Bases: NamedSchema, RunMetadataInterface
SQL Model for model version.
from_request(model_version_request: ModelVersionRequest, model_version_number: int, producer_run_id: Optional[UUID] = None) -> ModelVersionSchema
classmethod
Convert an ModelVersionRequest to an ModelVersionSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_request
|
ModelVersionRequest
|
The request model version to convert. |
required |
model_version_number
|
int
|
The model version number. |
required |
producer_run_id
|
Optional[UUID]
|
The ID of the producer run. |
None
|
Returns:
| Type | Description |
|---|---|
ModelVersionSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ModelVersionResponse
Convert an ModelVersionSchema to an ModelVersionResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
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 | |
update(target_stage: Optional[str] = None, target_name: Optional[str] = None, target_description: Optional[str] = None) -> ModelVersionSchema
Updates a ModelVersionSchema to a target stage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_stage
|
Optional[str]
|
The stage to be updated. |
None
|
target_name
|
Optional[str]
|
The version name to be updated. |
None
|
target_description
|
Optional[str]
|
The version description to be updated. |
None
|
Returns:
| Type | Description |
|---|---|
ModelVersionSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | |
NamedSchema
OAuthDeviceSchema
Bases: BaseSchema
SQL Model for authorized OAuth2 devices.
from_request(request: OAuthDeviceInternalRequest) -> Tuple[OAuthDeviceSchema, str, str]
classmethod
Create an authorized device DB entry from a device authorization request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
OAuthDeviceInternalRequest
|
The device authorization request. |
required |
Returns:
| Type | Description |
|---|---|
Tuple[OAuthDeviceSchema, str, str]
|
The created |
Source code in src/zenml/zen_stores/schemas/device_schemas.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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/device_schemas.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 | |
internal_update(device_update: OAuthDeviceInternalUpdate) -> Tuple[OAuthDeviceSchema, Optional[str], Optional[str]]
Update an authorized device from an internal device update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_update
|
OAuthDeviceInternalUpdate
|
The internal device update model. |
required |
Returns:
| Type | Description |
|---|---|
OAuthDeviceSchema
|
The updated |
Optional[str]
|
code, if they were generated. |
Source code in src/zenml/zen_stores/schemas/device_schemas.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 | |
to_internal_model(include_metadata: bool = False, include_resources: bool = False) -> OAuthDeviceInternalResponse
Convert a device schema to an internal device response model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
Returns:
| Type | Description |
|---|---|
OAuthDeviceInternalResponse
|
The converted internal device response model. |
Source code in src/zenml/zen_stores/schemas/device_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> OAuthDeviceResponse
Convert a device schema to a device response model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
OAuthDeviceResponse
|
The converted device response model. |
Source code in src/zenml/zen_stores/schemas/device_schemas.py
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 | |
update(device_update: OAuthDeviceUpdate) -> OAuthDeviceSchema
Update an authorized device from a device update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_update
|
OAuthDeviceUpdate
|
The device update model. |
required |
Returns:
| Type | Description |
|---|---|
OAuthDeviceSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/device_schemas.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
PipelineBuildSchema
Bases: BaseSchema
SQL Model for pipeline builds.
from_request(request: PipelineBuildRequest) -> PipelineBuildSchema
classmethod
Convert a PipelineBuildRequest to a PipelineBuildSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
PipelineBuildRequest
|
The request to convert. |
required |
Returns:
| Type | Description |
|---|---|
PipelineBuildSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/pipeline_build_schemas.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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/pipeline_build_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> PipelineBuildResponse
Convert a PipelineBuildSchema to a PipelineBuildResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
PipelineBuildResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/pipeline_build_schemas.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 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | |
PipelineRunSchema
Bases: NamedSchema, RunMetadataInterface
SQL Model for pipeline runs.
fetch_metadata_collection(include_full_metadata: bool = False, **kwargs: Any) -> Dict[str, List[RunMetadataEntry]]
Fetches all the metadata entries related to the pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_full_metadata
|
bool
|
Whether the full metadata will be included. |
False
|
**kwargs
|
Any
|
Keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
Dict[str, List[RunMetadataEntry]]
|
a dictionary, where the key is the key of the metadata entry and the values represent the list of entries with this key. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
from_request(request: PipelineRunRequest) -> PipelineRunSchema
classmethod
Convert a PipelineRunRequest to a PipelineRunSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
PipelineRunRequest
|
The request to convert. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
get_pipeline_configuration() -> PipelineConfiguration
Get the pipeline configuration for the pipeline run.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the pipeline run has no snapshot and no pipeline configuration. |
Returns:
| Type | Description |
|---|---|
PipelineConfiguration
|
The pipeline configuration. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
get_step_configuration(step_name: str) -> Step
Get the step configuration for the pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_name
|
str
|
The name of the step to get the configuration for. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the pipeline run has no snapshot. |
Returns:
| Type | Description |
|---|---|
Step
|
The step configuration. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | |
get_upstream_steps() -> Dict[str, List[str]]
Get the list of all the upstream steps for each step.
Returns:
| Type | Description |
|---|---|
Dict[str, List[str]]
|
The list of upstream steps for each step. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the pipeline run has no snapshot or the snapshot has no pipeline spec. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | |
is_placeholder_run() -> bool
Whether the pipeline run is a placeholder run.
Returns:
| Type | Description |
|---|---|
bool
|
Whether the pipeline run is a placeholder run. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
764 765 766 767 768 769 770 771 772 773 | |
to_model(include_metadata: bool = False, include_resources: bool = False, include_python_packages: bool = False, include_full_metadata: bool = False, **kwargs: Any) -> PipelineRunResponse
Convert a PipelineRunSchema to a PipelineRunResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
include_python_packages
|
bool
|
Whether the python packages will be filled. |
False
|
include_full_metadata
|
bool
|
Whether the full metadata will be included. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The created |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the model creation fails. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
update(run_update: PipelineRunUpdate) -> PipelineRunSchema
Update a PipelineRunSchema with a PipelineRunUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_update
|
PipelineRunUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
update_placeholder(request: PipelineRunRequest) -> PipelineRunSchema
Update a placeholder run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
PipelineRunRequest
|
The pipeline run request which should replace the placeholder. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the DB entry does not represent a placeholder run. |
ValueError
|
If the run request is not a valid request to replace the placeholder run. |
Returns:
| Type | Description |
|---|---|
PipelineRunSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
PipelineSchema
Bases: NamedSchema
SQL Model for pipelines.
latest_run: Optional[PipelineRunSchema]
property
Fetch the latest run for this pipeline.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[PipelineRunSchema]
|
The latest run for this pipeline. |
from_request(pipeline_request: PipelineRequest) -> PipelineSchema
classmethod
Convert a PipelineRequest to a PipelineSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_request
|
PipelineRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/pipeline_schemas.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/pipeline_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> PipelineResponse
Convert a PipelineSchema to a PipelineResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The created PipelineResponse. |
Source code in src/zenml/zen_stores/schemas/pipeline_schemas.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 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 | |
update(pipeline_update: PipelineUpdate) -> PipelineSchema
Update a PipelineSchema with a PipelineUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_update
|
PipelineUpdate
|
The update model. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/pipeline_schemas.py
262 263 264 265 266 267 268 269 270 271 272 273 | |
PipelineSnapshotSchema
Bases: BaseSchema
SQL Model for pipeline snapshots.
latest_run: Optional[PipelineRunSchema]
property
Fetch the latest run for this snapshot.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[PipelineRunSchema]
|
The latest run for this snapshot. |
from_request(request: PipelineSnapshotRequest, code_reference_id: Optional[UUID]) -> PipelineSnapshotSchema
classmethod
Create schema from request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
PipelineSnapshotRequest
|
The request to convert. |
required |
code_reference_id
|
Optional[UUID]
|
Optional ID of the code reference for the snapshot. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSnapshotSchema
|
The created schema. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.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 | |
get_step_configuration(step_name: str) -> StepConfigurationSchema
Get a step configuration of the snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_name
|
str
|
The name of the step to get the configuration for. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the step configuration is not found. |
Returns:
| Type | Description |
|---|---|
StepConfigurationSchema
|
The step configuration. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | |
get_step_configurations(include: Optional[List[str]] = None) -> List[StepConfigurationSchema]
Get step configurations for the snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[List[str]]
|
List of step names to include. If not given, all step configurations will be included. |
None
|
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
List[StepConfigurationSchema]
|
List of step configurations. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, include_python_packages: bool = False, include_config_schema: Optional[bool] = None, step_configuration_filter: Optional[List[str]] = None, **kwargs: Any) -> PipelineSnapshotResponse
Convert schema to response.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
include_python_packages
|
bool
|
Whether the python packages will be filled. |
False
|
include_config_schema
|
Optional[bool]
|
Whether the config schema will be filled. |
None
|
step_configuration_filter
|
Optional[List[str]]
|
List of step configurations to include in the response. If not given, all step configurations will be included. |
None
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The response. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.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 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 | |
update(update: PipelineSnapshotUpdate) -> PipelineSnapshotSchema
Update the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
PipelineSnapshotUpdate
|
The update to apply. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSnapshotSchema
|
The updated schema. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.py
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | |
ProjectSchema
Bases: NamedSchema
SQL Model for projects.
from_request(project: ProjectRequest) -> ProjectSchema
classmethod
Create a ProjectSchema from a ProjectResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
ProjectRequest
|
The |
required |
Returns:
| Type | Description |
|---|---|
ProjectSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/project_schemas.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ProjectResponse
Convert a ProjectSchema to a ProjectResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The converted |
Source code in src/zenml/zen_stores/schemas/project_schemas.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 | |
update(project_update: ProjectUpdate) -> ProjectSchema
Update a ProjectSchema from a ProjectUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_update
|
ProjectUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
ProjectSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/project_schemas.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
RunMetadataResourceSchema
Bases: SQLModel
Table for linking resources to run metadata entries.
RunMetadataSchema
RunTemplateSchema
Bases: NamedSchema
SQL Model for run templates.
latest_run: Optional[PipelineRunSchema]
property
Fetch the latest run for this template.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[PipelineRunSchema]
|
The latest run for this template. |
from_request(request: RunTemplateRequest) -> RunTemplateSchema
classmethod
Create a schema from a request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
RunTemplateRequest
|
The request to convert. |
required |
Returns:
| Type | Description |
|---|---|
RunTemplateSchema
|
The created schema. |
Source code in src/zenml/zen_stores/schemas/run_template_schemas.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/run_template_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> RunTemplateResponse
Convert the schema to a response model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
Model representing this schema. |
Source code in src/zenml/zen_stores/schemas/run_template_schemas.py
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 | |
update(update: RunTemplateUpdate) -> RunTemplateSchema
Update the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
RunTemplateUpdate
|
The update model. |
required |
Returns:
| Type | Description |
|---|---|
RunTemplateSchema
|
The updated schema. |
Source code in src/zenml/zen_stores/schemas/run_template_schemas.py
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | |
ScheduleSchema
Bases: NamedSchema, RunMetadataInterface
SQL Model for schedules.
from_request(schedule_request: ScheduleRequest) -> ScheduleSchema
classmethod
Create a ScheduleSchema from a ScheduleRequest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_request
|
ScheduleRequest
|
The |
required |
Returns:
| Type | Description |
|---|---|
ScheduleSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/schedule_schema.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/schedule_schema.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ScheduleResponse
Convert a ScheduleSchema to a ScheduleResponseModel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/schedule_schema.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 | |
update(schedule_update: ScheduleUpdate) -> ScheduleSchema
Update a ScheduleSchema from a ScheduleUpdateModel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_update
|
ScheduleUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
ScheduleSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/schedule_schema.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
SecretResourceSchema
SecretSchema
Bases: NamedSchema
SQL Model for secrets.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the secret. |
values |
Optional[bytes]
|
The values of the secret. |
from_request(secret: SecretRequest, internal: bool = False) -> SecretSchema
classmethod
Create a SecretSchema from a SecretRequest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret
|
SecretRequest
|
The |
required |
internal
|
bool
|
Whether the secret is internal. |
False
|
Returns:
| Type | Description |
|---|---|
SecretSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/secret_schemas.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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/secret_schemas.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 | |
get_secret_values(encryption_engine: Optional[AesGcmEngine] = None) -> Dict[str, str]
Get the secret values for this secret.
This method is used by the SQL secrets store to load the secret values from the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encryption_engine
|
Optional[AesGcmEngine]
|
The encryption engine to use to decrypt the secret values. If None, the values will be base64 decoded. |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
The secret values |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
Source code in src/zenml/zen_stores/schemas/secret_schemas.py
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 | |
set_secret_values(secret_values: Dict[str, str], encryption_engine: Optional[AesGcmEngine] = None) -> None
Create a SecretSchema from a SecretRequest.
This method is used by the SQL secrets store to store the secret values in the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_values
|
Dict[str, str]
|
The new secret values. |
required |
encryption_engine
|
Optional[AesGcmEngine]
|
The encryption engine to use to encrypt the secret values. If None, the values will be base64 encoded. |
None
|
Source code in src/zenml/zen_stores/schemas/secret_schemas.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> SecretResponse
Converts a secret schema to a secret model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The secret model. |
Source code in src/zenml/zen_stores/schemas/secret_schemas.py
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 | |
update(secret_update: SecretUpdate) -> SecretSchema
Update a SecretSchema from a SecretUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_update
|
SecretUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
SecretSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/secret_schemas.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | |
ServerSettingsSchema
Bases: SQLModel
SQL Model for the server settings.
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ServerSettingsResponse
Convert an ServerSettingsSchema to an ServerSettingsResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ServerSettingsResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/server_settings_schemas.py
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 | |
update(settings_update: ServerSettingsUpdate) -> ServerSettingsSchema
Update a ServerSettingsSchema from a ServerSettingsUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings_update
|
ServerSettingsUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
ServerSettingsSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/server_settings_schemas.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
update_onboarding_state(completed_steps: Set[str]) -> ServerSettingsSchema
Update the onboarding state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
completed_steps
|
Set[str]
|
Newly completed onboarding steps. |
required |
Returns:
| Type | Description |
|---|---|
ServerSettingsSchema
|
The updated schema. |
Source code in src/zenml/zen_stores/schemas/server_settings_schemas.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
ServiceConnectorSchema
Bases: NamedSchema
SQL Model for service connectors.
labels_dict: Dict[str, str]
property
Returns the labels as a dictionary.
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
The labels as a dictionary. |
resource_types_list: List[str]
property
Returns the resource types as a list.
Returns:
| Type | Description |
|---|---|
List[str]
|
The resource types as a list. |
from_request(connector_request: ServiceConnectorRequest, secret_id: Optional[UUID] = None) -> ServiceConnectorSchema
classmethod
Create a ServiceConnectorSchema from a ServiceConnectorRequest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connector_request
|
ServiceConnectorRequest
|
The |
required |
secret_id
|
Optional[UUID]
|
The ID of the secret to use for this connector. |
None
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/service_connector_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/service_connector_schemas.py
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 | |
has_labels(labels: Dict[str, Optional[str]]) -> bool
Checks if the connector has the given labels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
Dict[str, Optional[str]]
|
The labels to check for. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
Whether the connector has the given labels. |
Source code in src/zenml/zen_stores/schemas/service_connector_schemas.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ServiceConnectorResponse
Creates a ServiceConnector from a ServiceConnectorSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
A |
Source code in src/zenml/zen_stores/schemas/service_connector_schemas.py
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 | |
update(connector_update: ServiceConnectorUpdate, secret_id: Optional[UUID] = None) -> ServiceConnectorSchema
Updates a ServiceConnectorSchema from a ServiceConnectorUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connector_update
|
ServiceConnectorUpdate
|
The |
required |
secret_id
|
Optional[UUID]
|
The ID of the secret to use for this connector. |
None
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/service_connector_schemas.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 | |
ServiceSchema
Bases: NamedSchema
SQL Model for service.
from_request(service_request: ServiceRequest) -> ServiceSchema
classmethod
Convert a ServiceRequest to a ServiceSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_request
|
ServiceRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
ServiceSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/service_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/service_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ServiceResponse
Convert an ServiceSchema to an ServiceResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether to include metadata in the response. |
False
|
include_resources
|
bool
|
Whether to include resources in the response. |
False
|
kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/service_schemas.py
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 | |
update(update: ServiceUpdate) -> ServiceSchema
Updates a ServiceSchema from a ServiceUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
ServiceUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
ServiceSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/service_schemas.py
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 | |
StackComponentSchema
Bases: NamedSchema
SQL Model for stack components.
from_request(request: ComponentRequest, service_connector: Optional[ServiceConnectorSchema] = None) -> StackComponentSchema
classmethod
Create a component schema from a request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ComponentRequest
|
The request from which to create the component. |
required |
service_connector
|
Optional[ServiceConnectorSchema]
|
Optional service connector to link to the component. |
None
|
Returns:
| Type | Description |
|---|---|
StackComponentSchema
|
The component schema. |
Source code in src/zenml/zen_stores/schemas/component_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/component_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ComponentResponse
Creates a ComponentModel from an instance of a StackComponentSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the flavor for the component is missing in the DB. |
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
A |
Source code in src/zenml/zen_stores/schemas/component_schemas.py
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 | |
update(component_update: ComponentUpdate) -> StackComponentSchema
Updates a StackComponentSchema from a ComponentUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_update
|
ComponentUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
StackComponentSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/component_schemas.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 | |
StackCompositionSchema
Bases: SQLModel
SQL Model for stack definitions.
Join table between Stacks and StackComponents.
StackSchema
Bases: NamedSchema
SQL Model for stacks.
has_deployer: bool
property
If the stack has a deployer component.
Returns:
| Type | Description |
|---|---|
bool
|
If the stack has a deployer component. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the stack has no DB session. |
from_request(request: StackRequest, components: Sequence[StackComponentSchema]) -> StackSchema
classmethod
Create a stack schema from a request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
StackRequest
|
The request from which to create the stack. |
required |
components
|
Sequence[StackComponentSchema]
|
List of components to link to the stack. |
required |
Returns:
| Type | Description |
|---|---|
StackSchema
|
The stack schema. |
Source code in src/zenml/zen_stores/schemas/stack_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/stack_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> StackResponse
Converts the schema to a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
StackResponse
|
The converted model. |
Source code in src/zenml/zen_stores/schemas/stack_schemas.py
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 | |
update(stack_update: StackUpdate, components: List[StackComponentSchema]) -> StackSchema
Updates a stack schema with a stack update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_update
|
StackUpdate
|
|
required |
components
|
List[StackComponentSchema]
|
List of |
required |
Returns:
| Type | Description |
|---|---|
StackSchema
|
The updated StackSchema. |
Source code in src/zenml/zen_stores/schemas/stack_schemas.py
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 | |
StepConfigurationSchema
StepRunInputArtifactSchema
Bases: SQLModel
SQL Model that defines which artifacts are inputs to which step.
StepRunOutputArtifactSchema
Bases: SQLModel
SQL Model that defines which artifacts are outputs of which step.
StepRunParentsSchema
Bases: SQLModel
SQL Model that defines the order of steps.
StepRunSchema
Bases: NamedSchema, RunMetadataInterface
SQL Model for steps of pipeline runs.
from_request(request: StepRunRequest, snapshot_id: Optional[UUID], version: int, is_retriable: bool) -> StepRunSchema
classmethod
Create a step run schema from a step run request model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
StepRunRequest
|
The step run request model. |
required |
snapshot_id
|
Optional[UUID]
|
The snapshot ID. |
required |
version
|
int
|
The version of the step run. |
required |
is_retriable
|
bool
|
Whether the step run is retriable. |
required |
Returns:
| Type | Description |
|---|---|
StepRunSchema
|
The step run schema. |
Source code in src/zenml/zen_stores/schemas/step_run_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/step_run_schemas.py
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 | |
get_step_configuration() -> Step
Get the step configuration for the step run.
Raises:
| Type | Description |
|---|---|
ValueError
|
If the step run has no step configuration. |
Returns:
| Type | Description |
|---|---|
Step
|
The step configuration. |
Source code in src/zenml/zen_stores/schemas/step_run_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> StepRunResponse
Convert a StepRunSchema to a StepRunResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The created StepRunResponse. |
Source code in src/zenml/zen_stores/schemas/step_run_schemas.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 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 | |
update(step_update: StepRunUpdate) -> StepRunSchema
Update a step run schema with a step run update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_update
|
StepRunUpdate
|
The step run update model. |
required |
Returns:
| Type | Description |
|---|---|
StepRunSchema
|
The updated step run schema. |
Source code in src/zenml/zen_stores/schemas/step_run_schemas.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 | |
TagResourceSchema
Bases: BaseSchema
SQL Model for tag resource relationship.
from_request(request: TagResourceRequest) -> TagResourceSchema
classmethod
Convert an TagResourceRequest to an TagResourceSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TagResourceRequest
|
The request model version to convert. |
required |
Returns:
| Type | Description |
|---|---|
TagResourceSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/tag_schemas.py
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> TagResourceResponse
Convert an TagResourceSchema to an TagResourceResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
TagResourceResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/tag_schemas.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 | |
TagSchema
Bases: NamedSchema
SQL Model for tag.
tagged_count: int
property
Fetch the number of resources tagged with this tag.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
int
|
The number of resources tagged with this tag. |
from_request(request: TagRequest) -> TagSchema
classmethod
Convert an TagRequest to an TagSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TagRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
TagSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/tag_schemas.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/tag_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> TagResponse
Convert an TagSchema to an TagResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
TagResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/tag_schemas.py
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 | |
update(update: TagUpdate) -> TagSchema
Updates a TagSchema from a TagUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
TagUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
TagSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/tag_schemas.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | |
TriggerExecutionSchema
Bases: BaseSchema
SQL Model for trigger executions.
from_request(request: TriggerExecutionRequest) -> TriggerExecutionSchema
classmethod
Convert a TriggerExecutionRequest to a TriggerExecutionSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TriggerExecutionRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
TriggerExecutionSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> TriggerExecutionResponse
Converts the schema to a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
TriggerExecutionResponse
|
The converted model. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
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 | |
TriggerSchema
Bases: NamedSchema
SQL Model for triggers.
from_request(request: TriggerRequest) -> TriggerSchema
classmethod
Convert a TriggerRequest to a TriggerSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TriggerRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
TriggerSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> TriggerResponse
Converts the schema to a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
include_resources
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The converted model. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
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 | |
update(trigger_update: TriggerUpdate) -> TriggerSchema
Updates a trigger schema with a trigger update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_update
|
TriggerUpdate
|
|
required |
Returns:
| Type | Description |
|---|---|
TriggerSchema
|
The updated TriggerSchema. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
UserSchema
Bases: NamedSchema
SQL Model for users.
from_service_account_request(model: Union[ServiceAccountRequest, ServiceAccountInternalRequest]) -> UserSchema
classmethod
Create a UserSchema from a Service Account request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Union[ServiceAccountRequest, ServiceAccountInternalRequest]
|
The |
required |
Returns:
| Type | Description |
|---|---|
UserSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/user_schemas.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 | |
from_user_request(model: UserRequest) -> UserSchema
classmethod
Create a UserSchema from a UserRequest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
UserRequest
|
The |
required |
Returns:
| Type | Description |
|---|---|
UserSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/user_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, include_private: bool = False, **kwargs: Any) -> UserResponse
Convert a UserSchema to a UserResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
include_private
|
bool
|
Whether to include the user private information this is to limit the amount of data one can get about other users. |
False
|
Returns:
| Type | Description |
|---|---|
UserResponse
|
The converted |
Source code in src/zenml/zen_stores/schemas/user_schemas.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 | |
to_service_account_model(include_metadata: bool = False, include_resources: bool = False) -> ServiceAccountResponse
Convert a UserSchema to a ServiceAccountResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The converted |
Source code in src/zenml/zen_stores/schemas/user_schemas.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 | |
update_service_account(service_account_update: ServiceAccountUpdate) -> UserSchema
Update a UserSchema from a ServiceAccountUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_update
|
ServiceAccountUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
UserSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/user_schemas.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
update_user(user_update: UserUpdate) -> UserSchema
Update a UserSchema from a UserUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_update
|
UserUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
UserSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/user_schemas.py
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 | |
Modules
action_schemas
SQL Model Implementations for Actions.
ActionSchema
Bases: NamedSchema
SQL Model for actions.
from_request(request: ActionRequest) -> ActionSchema
classmethod
Convert a ActionRequest to a ActionSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ActionRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
ActionSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/action_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/action_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ActionResponse
Converts the action schema to a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
include_resources
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The converted model. |
Source code in src/zenml/zen_stores/schemas/action_schemas.py
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 | |
update(action_update: ActionUpdate) -> ActionSchema
Updates a action schema with a action update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_update
|
ActionUpdate
|
|
required |
Returns:
| Type | Description |
|---|---|
ActionSchema
|
The updated ActionSchema. |
Source code in src/zenml/zen_stores/schemas/action_schemas.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
api_key_schemas
SQLModel implementation of user tables.
APIKeySchema
Bases: NamedSchema
SQL Model for API keys.
from_request(service_account_id: UUID, request: APIKeyRequest) -> Tuple[APIKeySchema, str]
classmethod
Convert a APIKeyRequest to a APIKeySchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The service account id to associate the key with. |
required |
request
|
APIKeyRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
Tuple[APIKeySchema, str]
|
The converted schema and the un-hashed API key. |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.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 | |
internal_update(update: APIKeyInternalUpdate) -> APIKeySchema
Update an APIKeySchema with an APIKeyInternalUpdate.
The internal update can also update the last used timestamp.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
APIKeyInternalUpdate
|
The update model. |
required |
Returns:
| Type | Description |
|---|---|
APIKeySchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |
rotate(rotate_request: APIKeyRotateRequest) -> Tuple[APIKeySchema, str]
Rotate the key for an APIKeySchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rotate_request
|
APIKeyRotateRequest
|
The rotate request model. |
required |
Returns:
| Type | Description |
|---|---|
Tuple[APIKeySchema, str]
|
The updated |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
to_internal_model(include_metadata: bool = False, include_resources: bool = False) -> APIKeyInternalResponse
Convert a APIKeySchema to an APIKeyInternalResponse.
The internal response model includes the hashed key values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
Returns:
| Type | Description |
|---|---|
APIKeyInternalResponse
|
The created APIKeyInternalResponse. |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> APIKeyResponse
Convert a APIKeySchema to an APIKeyResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
**kwargs
|
Any
|
Keyword arguments to filter models. |
{}
|
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The created APIKeyResponse. |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
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 | |
update(update: APIKeyUpdate) -> APIKeySchema
Update an APIKeySchema with an APIKeyUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
APIKeyUpdate
|
The update model. |
required |
Returns:
| Type | Description |
|---|---|
APIKeySchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/api_key_schemas.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | |
api_transaction_schemas
SQLModel implementation of idempotent API transaction tables.
ApiTransactionSchema
Bases: BaseSchema
SQL Model for API transactions.
from_request(request: ApiTransactionRequest) -> ApiTransactionSchema
classmethod
Create a new API transaction from a request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ApiTransactionRequest
|
The API transaction request. |
required |
Returns:
| Type | Description |
|---|---|
ApiTransactionSchema
|
The API transaction schema. |
Source code in src/zenml/zen_stores/schemas/api_transaction_schemas.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ApiTransactionResponse
Convert the SQL model to a ZenML model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether to include metadata in the response. |
False
|
include_resources
|
bool
|
Whether to include resources in the response. |
False
|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ApiTransactionResponse
|
The API transaction response. |
Source code in src/zenml/zen_stores/schemas/api_transaction_schemas.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 | |
update(update: ApiTransactionUpdate) -> ApiTransactionSchema
Update the API transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
ApiTransactionUpdate
|
The API transaction update. |
required |
Returns:
| Type | Description |
|---|---|
ApiTransactionSchema
|
The API transaction schema. |
Source code in src/zenml/zen_stores/schemas/api_transaction_schemas.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
artifact_schemas
SQLModel implementation of artifact table.
ArtifactSchema
Bases: NamedSchema
SQL Model for artifacts.
latest_version: Optional[ArtifactVersionSchema]
property
Fetch the latest version for this artifact.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[ArtifactVersionSchema]
|
The latest version for this artifact. |
from_request(artifact_request: ArtifactRequest) -> ArtifactSchema
classmethod
Convert an ArtifactRequest to an ArtifactSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_request
|
ArtifactRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ArtifactResponse
Convert an ArtifactSchema to an ArtifactResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.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 | |
update(artifact_update: ArtifactUpdate) -> ArtifactSchema
Update an ArtifactSchema with an ArtifactUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_update
|
ArtifactUpdate
|
The update model to apply. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | |
ArtifactVersionSchema
Bases: BaseSchema, RunMetadataInterface
SQL Model for artifact versions.
producer_run_ids: Optional[Tuple[UUID, UUID]]
property
Fetch the producer run IDs for this artifact version.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[Tuple[UUID, UUID]]
|
The producer step run ID and pipeline run ID for this artifact |
Optional[Tuple[UUID, UUID]]
|
version. |
from_request(artifact_version_request: ArtifactVersionRequest) -> ArtifactVersionSchema
classmethod
Convert an ArtifactVersionRequest to an ArtifactVersionSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_request
|
ArtifactVersionRequest
|
The request model to convert. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the request does not specify a version number. |
Returns:
| Type | Description |
|---|---|
ArtifactVersionSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ArtifactVersionResponse
Convert an ArtifactVersionSchema to an ArtifactVersionResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
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 | |
update(artifact_version_update: ArtifactVersionUpdate) -> ArtifactVersionSchema
Update an ArtifactVersionSchema with an ArtifactVersionUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_update
|
ArtifactVersionUpdate
|
The update model to apply. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactVersionSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/artifact_schemas.py
570 571 572 573 574 575 576 577 578 579 580 581 582 | |
artifact_visualization_schemas
SQLModel implementation of artifact visualization table.
ArtifactVisualizationSchema
Bases: BaseSchema
SQL Model for visualizations of artifacts.
from_model(artifact_visualization_request: ArtifactVisualizationRequest, artifact_version_id: UUID) -> ArtifactVisualizationSchema
classmethod
Convert a ArtifactVisualizationRequest to a ArtifactVisualizationSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_visualization_request
|
ArtifactVisualizationRequest
|
The visualization. |
required |
artifact_version_id
|
UUID
|
The UUID of the artifact version. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactVisualizationSchema
|
The |
Source code in src/zenml/zen_stores/schemas/artifact_visualization_schemas.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ArtifactVisualizationResponse
Convert an ArtifactVisualizationSchema to a Visualization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ArtifactVisualizationResponse
|
The |
Source code in src/zenml/zen_stores/schemas/artifact_visualization_schemas.py
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 | |
base_schemas
Base classes for SQLModel schemas.
BaseSchema
Bases: SQLModel
Base SQL Model for ZenML entities.
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
This method should return query options that improve the performance when trying to later on converting that schema to a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/base_schemas.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Any
In case the Schema has a corresponding Model, this allows conversion to that model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
When the base class fails to implement this. |
Source code in src/zenml/zen_stores/schemas/base_schemas.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
NamedSchema
code_repository_schemas
SQL Model Implementations for code repositories.
CodeReferenceSchema
Bases: BaseSchema
SQL Model for code references.
from_request(request: CodeReferenceRequest, project_id: UUID) -> CodeReferenceSchema
classmethod
Convert a CodeReferenceRequest to a CodeReferenceSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CodeReferenceRequest
|
The request model to convert. |
required |
project_id
|
UUID
|
The project ID. |
required |
Returns:
| Type | Description |
|---|---|
CodeReferenceSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> CodeReferenceResponse
Convert a CodeReferenceSchema to a CodeReferenceResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CodeReferenceResponse
|
The converted model. |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.py
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 | |
CodeRepositorySchema
Bases: NamedSchema
SQL Model for code repositories.
from_request(request: CodeRepositoryRequest) -> CodeRepositorySchema
classmethod
Convert a CodeRepositoryRequest to a CodeRepositorySchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CodeRepositoryRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
CodeRepositorySchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> CodeRepositoryResponse
Convert a CodeRepositorySchema to a CodeRepositoryResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The created CodeRepositoryResponse. |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.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 178 179 180 181 | |
update(update: CodeRepositoryUpdate) -> CodeRepositorySchema
Update a CodeRepositorySchema with a CodeRepositoryUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
CodeRepositoryUpdate
|
The update model. |
required |
Returns:
| Type | Description |
|---|---|
CodeRepositorySchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/code_repository_schemas.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
component_schemas
SQL Model Implementations for Stack Components.
StackComponentSchema
Bases: NamedSchema
SQL Model for stack components.
from_request(request: ComponentRequest, service_connector: Optional[ServiceConnectorSchema] = None) -> StackComponentSchema
classmethod
Create a component schema from a request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ComponentRequest
|
The request from which to create the component. |
required |
service_connector
|
Optional[ServiceConnectorSchema]
|
Optional service connector to link to the component. |
None
|
Returns:
| Type | Description |
|---|---|
StackComponentSchema
|
The component schema. |
Source code in src/zenml/zen_stores/schemas/component_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/component_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ComponentResponse
Creates a ComponentModel from an instance of a StackComponentSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the flavor for the component is missing in the DB. |
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
A |
Source code in src/zenml/zen_stores/schemas/component_schemas.py
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 | |
update(component_update: ComponentUpdate) -> StackComponentSchema
Updates a StackComponentSchema from a ComponentUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_update
|
ComponentUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
StackComponentSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/component_schemas.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 | |
constants
Constant values needed by schema objects.
curated_visualization_schemas
SQLModel implementation of curated visualization tables.
CuratedVisualizationSchema
Bases: BaseSchema
SQL Model for curated visualizations.
from_request(request: CuratedVisualizationRequest) -> CuratedVisualizationSchema
classmethod
Convert a request into a schema instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CuratedVisualizationRequest
|
The request to convert. |
required |
Returns:
| Type | Description |
|---|---|
CuratedVisualizationSchema
|
The created schema. |
Source code in src/zenml/zen_stores/schemas/curated_visualization_schemas.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/curated_visualization_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> CuratedVisualizationResponse
Convert schema into response model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether to include metadata in the response. |
False
|
include_resources
|
bool
|
Whether to include resources in the response. |
False
|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The created response model. |
Source code in src/zenml/zen_stores/schemas/curated_visualization_schemas.py
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 | |
update(update: CuratedVisualizationUpdate) -> CuratedVisualizationSchema
Update a schema instance from an update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
CuratedVisualizationUpdate
|
The update definition. |
required |
Returns:
| Type | Description |
|---|---|
CuratedVisualizationSchema
|
The updated schema. |
Source code in src/zenml/zen_stores/schemas/curated_visualization_schemas.py
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 | |
deployment_schemas
SQLModel implementation of pipeline deployments table.
DeploymentSchema
Bases: NamedSchema
SQL Model for pipeline deployment.
from_request(request: DeploymentRequest) -> DeploymentSchema
classmethod
Convert a DeploymentRequest to a DeploymentSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
DeploymentRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
DeploymentSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/deployment_schemas.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/deployment_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> DeploymentResponse
Convert a DeploymentSchema to a DeploymentResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether to include metadata in the response. |
False
|
include_resources
|
bool
|
Whether to include resources in the response. |
False
|
kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/deployment_schemas.py
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 | |
update(update: DeploymentUpdate) -> DeploymentSchema
Updates a DeploymentSchema from a DeploymentUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
DeploymentUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
DeploymentSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/deployment_schemas.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
device_schemas
SQLModel implementation for authorized OAuth2 devices.
OAuthDeviceSchema
Bases: BaseSchema
SQL Model for authorized OAuth2 devices.
from_request(request: OAuthDeviceInternalRequest) -> Tuple[OAuthDeviceSchema, str, str]
classmethod
Create an authorized device DB entry from a device authorization request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
OAuthDeviceInternalRequest
|
The device authorization request. |
required |
Returns:
| Type | Description |
|---|---|
Tuple[OAuthDeviceSchema, str, str]
|
The created |
Source code in src/zenml/zen_stores/schemas/device_schemas.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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/device_schemas.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 | |
internal_update(device_update: OAuthDeviceInternalUpdate) -> Tuple[OAuthDeviceSchema, Optional[str], Optional[str]]
Update an authorized device from an internal device update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_update
|
OAuthDeviceInternalUpdate
|
The internal device update model. |
required |
Returns:
| Type | Description |
|---|---|
OAuthDeviceSchema
|
The updated |
Optional[str]
|
code, if they were generated. |
Source code in src/zenml/zen_stores/schemas/device_schemas.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 | |
to_internal_model(include_metadata: bool = False, include_resources: bool = False) -> OAuthDeviceInternalResponse
Convert a device schema to an internal device response model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
Returns:
| Type | Description |
|---|---|
OAuthDeviceInternalResponse
|
The converted internal device response model. |
Source code in src/zenml/zen_stores/schemas/device_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> OAuthDeviceResponse
Convert a device schema to a device response model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
OAuthDeviceResponse
|
The converted device response model. |
Source code in src/zenml/zen_stores/schemas/device_schemas.py
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 | |
update(device_update: OAuthDeviceUpdate) -> OAuthDeviceSchema
Update an authorized device from a device update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_update
|
OAuthDeviceUpdate
|
The device update model. |
required |
Returns:
| Type | Description |
|---|---|
OAuthDeviceSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/device_schemas.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
event_source_schemas
SQL Model Implementations for event sources.
EventSourceSchema
Bases: NamedSchema
SQL Model for tag.
from_request(request: EventSourceRequest) -> EventSourceSchema
classmethod
Convert an EventSourceRequest to an EventSourceSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
EventSourceRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
EventSourceSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/event_source_schemas.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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/event_source_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> EventSourceResponse
Convert an EventSourceSchema to an EventSourceResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
include_resources
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/event_source_schemas.py
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 | |
update(update: EventSourceUpdate) -> EventSourceSchema
Updates a EventSourceSchema from a EventSourceUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
EventSourceUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
EventSourceSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/event_source_schemas.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
flavor_schemas
SQL Model Implementations for Flavors.
FlavorSchema
Bases: NamedSchema
SQL Model for flavors.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
The type of the flavor. |
source |
str
|
The source of the flavor. |
config_schema |
str
|
The config schema of the flavor. |
integration |
Optional[str]
|
The integration associated with the flavor. |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/flavor_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> FlavorResponse
Converts a flavor schema to a flavor model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The flavor model. |
Source code in src/zenml/zen_stores/schemas/flavor_schemas.py
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 | |
update(flavor_update: FlavorUpdate) -> FlavorSchema
Update a FlavorSchema from a FlavorUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_update
|
FlavorUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
FlavorSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/flavor_schemas.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 | |
logs_schemas
SQLModel implementation of pipeline logs tables.
LogsSchema
Bases: BaseSchema
SQL Model for logs.
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> LogsResponse
Convert a LogsSchema to a LogsResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
LogsResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/logs_schemas.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 113 114 115 116 117 118 119 | |
model_schemas
SQLModel implementation of model tables.
ModelSchema
Bases: NamedSchema
SQL Model for model.
latest_version: Optional[ModelVersionSchema]
property
Fetch the latest version for this model.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[ModelVersionSchema]
|
The latest version for this model. |
from_request(model_request: ModelRequest) -> ModelSchema
classmethod
Convert an ModelRequest to an ModelSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_request
|
ModelRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
ModelSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/model_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ModelResponse
Convert an ModelSchema to an ModelResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/model_schemas.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 | |
update(model_update: ModelUpdate) -> ModelSchema
Updates a ModelSchema from a ModelUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_update
|
ModelUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
ModelSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | |
ModelVersionArtifactSchema
Bases: BaseSchema
SQL Model for linking of Model Versions and Artifacts M:M.
from_request(model_version_artifact_request: ModelVersionArtifactRequest) -> ModelVersionArtifactSchema
classmethod
Convert an ModelVersionArtifactRequest to a ModelVersionArtifactSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_artifact_request
|
ModelVersionArtifactRequest
|
The request link to convert. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionArtifactSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ModelVersionArtifactResponse
Convert an ModelVersionArtifactSchema to an ModelVersionArtifactResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ModelVersionArtifactResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
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 | |
ModelVersionPipelineRunSchema
Bases: BaseSchema
SQL Model for linking of Model Versions and Pipeline Runs M:M.
from_request(model_version_pipeline_run_request: ModelVersionPipelineRunRequest) -> ModelVersionPipelineRunSchema
classmethod
Convert an ModelVersionPipelineRunRequest to an ModelVersionPipelineRunSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_pipeline_run_request
|
ModelVersionPipelineRunRequest
|
The request link to convert. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionPipelineRunSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ModelVersionPipelineRunResponse
Convert an ModelVersionPipelineRunSchema to an ModelVersionPipelineRunResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ModelVersionPipelineRunResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
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 | |
ModelVersionSchema
Bases: NamedSchema, RunMetadataInterface
SQL Model for model version.
from_request(model_version_request: ModelVersionRequest, model_version_number: int, producer_run_id: Optional[UUID] = None) -> ModelVersionSchema
classmethod
Convert an ModelVersionRequest to an ModelVersionSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_request
|
ModelVersionRequest
|
The request model version to convert. |
required |
model_version_number
|
int
|
The model version number. |
required |
producer_run_id
|
Optional[UUID]
|
The ID of the producer run. |
None
|
Returns:
| Type | Description |
|---|---|
ModelVersionSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ModelVersionResponse
Convert an ModelVersionSchema to an ModelVersionResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
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 | |
update(target_stage: Optional[str] = None, target_name: Optional[str] = None, target_description: Optional[str] = None) -> ModelVersionSchema
Updates a ModelVersionSchema to a target stage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_stage
|
Optional[str]
|
The stage to be updated. |
None
|
target_name
|
Optional[str]
|
The version name to be updated. |
None
|
target_description
|
Optional[str]
|
The version description to be updated. |
None
|
Returns:
| Type | Description |
|---|---|
ModelVersionSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/model_schemas.py
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | |
pipeline_build_schemas
SQLModel implementation of pipeline build tables.
PipelineBuildSchema
Bases: BaseSchema
SQL Model for pipeline builds.
from_request(request: PipelineBuildRequest) -> PipelineBuildSchema
classmethod
Convert a PipelineBuildRequest to a PipelineBuildSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
PipelineBuildRequest
|
The request to convert. |
required |
Returns:
| Type | Description |
|---|---|
PipelineBuildSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/pipeline_build_schemas.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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/pipeline_build_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> PipelineBuildResponse
Convert a PipelineBuildSchema to a PipelineBuildResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
PipelineBuildResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/pipeline_build_schemas.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 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | |
pipeline_run_schemas
SQLModel implementation of pipeline run tables.
PipelineRunSchema
Bases: NamedSchema, RunMetadataInterface
SQL Model for pipeline runs.
fetch_metadata_collection(include_full_metadata: bool = False, **kwargs: Any) -> Dict[str, List[RunMetadataEntry]]
Fetches all the metadata entries related to the pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_full_metadata
|
bool
|
Whether the full metadata will be included. |
False
|
**kwargs
|
Any
|
Keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
Dict[str, List[RunMetadataEntry]]
|
a dictionary, where the key is the key of the metadata entry and the values represent the list of entries with this key. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
from_request(request: PipelineRunRequest) -> PipelineRunSchema
classmethod
Convert a PipelineRunRequest to a PipelineRunSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
PipelineRunRequest
|
The request to convert. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
get_pipeline_configuration() -> PipelineConfiguration
Get the pipeline configuration for the pipeline run.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the pipeline run has no snapshot and no pipeline configuration. |
Returns:
| Type | Description |
|---|---|
PipelineConfiguration
|
The pipeline configuration. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
get_step_configuration(step_name: str) -> Step
Get the step configuration for the pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_name
|
str
|
The name of the step to get the configuration for. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the pipeline run has no snapshot. |
Returns:
| Type | Description |
|---|---|
Step
|
The step configuration. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | |
get_upstream_steps() -> Dict[str, List[str]]
Get the list of all the upstream steps for each step.
Returns:
| Type | Description |
|---|---|
Dict[str, List[str]]
|
The list of upstream steps for each step. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the pipeline run has no snapshot or the snapshot has no pipeline spec. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | |
is_placeholder_run() -> bool
Whether the pipeline run is a placeholder run.
Returns:
| Type | Description |
|---|---|
bool
|
Whether the pipeline run is a placeholder run. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
764 765 766 767 768 769 770 771 772 773 | |
to_model(include_metadata: bool = False, include_resources: bool = False, include_python_packages: bool = False, include_full_metadata: bool = False, **kwargs: Any) -> PipelineRunResponse
Convert a PipelineRunSchema to a PipelineRunResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
include_python_packages
|
bool
|
Whether the python packages will be filled. |
False
|
include_full_metadata
|
bool
|
Whether the full metadata will be included. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The created |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the model creation fails. |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
update(run_update: PipelineRunUpdate) -> PipelineRunSchema
Update a PipelineRunSchema with a PipelineRunUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_update
|
PipelineRunUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
update_placeholder(request: PipelineRunRequest) -> PipelineRunSchema
Update a placeholder run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
PipelineRunRequest
|
The pipeline run request which should replace the placeholder. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the DB entry does not represent a placeholder run. |
ValueError
|
If the run request is not a valid request to replace the placeholder run. |
Returns:
| Type | Description |
|---|---|
PipelineRunSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/pipeline_run_schemas.py
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 | |
pipeline_schemas
SQL Model Implementations for Pipelines and Pipeline Runs.
PipelineSchema
Bases: NamedSchema
SQL Model for pipelines.
latest_run: Optional[PipelineRunSchema]
property
Fetch the latest run for this pipeline.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[PipelineRunSchema]
|
The latest run for this pipeline. |
from_request(pipeline_request: PipelineRequest) -> PipelineSchema
classmethod
Convert a PipelineRequest to a PipelineSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_request
|
PipelineRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/pipeline_schemas.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/pipeline_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> PipelineResponse
Convert a PipelineSchema to a PipelineResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The created PipelineResponse. |
Source code in src/zenml/zen_stores/schemas/pipeline_schemas.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 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 | |
update(pipeline_update: PipelineUpdate) -> PipelineSchema
Update a PipelineSchema with a PipelineUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_update
|
PipelineUpdate
|
The update model. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/pipeline_schemas.py
262 263 264 265 266 267 268 269 270 271 272 273 | |
pipeline_snapshot_schemas
Pipeline snapshot schemas.
PipelineSnapshotSchema
Bases: BaseSchema
SQL Model for pipeline snapshots.
latest_run: Optional[PipelineRunSchema]
property
Fetch the latest run for this snapshot.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[PipelineRunSchema]
|
The latest run for this snapshot. |
from_request(request: PipelineSnapshotRequest, code_reference_id: Optional[UUID]) -> PipelineSnapshotSchema
classmethod
Create schema from request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
PipelineSnapshotRequest
|
The request to convert. |
required |
code_reference_id
|
Optional[UUID]
|
Optional ID of the code reference for the snapshot. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSnapshotSchema
|
The created schema. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.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 | |
get_step_configuration(step_name: str) -> StepConfigurationSchema
Get a step configuration of the snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_name
|
str
|
The name of the step to get the configuration for. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the step configuration is not found. |
Returns:
| Type | Description |
|---|---|
StepConfigurationSchema
|
The step configuration. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | |
get_step_configurations(include: Optional[List[str]] = None) -> List[StepConfigurationSchema]
Get step configurations for the snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[List[str]]
|
List of step names to include. If not given, all step configurations will be included. |
None
|
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
List[StepConfigurationSchema]
|
List of step configurations. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, include_python_packages: bool = False, include_config_schema: Optional[bool] = None, step_configuration_filter: Optional[List[str]] = None, **kwargs: Any) -> PipelineSnapshotResponse
Convert schema to response.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
include_python_packages
|
bool
|
Whether the python packages will be filled. |
False
|
include_config_schema
|
Optional[bool]
|
Whether the config schema will be filled. |
None
|
step_configuration_filter
|
Optional[List[str]]
|
List of step configurations to include in the response. If not given, all step configurations will be included. |
None
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The response. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.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 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 | |
update(update: PipelineSnapshotUpdate) -> PipelineSnapshotSchema
Update the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
PipelineSnapshotUpdate
|
The update to apply. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSnapshotSchema
|
The updated schema. |
Source code in src/zenml/zen_stores/schemas/pipeline_snapshot_schemas.py
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | |
StepConfigurationSchema
project_schemas
SQL Model Implementations for projects.
ProjectSchema
Bases: NamedSchema
SQL Model for projects.
from_request(project: ProjectRequest) -> ProjectSchema
classmethod
Create a ProjectSchema from a ProjectResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
ProjectRequest
|
The |
required |
Returns:
| Type | Description |
|---|---|
ProjectSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/project_schemas.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ProjectResponse
Convert a ProjectSchema to a ProjectResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The converted |
Source code in src/zenml/zen_stores/schemas/project_schemas.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 | |
update(project_update: ProjectUpdate) -> ProjectSchema
Update a ProjectSchema from a ProjectUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_update
|
ProjectUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
ProjectSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/project_schemas.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
run_metadata_schemas
SQLModel implementation of run metadata tables.
RunMetadataResourceSchema
Bases: SQLModel
Table for linking resources to run metadata entries.
RunMetadataSchema
run_template_schemas
SQLModel implementation of run template tables.
RunTemplateSchema
Bases: NamedSchema
SQL Model for run templates.
latest_run: Optional[PipelineRunSchema]
property
Fetch the latest run for this template.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
Optional[PipelineRunSchema]
|
The latest run for this template. |
from_request(request: RunTemplateRequest) -> RunTemplateSchema
classmethod
Create a schema from a request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
RunTemplateRequest
|
The request to convert. |
required |
Returns:
| Type | Description |
|---|---|
RunTemplateSchema
|
The created schema. |
Source code in src/zenml/zen_stores/schemas/run_template_schemas.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/run_template_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> RunTemplateResponse
Convert the schema to a response model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
Model representing this schema. |
Source code in src/zenml/zen_stores/schemas/run_template_schemas.py
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 | |
update(update: RunTemplateUpdate) -> RunTemplateSchema
Update the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
RunTemplateUpdate
|
The update model. |
required |
Returns:
| Type | Description |
|---|---|
RunTemplateSchema
|
The updated schema. |
Source code in src/zenml/zen_stores/schemas/run_template_schemas.py
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | |
schedule_schema
SQL Model Implementations for Pipeline Schedules.
ScheduleSchema
Bases: NamedSchema, RunMetadataInterface
SQL Model for schedules.
from_request(schedule_request: ScheduleRequest) -> ScheduleSchema
classmethod
Create a ScheduleSchema from a ScheduleRequest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_request
|
ScheduleRequest
|
The |
required |
Returns:
| Type | Description |
|---|---|
ScheduleSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/schedule_schema.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/schedule_schema.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ScheduleResponse
Convert a ScheduleSchema to a ScheduleResponseModel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/schedule_schema.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 | |
update(schedule_update: ScheduleUpdate) -> ScheduleSchema
Update a ScheduleSchema from a ScheduleUpdateModel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_update
|
ScheduleUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
ScheduleSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/schedule_schema.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
schema_utils
Utility functions for SQLModel schemas.
build_foreign_key_field(source: str, target: str, source_column: str, target_column: str, ondelete: str, nullable: bool, custom_constraint_name: Optional[str] = None, **sa_column_kwargs: Any) -> Any
Build a SQLModel foreign key field.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Source table name. |
required |
target
|
str
|
Target table name. |
required |
source_column
|
str
|
Source column name. |
required |
target_column
|
str
|
Target column name. |
required |
ondelete
|
str
|
On delete behavior. |
required |
nullable
|
bool
|
Whether the field is nullable. |
required |
custom_constraint_name
|
Optional[str]
|
Custom name for the foreign key constraint. |
None
|
**sa_column_kwargs
|
Any
|
Keyword arguments for the SQLAlchemy column. |
{}
|
Returns:
| Type | Description |
|---|---|
Any
|
SQLModel foreign key field. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the ondelete and nullable arguments are not compatible. |
ValueError
|
If the foreign key constraint name is too long. |
Source code in src/zenml/zen_stores/schemas/schema_utils.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 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 | |
build_index(table_name: str, column_names: List[str], **kwargs: Any) -> Index
Build an index object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table_name
|
str
|
The name of the table for which the index will be created. |
required |
column_names
|
List[str]
|
Names of the columns on which the index will be created. |
required |
**kwargs
|
Any
|
Additional keyword arguments to pass to the Index. |
{}
|
Returns:
| Type | Description |
|---|---|
Index
|
The index. |
Source code in src/zenml/zen_stores/schemas/schema_utils.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
foreign_key_constraint_name(source: str, target: str, source_column: str) -> str
Defines the name of a foreign key constraint.
For simplicity, we use the naming convention used by alembic here: https://alembic.sqlalchemy.org/en/latest/batch.html#dropping-unnamed-or-named-foreign-key-constraints.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Source table name. |
required |
target
|
str
|
Target table name. |
required |
source_column
|
str
|
Source column name. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Name of the foreign key constraint. |
Source code in src/zenml/zen_stores/schemas/schema_utils.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
get_index_name(table_name: str, column_names: List[str]) -> str
Get the name for an index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table_name
|
str
|
The name of the table for which the index will be created. |
required |
column_names
|
List[str]
|
Names of the columns on which the index will be created. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The index name. |
Source code in src/zenml/zen_stores/schemas/schema_utils.py
97 98 99 100 101 102 103 104 105 106 107 108 109 | |
secret_schemas
SQL Model Implementations for Secrets.
SecretDecodeError
Bases: Exception
Raised when a secret cannot be decoded or decrypted.
SecretResourceSchema
SecretSchema
Bases: NamedSchema
SQL Model for secrets.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the secret. |
values |
Optional[bytes]
|
The values of the secret. |
from_request(secret: SecretRequest, internal: bool = False) -> SecretSchema
classmethod
Create a SecretSchema from a SecretRequest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret
|
SecretRequest
|
The |
required |
internal
|
bool
|
Whether the secret is internal. |
False
|
Returns:
| Type | Description |
|---|---|
SecretSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/secret_schemas.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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/secret_schemas.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 | |
get_secret_values(encryption_engine: Optional[AesGcmEngine] = None) -> Dict[str, str]
Get the secret values for this secret.
This method is used by the SQL secrets store to load the secret values from the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encryption_engine
|
Optional[AesGcmEngine]
|
The encryption engine to use to decrypt the secret values. If None, the values will be base64 decoded. |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
The secret values |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
Source code in src/zenml/zen_stores/schemas/secret_schemas.py
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 | |
set_secret_values(secret_values: Dict[str, str], encryption_engine: Optional[AesGcmEngine] = None) -> None
Create a SecretSchema from a SecretRequest.
This method is used by the SQL secrets store to store the secret values in the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_values
|
Dict[str, str]
|
The new secret values. |
required |
encryption_engine
|
Optional[AesGcmEngine]
|
The encryption engine to use to encrypt the secret values. If None, the values will be base64 encoded. |
None
|
Source code in src/zenml/zen_stores/schemas/secret_schemas.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> SecretResponse
Converts a secret schema to a secret model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The secret model. |
Source code in src/zenml/zen_stores/schemas/secret_schemas.py
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 | |
update(secret_update: SecretUpdate) -> SecretSchema
Update a SecretSchema from a SecretUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_update
|
SecretUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
SecretSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/secret_schemas.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | |
server_settings_schemas
SQLModel implementation for the server settings table.
ServerSettingsSchema
Bases: SQLModel
SQL Model for the server settings.
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ServerSettingsResponse
Convert an ServerSettingsSchema to an ServerSettingsResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ServerSettingsResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/server_settings_schemas.py
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 | |
update(settings_update: ServerSettingsUpdate) -> ServerSettingsSchema
Update a ServerSettingsSchema from a ServerSettingsUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings_update
|
ServerSettingsUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
ServerSettingsSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/server_settings_schemas.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
update_onboarding_state(completed_steps: Set[str]) -> ServerSettingsSchema
Update the onboarding state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
completed_steps
|
Set[str]
|
Newly completed onboarding steps. |
required |
Returns:
| Type | Description |
|---|---|
ServerSettingsSchema
|
The updated schema. |
Source code in src/zenml/zen_stores/schemas/server_settings_schemas.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
service_connector_schemas
SQL Model Implementations for Service Connectors.
ServiceConnectorSchema
Bases: NamedSchema
SQL Model for service connectors.
labels_dict: Dict[str, str]
property
Returns the labels as a dictionary.
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
The labels as a dictionary. |
resource_types_list: List[str]
property
Returns the resource types as a list.
Returns:
| Type | Description |
|---|---|
List[str]
|
The resource types as a list. |
from_request(connector_request: ServiceConnectorRequest, secret_id: Optional[UUID] = None) -> ServiceConnectorSchema
classmethod
Create a ServiceConnectorSchema from a ServiceConnectorRequest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connector_request
|
ServiceConnectorRequest
|
The |
required |
secret_id
|
Optional[UUID]
|
The ID of the secret to use for this connector. |
None
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/service_connector_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/service_connector_schemas.py
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 | |
has_labels(labels: Dict[str, Optional[str]]) -> bool
Checks if the connector has the given labels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
Dict[str, Optional[str]]
|
The labels to check for. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
Whether the connector has the given labels. |
Source code in src/zenml/zen_stores/schemas/service_connector_schemas.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ServiceConnectorResponse
Creates a ServiceConnector from a ServiceConnectorSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
A |
Source code in src/zenml/zen_stores/schemas/service_connector_schemas.py
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 | |
update(connector_update: ServiceConnectorUpdate, secret_id: Optional[UUID] = None) -> ServiceConnectorSchema
Updates a ServiceConnectorSchema from a ServiceConnectorUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connector_update
|
ServiceConnectorUpdate
|
The |
required |
secret_id
|
Optional[UUID]
|
The ID of the secret to use for this connector. |
None
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/service_connector_schemas.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 | |
service_schemas
SQLModel implementation of service table.
ServiceSchema
Bases: NamedSchema
SQL Model for service.
from_request(service_request: ServiceRequest) -> ServiceSchema
classmethod
Convert a ServiceRequest to a ServiceSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_request
|
ServiceRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
ServiceSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/service_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/service_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> ServiceResponse
Convert an ServiceSchema to an ServiceResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether to include metadata in the response. |
False
|
include_resources
|
bool
|
Whether to include resources in the response. |
False
|
kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/service_schemas.py
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 | |
update(update: ServiceUpdate) -> ServiceSchema
Updates a ServiceSchema from a ServiceUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
ServiceUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
ServiceSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/service_schemas.py
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 | |
stack_schemas
SQL Model Implementations for Stacks.
StackCompositionSchema
Bases: SQLModel
SQL Model for stack definitions.
Join table between Stacks and StackComponents.
StackSchema
Bases: NamedSchema
SQL Model for stacks.
has_deployer: bool
property
If the stack has a deployer component.
Returns:
| Type | Description |
|---|---|
bool
|
If the stack has a deployer component. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the stack has no DB session. |
from_request(request: StackRequest, components: Sequence[StackComponentSchema]) -> StackSchema
classmethod
Create a stack schema from a request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
StackRequest
|
The request from which to create the stack. |
required |
components
|
Sequence[StackComponentSchema]
|
List of components to link to the stack. |
required |
Returns:
| Type | Description |
|---|---|
StackSchema
|
The stack schema. |
Source code in src/zenml/zen_stores/schemas/stack_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/stack_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> StackResponse
Converts the schema to a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
StackResponse
|
The converted model. |
Source code in src/zenml/zen_stores/schemas/stack_schemas.py
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 | |
update(stack_update: StackUpdate, components: List[StackComponentSchema]) -> StackSchema
Updates a stack schema with a stack update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_update
|
StackUpdate
|
|
required |
components
|
List[StackComponentSchema]
|
List of |
required |
Returns:
| Type | Description |
|---|---|
StackSchema
|
The updated StackSchema. |
Source code in src/zenml/zen_stores/schemas/stack_schemas.py
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 | |
step_run_schemas
SQLModel implementation of step run tables.
StepRunInputArtifactSchema
Bases: SQLModel
SQL Model that defines which artifacts are inputs to which step.
StepRunOutputArtifactSchema
Bases: SQLModel
SQL Model that defines which artifacts are outputs of which step.
StepRunParentsSchema
Bases: SQLModel
SQL Model that defines the order of steps.
StepRunSchema
Bases: NamedSchema, RunMetadataInterface
SQL Model for steps of pipeline runs.
from_request(request: StepRunRequest, snapshot_id: Optional[UUID], version: int, is_retriable: bool) -> StepRunSchema
classmethod
Create a step run schema from a step run request model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
StepRunRequest
|
The step run request model. |
required |
snapshot_id
|
Optional[UUID]
|
The snapshot ID. |
required |
version
|
int
|
The version of the step run. |
required |
is_retriable
|
bool
|
Whether the step run is retriable. |
required |
Returns:
| Type | Description |
|---|---|
StepRunSchema
|
The step run schema. |
Source code in src/zenml/zen_stores/schemas/step_run_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/step_run_schemas.py
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 | |
get_step_configuration() -> Step
Get the step configuration for the step run.
Raises:
| Type | Description |
|---|---|
ValueError
|
If the step run has no step configuration. |
Returns:
| Type | Description |
|---|---|
Step
|
The step configuration. |
Source code in src/zenml/zen_stores/schemas/step_run_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> StepRunResponse
Convert a StepRunSchema to a StepRunResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The created StepRunResponse. |
Source code in src/zenml/zen_stores/schemas/step_run_schemas.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 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 | |
update(step_update: StepRunUpdate) -> StepRunSchema
Update a step run schema with a step run update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_update
|
StepRunUpdate
|
The step run update model. |
required |
Returns:
| Type | Description |
|---|---|
StepRunSchema
|
The updated step run schema. |
Source code in src/zenml/zen_stores/schemas/step_run_schemas.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 | |
tag_schemas
SQLModel implementation of tag tables.
TagResourceSchema
Bases: BaseSchema
SQL Model for tag resource relationship.
from_request(request: TagResourceRequest) -> TagResourceSchema
classmethod
Convert an TagResourceRequest to an TagResourceSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TagResourceRequest
|
The request model version to convert. |
required |
Returns:
| Type | Description |
|---|---|
TagResourceSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/tag_schemas.py
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> TagResourceResponse
Convert an TagResourceSchema to an TagResourceResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
TagResourceResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/tag_schemas.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 | |
TagSchema
Bases: NamedSchema
SQL Model for tag.
tagged_count: int
property
Fetch the number of resources tagged with this tag.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no session for the schema exists. |
Returns:
| Type | Description |
|---|---|
int
|
The number of resources tagged with this tag. |
from_request(request: TagRequest) -> TagSchema
classmethod
Convert an TagRequest to an TagSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TagRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
TagSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/tag_schemas.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/tag_schemas.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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> TagResponse
Convert an TagSchema to an TagResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
TagResponse
|
The created |
Source code in src/zenml/zen_stores/schemas/tag_schemas.py
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 | |
update(update: TagUpdate) -> TagSchema
Updates a TagSchema from a TagUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
TagUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
TagSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/tag_schemas.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | |
trigger_schemas
SQL Model Implementations for Triggers.
TriggerExecutionSchema
Bases: BaseSchema
SQL Model for trigger executions.
from_request(request: TriggerExecutionRequest) -> TriggerExecutionSchema
classmethod
Convert a TriggerExecutionRequest to a TriggerExecutionSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TriggerExecutionRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
TriggerExecutionSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> TriggerExecutionResponse
Converts the schema to a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
TriggerExecutionResponse
|
The converted model. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
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 | |
TriggerSchema
Bases: NamedSchema
SQL Model for triggers.
from_request(request: TriggerRequest) -> TriggerSchema
classmethod
Convert a TriggerRequest to a TriggerSchema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TriggerRequest
|
The request model to convert. |
required |
Returns:
| Type | Description |
|---|---|
TriggerSchema
|
The converted schema. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
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 | |
get_query_options(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> Sequence[ExecutableOption]
classmethod
Get the query options for the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether metadata will be included when converting the schema to a model. |
False
|
include_resources
|
bool
|
Whether resources will be included when converting the schema to a model. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
Sequence[ExecutableOption]
|
A list of query options. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, **kwargs: Any) -> TriggerResponse
Converts the schema to a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
include_resources
|
bool
|
Flag deciding whether to include the output model(s) metadata fields in the response. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The converted model. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
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 | |
update(trigger_update: TriggerUpdate) -> TriggerSchema
Updates a trigger schema with a trigger update model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_update
|
TriggerUpdate
|
|
required |
Returns:
| Type | Description |
|---|---|
TriggerSchema
|
The updated TriggerSchema. |
Source code in src/zenml/zen_stores/schemas/trigger_schemas.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
user_schemas
SQLModel implementation of user tables.
UserSchema
Bases: NamedSchema
SQL Model for users.
from_service_account_request(model: Union[ServiceAccountRequest, ServiceAccountInternalRequest]) -> UserSchema
classmethod
Create a UserSchema from a Service Account request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Union[ServiceAccountRequest, ServiceAccountInternalRequest]
|
The |
required |
Returns:
| Type | Description |
|---|---|
UserSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/user_schemas.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 | |
from_user_request(model: UserRequest) -> UserSchema
classmethod
Create a UserSchema from a UserRequest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
UserRequest
|
The |
required |
Returns:
| Type | Description |
|---|---|
UserSchema
|
The created |
Source code in src/zenml/zen_stores/schemas/user_schemas.py
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 | |
to_model(include_metadata: bool = False, include_resources: bool = False, include_private: bool = False, **kwargs: Any) -> UserResponse
Convert a UserSchema to a UserResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
**kwargs
|
Any
|
Keyword arguments to allow schema specific logic |
{}
|
include_private
|
bool
|
Whether to include the user private information this is to limit the amount of data one can get about other users. |
False
|
Returns:
| Type | Description |
|---|---|
UserResponse
|
The converted |
Source code in src/zenml/zen_stores/schemas/user_schemas.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 | |
to_service_account_model(include_metadata: bool = False, include_resources: bool = False) -> ServiceAccountResponse
Convert a UserSchema to a ServiceAccountResponse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_metadata
|
bool
|
Whether the metadata will be filled. |
False
|
include_resources
|
bool
|
Whether the resources will be filled. |
False
|
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The converted |
Source code in src/zenml/zen_stores/schemas/user_schemas.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 | |
update_service_account(service_account_update: ServiceAccountUpdate) -> UserSchema
Update a UserSchema from a ServiceAccountUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_update
|
ServiceAccountUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
UserSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/user_schemas.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
update_user(user_update: UserUpdate) -> UserSchema
Update a UserSchema from a UserUpdate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_update
|
UserUpdate
|
The |
required |
Returns:
| Type | Description |
|---|---|
UserSchema
|
The updated |
Source code in src/zenml/zen_stores/schemas/user_schemas.py
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 | |
utils
Utils for schemas.
RunMetadataInterface
The interface for entities with run metadata.
fetch_metadata(**kwargs: Any) -> Dict[str, MetadataType]
Fetches the latest metadata entry related to the entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to pass to the metadata collection. |
{}
|
Returns:
| Type | Description |
|---|---|
Dict[str, MetadataType]
|
A dictionary, where the key is the key of the metadata entry and the values represent the latest entry with this key. |
Source code in src/zenml/zen_stores/schemas/utils.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
fetch_metadata_collection(**kwargs: Any) -> Dict[str, List[RunMetadataEntry]]
Fetches all the metadata entries related to the entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Any
|
Keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
Dict[str, List[RunMetadataEntry]]
|
A dictionary, where the key is the key of the metadata entry and the values represent the list of entries with this key. |
Source code in src/zenml/zen_stores/schemas/utils.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 | |
get_page_from_list(items_list: List[S], response_model: Type[BaseResponse], size: int = 5, page: int = 1, include_resources: bool = False, include_metadata: bool = False) -> Page[BaseResponse]
Converts list of schemas into page of response models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
items_list
|
List[S]
|
List of schemas |
required |
response_model
|
Type[BaseResponse]
|
Response model |
required |
size
|
int
|
Page size |
5
|
page
|
int
|
Page number |
1
|
include_metadata
|
bool
|
Whether metadata should be included in response models |
False
|
include_resources
|
bool
|
Whether resources should be included in response models |
False
|
Returns:
| Type | Description |
|---|---|
Page[BaseResponse]
|
A page of list items. |
Source code in src/zenml/zen_stores/schemas/utils.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 | |
get_resource_type_name(schema_class: Type[BaseSchema]) -> str
Get the name of a resource from a schema class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema_class
|
Type[BaseSchema]
|
The schema class to get the name of. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The name of the resource. |
Source code in src/zenml/zen_stores/schemas/utils.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
jl_arg(column: Any) -> InstrumentedAttribute[Any]
Cast a SQLModel column to a joinedload argument.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
column
|
Any
|
The column. |
required |
Returns:
| Type | Description |
|---|---|
InstrumentedAttribute[Any]
|
The column cast to a joinedload argument. |
Source code in src/zenml/zen_stores/schemas/utils.py
30 31 32 33 34 35 36 37 38 39 | |
secrets_stores
Centralized secrets management.
Modules
aws_secrets_store
AWS Secrets Store implementation.
AWSSecretsStore(zen_store: BaseZenStore, **kwargs: Any)
Bases: ServiceConnectorSecretsStore
Secrets store implementation that uses the AWS Secrets Manager API.
This secrets store implementation uses the AWS Secrets Manager API to store secrets. It allows a single AWS Secrets Manager region "instance" to be shared with other ZenML deployments as well as other third party users and applications.
Here are some implementation highlights:
-
the name/ID of an AWS secret is derived from the ZenML secret UUID and a
zenmlprefix in the formzenml/{zenml_secret_uuid}. This clearly identifies a secret as being managed by ZenML in the AWS console. -
the Secrets Store also uses AWS secret tags to store additional metadata associated with a ZenML secret. The
zenmltag in particular is used to identify and group all secrets that belong to the same ZenML deployment. -
all secret key-values configured in a ZenML secret are stored as a single JSON string value in the AWS secret value.
Source code in src/zenml/zen_stores/secrets_stores/base_secrets_store.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 | |
delete_secret_values(secret_id: UUID) -> None
Deletes secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
RuntimeError
|
If the AWS Secrets Manager API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/aws_secrets_store.py
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 | |
get_secret_values(secret_id: UUID) -> Dict[str, str]
Get the secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
The secret values. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
RuntimeError
|
If the AWS Secrets Manager API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/aws_secrets_store.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 321 322 323 324 325 326 | |
store_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
Store secret values for a new secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
secret_values
|
Dict[str, str]
|
Values for the secret. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the AWS Secrets Manager API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/aws_secrets_store.py
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 | |
update_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
Updates secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to be updated. |
required |
secret_values
|
Dict[str, str]
|
The new secret values. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
RuntimeError
|
If the AWS Secrets Manager API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/aws_secrets_store.py
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 | |
AWSSecretsStoreConfiguration
Bases: ServiceConnectorSecretsStoreConfiguration
AWS secrets store configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
SecretsStoreType
|
The type of the store. |
region: str
property
The AWS region to use.
Returns:
| Type | Description |
|---|---|
str
|
The AWS region to use. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the region is not configured. |
populate_config(data: Dict[str, Any]) -> Dict[str, Any]
classmethod
Populate the connector configuration from legacy attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dict[str, Any]
|
Dict representing user-specified runtime settings. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Validated settings. |
Source code in src/zenml/zen_stores/secrets_stores/aws_secrets_store.py
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 | |
azure_secrets_store
Azure Secrets Store implementation.
AzureSecretsStore(zen_store: BaseZenStore, **kwargs: Any)
Bases: ServiceConnectorSecretsStore
Secrets store implementation that uses the Azure Key Vault API.
This secrets store implementation uses the Azure Key Vault API to store secrets. It allows a single Azure Key Vault to be shared with other ZenML deployments as well as other third party users and applications.
Here are some implementation highlights:
-
the name/ID of an Azure secret is derived from the ZenML secret UUID and a
zenmlprefix in the formzenml-{zenml_secret_uuid}. This clearly identifies a secret as being managed by ZenML in the Azure console. -
the Secrets Store also uses Azure Key Vault secret tags to store metadata associated with a ZenML secret. The
zenmltag in particular is used to identify and group all secrets that belong to the same ZenML deployment. -
all secret key-values configured in a ZenML secret are stored as a single JSON string value in the Azure Key Vault secret value.
Source code in src/zenml/zen_stores/secrets_stores/base_secrets_store.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 | |
client: SecretClient
property
Initialize and return the Azure Key Vault client.
Returns:
| Type | Description |
|---|---|
SecretClient
|
The Azure Key Vault client. |
delete_secret_values(secret_id: UUID) -> None
Deletes secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
RuntimeError
|
if the Azure Key Vault API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/azure_secrets_store.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 | |
get_secret_values(secret_id: UUID) -> Dict[str, str]
Get the secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
The secret values. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
RuntimeError
|
if the Azure Key Vault API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/azure_secrets_store.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 | |
store_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
Store secret values for a new secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
secret_values
|
Dict[str, str]
|
Values for the secret. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the Azure Key Vault API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/azure_secrets_store.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 | |
update_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
Updates secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to be updated. |
required |
secret_values
|
Dict[str, str]
|
The new secret values. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the Azure Key Vault API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/azure_secrets_store.py
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 | |
AzureSecretsStoreConfiguration
Bases: ServiceConnectorSecretsStoreConfiguration
Azure secrets store configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
SecretsStoreType
|
The type of the store. |
key_vault_name |
str
|
Name of the Azure Key Vault that this secrets store will use to store secrets. |
populate_config(data: Dict[str, Any]) -> Dict[str, Any]
classmethod
Populate the connector configuration from legacy attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dict[str, Any]
|
Dict representing user-specified runtime settings. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Validated settings. |
Source code in src/zenml/zen_stores/secrets_stores/azure_secrets_store.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 | |
base_secrets_store
Base Secrets Store implementation.
BaseSecretsStore(zen_store: BaseZenStore, **kwargs: Any)
Bases: BaseModel, SecretsStoreInterface, ABC
Base class for accessing and persisting ZenML secret values.
Attributes:
| Name | Type | Description |
|---|---|---|
config |
SecretsStoreConfiguration
|
The configuration of the secret store. |
_zen_store |
Optional[BaseZenStore]
|
The ZenML store that owns this secrets store. |
Create and initialize a secrets store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
zen_store
|
BaseZenStore
|
The ZenML store that owns this secrets store. |
required |
**kwargs
|
Any
|
Additional keyword arguments to pass to the Pydantic constructor. |
{}
|
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the store cannot be initialized. |
Source code in src/zenml/zen_stores/secrets_stores/base_secrets_store.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 | |
type: SecretsStoreType
property
The type of the secrets store.
Returns:
| Type | Description |
|---|---|
SecretsStoreType
|
The type of the secrets store. |
zen_store: BaseZenStore
property
The ZenML store that owns this secrets store.
Returns:
| Type | Description |
|---|---|
BaseZenStore
|
The ZenML store that owns this secrets store. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the store is not initialized. |
convert_config(data: Dict[str, Any]) -> Dict[str, Any]
classmethod
Method to infer the correct type of the config and convert.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dict[str, Any]
|
The provided configuration object, can potentially be a generic object |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the provided config object's type does not match any of the current implementations. |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The converted configuration object. |
Source code in src/zenml/zen_stores/secrets_stores/base_secrets_store.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 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 | |
create_store(config: SecretsStoreConfiguration, **kwargs: Any) -> BaseSecretsStore
staticmethod
Create and initialize a secrets store from a secrets store configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
SecretsStoreConfiguration
|
The secrets store configuration to use. |
required |
**kwargs
|
Any
|
Additional keyword arguments to pass to the store class |
{}
|
Returns:
| Type | Description |
|---|---|
BaseSecretsStore
|
The initialized secrets store. |
Source code in src/zenml/zen_stores/secrets_stores/base_secrets_store.py
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |
get_store_class(store_config: SecretsStoreConfiguration) -> Type[BaseSecretsStore]
staticmethod
Returns the class of the given secrets store type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
store_config
|
SecretsStoreConfiguration
|
The configuration of the secrets store. |
required |
Returns:
| Type | Description |
|---|---|
Type[BaseSecretsStore]
|
The class corresponding to the configured secrets store or None if |
Type[BaseSecretsStore]
|
the type is unknown. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If the secrets store type is unsupported. |
Source code in src/zenml/zen_stores/secrets_stores/base_secrets_store.py
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 | |
gcp_secrets_store
Implementation of the GCP Secrets Store.
GCPSecretsStore(zen_store: BaseZenStore, **kwargs: Any)
Bases: ServiceConnectorSecretsStore
Secrets store implementation that uses the GCP Secrets Manager API.
Source code in src/zenml/zen_stores/secrets_stores/base_secrets_store.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 | |
client: SecretManagerServiceClient
property
Initialize and return the GCP Secrets Manager client.
Returns:
| Type | Description |
|---|---|
SecretManagerServiceClient
|
The GCP Secrets Manager client instance. |
parent_name: str
property
Construct the GCP parent path to the secret manager.
Returns:
| Type | Description |
|---|---|
str
|
The parent path to the secret manager |
delete_secret_values(secret_id: UUID) -> None
Deletes secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
RuntimeError
|
if the GCP Secrets Manager API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/gcp_secrets_store.py
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 | |
get_secret_values(secret_id: UUID) -> Dict[str, str]
Get the secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
The secret values. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
RuntimeError
|
if the GCP Secrets Manager API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/gcp_secrets_store.py
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 | |
store_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
Store secret values for a new secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
secret_values
|
Dict[str, str]
|
Values for the secret. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the GCP Secrets Manager API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/gcp_secrets_store.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 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
update_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
Updates secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to be updated. |
required |
secret_values
|
Dict[str, str]
|
The new secret values. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the GCP Secrets Manager API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/gcp_secrets_store.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 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | |
GCPSecretsStoreConfiguration
Bases: ServiceConnectorSecretsStoreConfiguration
GCP secrets store configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
SecretsStoreType
|
The type of the store. |
project_id: str
property
Get the GCP project ID.
Returns:
| Type | Description |
|---|---|
str
|
The GCP project ID. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the project ID is not set. |
populate_config(data: Dict[str, Any]) -> Dict[str, Any]
classmethod
Populate the connector configuration from legacy attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dict[str, Any]
|
Dict representing user-specified runtime settings. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Validated settings. |
Source code in src/zenml/zen_stores/secrets_stores/gcp_secrets_store.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 | |
hashicorp_secrets_store
HashiCorp Vault Secrets Store implementation.
HashiCorpVaultSecretsStore(zen_store: BaseZenStore, **kwargs: Any)
Bases: BaseSecretsStore
Secrets store implementation that uses the HashiCorp Vault API.
This secrets store implementation uses the HashiCorp Vault API to store secrets. It allows a single HashiCorp Vault server to be shared with other ZenML deployments as well as other third party users and applications.
Here are some implementation highlights:
-
the name/ID of an HashiCorp Vault secret is derived from the ZenML secret UUID and a
zenmlprefix in the formzenml/{zenml_secret_uuid}. This clearly identifies a secret as being managed by ZenML in the HashiCorp Vault server. -
given that HashiCorp Vault secrets do not support attaching arbitrary metadata in the form of label or tags, we store the entire ZenML secret metadata alongside the secret values in the HashiCorp Vault secret value.
Attributes:
| Name | Type | Description |
|---|---|---|
config |
HashiCorpVaultSecretsStoreConfiguration
|
The configuration of the HashiCorp Vault secrets store. |
TYPE |
SecretsStoreType
|
The type of the store. |
CONFIG_TYPE |
Type[SecretsStoreConfiguration]
|
The type of the store configuration. |
Source code in src/zenml/zen_stores/secrets_stores/base_secrets_store.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 | |
client: hvac.Client
property
Initialize and return the HashiCorp Vault client.
Returns:
| Type | Description |
|---|---|
Client
|
The HashiCorp Vault client. |
delete_secret_values(secret_id: UUID) -> None
Deletes secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
RuntimeError
|
If the HashiCorp Vault API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/hashicorp_secrets_store.py
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 | |
get_secret_values(secret_id: UUID) -> Dict[str, str]
Get the secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
The secret values. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
RuntimeError
|
If the HashiCorp Vault API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/hashicorp_secrets_store.py
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 | |
store_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
Store secret values for a new secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
secret_values
|
Dict[str, str]
|
Values for the secret. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the HashiCorp Vault API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/hashicorp_secrets_store.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 | |
update_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
Updates secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to be updated. |
required |
secret_values
|
Dict[str, str]
|
The new secret values. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
RuntimeError
|
If the HashiCorp Vault API returns an unexpected error. |
Source code in src/zenml/zen_stores/secrets_stores/hashicorp_secrets_store.py
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 | |
HashiCorpVaultSecretsStoreConfiguration
Bases: SecretsStoreConfiguration
HashiCorp Vault secrets store configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
SecretsStoreType
|
The type of the store. |
vault_addr |
str
|
The url of the Vault server. If not set, the value will be loaded from the VAULT_ADDR environment variable, if configured. |
vault_token |
Optional[PlainSerializedSecretStr]
|
The token used to authenticate with the Vault server. If not set, the token will be loaded from the VAULT_TOKEN environment variable or from the ~/.vault-token file, if configured. |
vault_namespace |
Optional[str]
|
The Vault Enterprise namespace. |
mount_point |
Optional[str]
|
The mount point to use for all secrets. |
max_versions |
int
|
The maximum number of secret versions to keep. |
secrets_store_interface
ZenML secrets store interface.
SecretsStoreInterface
Bases: ABC
ZenML secrets store interface.
All ZenML secrets stores must implement the methods in this interface.
delete_secret_values(secret_id: UUID) -> None
abstractmethod
Deletes secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
Source code in src/zenml/zen_stores/secrets_stores/secrets_store_interface.py
88 89 90 91 92 93 94 95 96 97 98 | |
get_secret_values(secret_id: UUID) -> Dict[str, str]
abstractmethod
Get the secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
The secret values. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
Source code in src/zenml/zen_stores/secrets_stores/secrets_store_interface.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
store_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
abstractmethod
Store secret values for a new secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
secret_values
|
Dict[str, str]
|
Values for the secret. |
required |
Source code in src/zenml/zen_stores/secrets_stores/secrets_store_interface.py
43 44 45 46 47 48 49 50 51 52 53 54 | |
update_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
abstractmethod
Updates secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to be updated. |
required |
secret_values
|
Dict[str, str]
|
The new secret values. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
Source code in src/zenml/zen_stores/secrets_stores/secrets_store_interface.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
service_connector_secrets_store
Base secrets store class used for all secrets stores that use a service connector.
ServiceConnectorSecretsStore(zen_store: BaseZenStore, **kwargs: Any)
Bases: BaseSecretsStore
Base secrets store class for service connector-based secrets stores.
All secrets store implementations that use a Service Connector to authenticate and connect to the secrets store back-end should inherit from this class and:
- implement the
_initialize_client_from_connectormethod - use a configuration class that inherits from
ServiceConnectorSecretsStoreConfiguration - set the
SERVICE_CONNECTOR_TYPEto the service connector type used to connect to the secrets store back-end - set the
SERVICE_CONNECTOR_RESOURCE_TYPEto the resource type used to connect to the secrets store back-end
Source code in src/zenml/zen_stores/secrets_stores/base_secrets_store.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 | |
client: Any
property
Get the secrets store API client.
Returns:
| Type | Description |
|---|---|
Any
|
The secrets store API client instance. |
lock: Lock
property
Get the lock used to treat the client initialization as a critical section.
Returns:
| Type | Description |
|---|---|
Lock
|
The lock instance. |
ServiceConnectorSecretsStoreConfiguration
Bases: SecretsStoreConfiguration
Base configuration for secrets stores that use a service connector.
Attributes:
| Name | Type | Description |
|---|---|---|
auth_method |
str
|
The service connector authentication method to use. |
auth_config |
Dict[str, Any]
|
The service connector authentication configuration. |
validate_auth_config(data: Dict[str, Any]) -> Dict[str, Any]
classmethod
Convert the authentication configuration if given in JSON format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dict[str, Any]
|
The configuration values. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The validated configuration values. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the authentication configuration is not a valid JSON object. |
Source code in src/zenml/zen_stores/secrets_stores/service_connector_secrets_store.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 | |
sql_secrets_store
SQL Secrets Store implementation.
SqlSecretsStore(zen_store: BaseZenStore, **kwargs: Any)
Bases: BaseSecretsStore
Secrets store implementation that uses the SQL ZenML store as a backend.
This secrets store piggybacks on the SQL ZenML store. It uses the same database and configuration as the SQL ZenML store.
Attributes:
| Name | Type | Description |
|---|---|---|
config |
SqlSecretsStoreConfiguration
|
The configuration of the SQL secrets store. |
TYPE |
SecretsStoreType
|
The type of the store. |
CONFIG_TYPE |
Type[SecretsStoreConfiguration]
|
The type of the store configuration. |
Create and initialize the SQL secrets store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
zen_store
|
BaseZenStore
|
The ZenML store that owns this SQL secrets store. |
required |
**kwargs
|
Any
|
Additional keyword arguments to pass to the Pydantic constructor. |
{}
|
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the ZenML store to which this secrets store belongs is not a SQL ZenML store. |
Source code in src/zenml/zen_stores/secrets_stores/sql_secrets_store.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
engine: Engine
property
The SQLAlchemy engine.
Returns:
| Type | Description |
|---|---|
Engine
|
The SQLAlchemy engine. |
zen_store: SqlZenStore
property
The ZenML store that this SQL secrets store is using as a back-end.
Returns:
| Type | Description |
|---|---|
SqlZenStore
|
The ZenML store that this SQL secrets store is using as a back-end. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the store is not initialized. |
delete_secret_values(secret_id: UUID) -> None
Deletes secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
Source code in src/zenml/zen_stores/secrets_stores/sql_secrets_store.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
get_secret_values(secret_id: UUID) -> Dict[str, str]
Get the secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
The secret values. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if no secret values for the given ID are stored in the secrets store. |
Source code in src/zenml/zen_stores/secrets_stores/sql_secrets_store.py
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 | |
store_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
Store secret values for a new secret.
The secret is already created in the database by the SQL Zen store, this method only stores the secret values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
secret_values
|
Dict[str, str]
|
Values for the secret. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if a secret for the given ID is not found. |
Source code in src/zenml/zen_stores/secrets_stores/sql_secrets_store.py
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 | |
update_secret_values(secret_id: UUID, secret_values: Dict[str, str]) -> None
Updates secret values for an existing secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to be updated. |
required |
secret_values
|
Dict[str, str]
|
The new secret values. |
required |
Source code in src/zenml/zen_stores/secrets_stores/sql_secrets_store.py
246 247 248 249 250 251 252 253 254 255 256 257 | |
SqlSecretsStoreConfiguration
Bases: SecretsStoreConfiguration
SQL secrets store configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
SecretsStoreType
|
The type of the store. |
encryption_key |
Optional[PlainSerializedSecretStr]
|
The encryption key to use for the SQL secrets store. If not set, the passwords will not be encrypted in the database. |
sql_zen_store
SQL Zen Store implementation.
Classes
SQLDatabaseDriver
Session
Bases: Session
Session subclass that automatically tracks duration and calling context.
SqlZenStore(skip_default_registrations: bool = False, **kwargs: Any)
Bases: BaseZenStore
Store Implementation that uses SQL database backend.
Attributes:
| Name | Type | Description |
|---|---|---|
config |
SqlZenStoreConfiguration
|
The configuration of the SQL ZenML store. |
skip_migrations |
bool
|
Whether to skip migrations when initializing the store. |
TYPE |
StoreType
|
The type of the store. |
CONFIG_TYPE |
Type[StoreConfiguration]
|
The type of the store configuration. |
_engine |
Optional[Engine]
|
The SQLAlchemy engine. |
Source code in src/zenml/zen_stores/base_zen_store.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
alembic: Alembic
property
The Alembic wrapper.
Returns:
| Type | Description |
|---|---|
Alembic
|
The Alembic wrapper. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the store is not initialized. |
backup_secrets_store: Optional[BaseSecretsStore]
property
The backup secrets store associated with this store.
Returns:
| Type | Description |
|---|---|
Optional[BaseSecretsStore]
|
The backup secrets store associated with this store. |
engine: Engine
property
The SQLAlchemy engine.
Returns:
| Type | Description |
|---|---|
Engine
|
The SQLAlchemy engine. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the store is not initialized. |
migration_utils: MigrationUtils
property
The migration utils.
Returns:
| Type | Description |
|---|---|
MigrationUtils
|
The migration utils. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the store is not initialized. |
secrets_store: BaseSecretsStore
property
The secrets store associated with this store.
Returns:
| Type | Description |
|---|---|
BaseSecretsStore
|
The secrets store associated with this store. |
Raises:
| Type | Description |
|---|---|
SecretsStoreNotConfiguredError
|
If no secrets store is configured. |
activate_server(request: ServerActivationRequest) -> Optional[UserResponse]
Activate the server and optionally create the default admin user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ServerActivationRequest
|
The server activation request. |
required |
Returns:
| Type | Description |
|---|---|
Optional[UserResponse]
|
The default admin user that was created, if any. |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the server is already active. |
Source code in src/zenml/zen_stores/sql_zen_store.py
1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 | |
backup_database(strategy: Optional[DatabaseBackupStrategy] = None, location: Optional[str] = None, overwrite: bool = False) -> Tuple[str, Any]
Backup the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
strategy
|
Optional[DatabaseBackupStrategy]
|
Custom backup strategy to use. If not set, the backup strategy from the store configuration will be used. |
None
|
location
|
Optional[str]
|
Custom target location to backup the database to. If not set, the configured backup location will be used. Depending on the backup strategy, this can be a file path or a database name. |
None
|
overwrite
|
bool
|
Whether to overwrite an existing backup if it exists. If set to False, the existing backup will be reused. |
False
|
Returns:
| Type | Description |
|---|---|
str
|
The location where the database was backed up to and an accompanying |
Any
|
user-friendly message that describes the backup location, or None |
Tuple[str, Any]
|
if no backup was created (i.e. because the backup already exists). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the backup database name is not set when the backup database is requested or if the backup strategy is invalid. |
Source code in src/zenml/zen_stores/sql_zen_store.py
1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 | |
backup_secrets(ignore_errors: bool = True, delete_secrets: bool = False) -> None
Backs up all secrets to the configured backup secrets store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ignore_errors
|
bool
|
Whether to ignore individual errors during the backup process and attempt to backup all secrets. |
True
|
delete_secrets
|
bool
|
Whether to delete the secrets that have been successfully backed up from the primary secrets store. Setting this flag effectively moves all secrets from the primary secrets store to the backup secrets store. |
False
|
noqa: DAR401
Raises: BackupSecretsStoreNotConfiguredError: if no backup secrets store is configured.
Source code in src/zenml/zen_stores/sql_zen_store.py
8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 | |
batch_create_artifact_versions(artifact_versions: List[ArtifactVersionRequest]) -> List[ArtifactVersionResponse]
Creates a batch of artifact versions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_versions
|
List[ArtifactVersionRequest]
|
The artifact versions to create. |
required |
Returns:
| Type | Description |
|---|---|
List[ArtifactVersionResponse]
|
The created artifact versions. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 | |
batch_create_tag_resource(tag_resources: List[TagResourceRequest]) -> List[TagResourceResponse]
Create a batch of tag resource relationships.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resources
|
List[TagResourceRequest]
|
The tag resource relationships to be created. |
required |
Returns:
| Type | Description |
|---|---|
List[TagResourceResponse]
|
The newly created tag resource relationships. |
Source code in src/zenml/zen_stores/sql_zen_store.py
14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 | |
batch_delete_tag_resource(tag_resources: List[TagResourceRequest]) -> None
Delete a batch of tag resource relationships.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resources
|
List[TagResourceRequest]
|
The tag resource relationships to be deleted. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 | |
cleanup_database_backup(strategy: Optional[DatabaseBackupStrategy] = None, location: Optional[Any] = None) -> None
Delete the database backup.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
strategy
|
Optional[DatabaseBackupStrategy]
|
Custom backup strategy to use. If not set, the backup strategy from the store configuration will be used. |
None
|
location
|
Optional[Any]
|
Custom target location to delete the database backup from. If not set, the configured backup location will be used. Depending on the backup strategy, this can be a file path or a database name. |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If the backup database name is not set when the backup database is requested. |
Source code in src/zenml/zen_stores/sql_zen_store.py
1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 | |
count_pipelines(filter_model: PipelineFilter) -> int
Count all pipelines.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
PipelineFilter
|
The filter model to use for counting pipelines. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The number of pipelines. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 | |
count_projects(filter_model: Optional[ProjectFilter] = None) -> int
Count all projects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
Optional[ProjectFilter]
|
The filter model to use for counting projects. |
None
|
Returns:
| Type | Description |
|---|---|
int
|
The number of projects. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 | |
count_runs(filter_model: PipelineRunFilter) -> int
Count all pipeline runs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
PipelineRunFilter
|
The filter model to filter the runs. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The number of pipeline runs. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 | |
count_stack_components(filter_model: Optional[ComponentFilter] = None) -> int
Count all components.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
Optional[ComponentFilter]
|
The filter model to use for counting components. |
None
|
Returns:
| Type | Description |
|---|---|
int
|
The number of components. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 | |
count_stacks(filter_model: Optional[StackFilter]) -> int
Count all stacks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
Optional[StackFilter]
|
The filter model to filter the stacks. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The number of stacks. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 | |
create_action(action: ActionRequest) -> ActionResponse
Create an action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
ActionRequest
|
The action to create. |
required |
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The created action. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 | |
create_api_key(service_account_id: UUID, api_key: APIKeyRequest) -> APIKeyResponse
Create a new API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to create the API key. |
required |
api_key
|
APIKeyRequest
|
The API key to create. |
required |
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The created API key. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If an API key with the same name is already configured for the same service account. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 | |
create_artifact(artifact: ArtifactRequest) -> ArtifactResponse
Creates a new artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact
|
ArtifactRequest
|
The artifact to create. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The newly created artifact. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 | |
create_artifact_version(artifact_version: ArtifactVersionRequest) -> ArtifactVersionResponse
Create an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version
|
ArtifactVersionRequest
|
The artifact version to create. |
required |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If an artifact version with the same name already exists. |
EntityCreationError
|
If the artifact version creation failed. |
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The created artifact version. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 | |
create_authorized_device(device: OAuthDeviceInternalRequest) -> OAuthDeviceInternalResponse
Creates a new OAuth 2.0 authorized device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device
|
OAuthDeviceInternalRequest
|
The device to be created. |
required |
Returns:
| Type | Description |
|---|---|
OAuthDeviceInternalResponse
|
The newly created device. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a device for the same client ID already exists. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 | |
create_build(build: PipelineBuildRequest) -> PipelineBuildResponse
Creates a new build.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build
|
PipelineBuildRequest
|
The build to create. |
required |
Returns:
| Type | Description |
|---|---|
PipelineBuildResponse
|
The newly created build. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 | |
create_code_repository(code_repository: CodeRepositoryRequest) -> CodeRepositoryResponse
Creates a new code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository
|
CodeRepositoryRequest
|
Code repository to be created. |
required |
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The newly created code repository. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 | |
create_curated_visualization(visualization: CuratedVisualizationRequest) -> CuratedVisualizationResponse
Persist a curated visualization link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization
|
CuratedVisualizationRequest
|
The curated visualization to create. |
required |
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The created curated visualization. |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the curated visualization does not target the same project as the artifact visualization. |
ValueError
|
If the resource type is invalid. |
KeyError
|
If the resource is not found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 | |
create_deployment(deployment: DeploymentRequest) -> DeploymentResponse
Create a new deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment
|
DeploymentRequest
|
The deployment to create. |
required |
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The newly created deployment. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 | |
create_event_source(event_source: EventSourceRequest) -> EventSourceResponse
Create an event_source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source
|
EventSourceRequest
|
The event_source to create. |
required |
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The created event_source. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 | |
create_flavor(flavor: FlavorRequest) -> FlavorResponse
Creates a new stack component flavor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor
|
FlavorRequest
|
The stack component flavor to create. |
required |
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The newly created flavor. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a flavor with the same name and type is already owned by this user. |
ValueError
|
In case the config_schema string exceeds the max length. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 | |
create_model(model: ModelRequest) -> ModelResponse
Creates a new model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
ModelRequest
|
the Model to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The newly created model. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a model with the given name already exists. |
Source code in src/zenml/zen_stores/sql_zen_store.py
12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 | |
create_model_version(model_version: ModelVersionRequest) -> ModelVersionResponse
Creates a new model version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version
|
ModelVersionRequest
|
the Model Version to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
The newly created model version. |
Source code in src/zenml/zen_stores/sql_zen_store.py
12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 | |
create_model_version_artifact_link(model_version_artifact_link: ModelVersionArtifactRequest) -> ModelVersionArtifactResponse
Creates a new model version link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_artifact_link
|
ModelVersionArtifactRequest
|
the Model Version to Artifact Link to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionArtifactResponse
|
The newly created model version to artifact link. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 | |
create_model_version_pipeline_run_link(model_version_pipeline_run_link: ModelVersionPipelineRunRequest) -> ModelVersionPipelineRunResponse
Creates a new model version to pipeline run link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_pipeline_run_link
|
ModelVersionPipelineRunRequest
|
the Model Version to Pipeline Run Link to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionPipelineRunResponse
|
|
ModelVersionPipelineRunResponse
|
|
Source code in src/zenml/zen_stores/sql_zen_store.py
13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 | |
create_pipeline(pipeline: PipelineRequest) -> PipelineResponse
Creates a new pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline
|
PipelineRequest
|
The pipeline to create. |
required |
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The newly created pipeline. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If an identical pipeline already exists. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 | |
create_project(project: ProjectRequest) -> ProjectResponse
Creates a new project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
ProjectRequest
|
The project to create. |
required |
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The newly created project. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 | |
create_run_metadata(run_metadata: RunMetadataRequest) -> None
Creates run metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_metadata
|
RunMetadataRequest
|
The run metadata to create. |
required |
Returns:
| Type | Description |
|---|---|
None
|
The created run metadata. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the resource type is not supported. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 | |
create_run_step(step_run: StepRunRequest) -> StepRunResponse
Creates a step run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run
|
StepRunRequest
|
The step run to create. |
required |
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The created step run. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If trying to create a step run with a retried status. |
EntityExistsError
|
if the step run already exists or a log entry with the same source already exists within the scope of the same step. |
IllegalOperationError
|
if the pipeline run is stopped or stopping. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 | |
create_run_template(template: RunTemplateRequest) -> RunTemplateResponse
Create a new run template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template
|
RunTemplateRequest
|
The template to create. |
required |
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
The newly created template. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 | |
create_schedule(schedule: ScheduleRequest) -> ScheduleResponse
Creates a new schedule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule
|
ScheduleRequest
|
The schedule to create. |
required |
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The newly created schedule. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 | |
create_secret(secret: SecretRequest) -> SecretResponse
Creates a new secret.
The new secret is also validated against the scoping rules enforced in the secrets store:
- a user cannot own two private secrets with the same name
- two public secrets cannot have the same name
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret
|
SecretRequest
|
The secret to create. |
required |
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The newly created secret. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a secret with the same name already exists in the same scope. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 | |
create_service(service: ServiceRequest) -> ServiceResponse
Create a new service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service
|
ServiceRequest
|
The service to create. |
required |
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The newly created service. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 | |
create_service_account(service_account: Union[ServiceAccountRequest, ServiceAccountInternalRequest]) -> ServiceAccountResponse
Creates a new service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account
|
Union[ServiceAccountRequest, ServiceAccountInternalRequest]
|
Service account to be created. |
required |
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The newly created service account. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a user or service account with the given name already exists. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 | |
create_service_connector(service_connector: ServiceConnectorRequest) -> ServiceConnectorResponse
Creates a new service connector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector
|
ServiceConnectorRequest
|
Service connector to be created. |
required |
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
The newly created service connector. |
Raises:
| Type | Description |
|---|---|
Exception
|
If anything goes wrong during the creation of the service connector. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 | |
create_snapshot(snapshot: PipelineSnapshotRequest) -> PipelineSnapshotResponse
Creates a new snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot
|
PipelineSnapshotRequest
|
The snapshot to create. |
required |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a snapshot with the same name already exists for the same pipeline. |
RuntimeError
|
If the snapshot creation fails. |
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The newly created snapshot. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 | |
create_stack(stack: StackRequest) -> StackResponse
Register a full stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack
|
StackRequest
|
The full stack configuration. |
required |
Returns:
| Type | Description |
|---|---|
StackResponse
|
The registered stack. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the full stack creation fails, due to the corrupted input. |
Exception
|
If the full stack creation fails, due to unforeseen errors. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 | |
create_stack_component(component: ComponentRequest) -> ComponentResponse
Create a stack component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component
|
ComponentRequest
|
The stack component to create. |
required |
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
The created stack component. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 | |
create_tag(tag: TagRequest) -> TagResponse
Creates a new tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
TagRequest
|
the tag to be created. |
required |
Returns:
| Type | Description |
|---|---|
TagResponse
|
The newly created tag. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 | |
create_tag_resource(tag_resource: TagResourceRequest) -> TagResourceResponse
Creates a new tag resource relationship.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resource
|
TagResourceRequest
|
the tag resource relationship to be created. |
required |
Returns:
| Type | Description |
|---|---|
TagResourceResponse
|
The newly created tag resource relationship. |
Source code in src/zenml/zen_stores/sql_zen_store.py
14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 | |
create_trigger(trigger: TriggerRequest) -> TriggerResponse
Creates a new trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger
|
TriggerRequest
|
Trigger to be created. |
required |
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The newly created trigger. |
Source code in src/zenml/zen_stores/sql_zen_store.py
10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 | |
create_trigger_execution(trigger_execution: TriggerExecutionRequest) -> TriggerExecutionResponse
Create a trigger execution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_execution
|
TriggerExecutionRequest
|
The trigger execution to create. |
required |
Returns:
| Type | Description |
|---|---|
TriggerExecutionResponse
|
The created trigger execution. |
Source code in src/zenml/zen_stores/sql_zen_store.py
10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 | |
create_user(user: UserRequest) -> UserResponse
Creates a new user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
UserRequest
|
User to be created. |
required |
Returns:
| Type | Description |
|---|---|
UserResponse
|
The newly created user. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a user or service account with the given name already exists. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 | |
delete_action(action_id: UUID) -> None
Delete an action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
UUID
|
The ID of the action to delete. |
required |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the action can't be deleted because it's used by triggers. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 | |
delete_all_model_version_artifact_links(model_version_id: UUID, only_links: bool = True) -> None
Deletes all model version to artifact links.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
ID of the model version containing the link. |
required |
only_links
|
bool
|
Whether to only delete the link to the artifact. |
True
|
Source code in src/zenml/zen_stores/sql_zen_store.py
13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 | |
delete_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID]) -> None
Delete an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to delete the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 | |
delete_api_transaction(api_transaction_id: UUID) -> None
Delete an API transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_transaction_id
|
UUID
|
The ID of the API transaction to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 | |
delete_artifact(artifact_id: UUID) -> None
Deletes an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_id
|
UUID
|
The ID of the artifact to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 | |
delete_artifact_version(artifact_version_id: UUID) -> None
Deletes an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_id
|
UUID
|
The ID of the artifact version to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 | |
delete_authorized_device(device_id: UUID) -> None
Deletes an OAuth 2.0 authorized device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_id
|
UUID
|
The ID of the device to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 | |
delete_build(build_id: UUID) -> None
Deletes a build.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build_id
|
UUID
|
The ID of the build to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 | |
delete_code_repository(code_repository_id: UUID) -> None
Deletes a code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository_id
|
UUID
|
The ID of the code repository to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 | |
delete_curated_visualization(visualization_id: UUID) -> None
Delete a curated visualization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization_id
|
UUID
|
The ID of the curated visualization to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 | |
delete_deployment(deployment_id: UUID) -> None
Delete a deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_id
|
UUID
|
The ID of the deployment to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 | |
delete_event_source(event_source_id: UUID) -> None
Delete an event_source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_id
|
UUID
|
The ID of the event_source to delete. |
required |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the event source can't be deleted because it's used by triggers. |
Source code in src/zenml/zen_stores/sql_zen_store.py
6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 | |
delete_expired_authorized_devices() -> None
Deletes all expired OAuth 2.0 authorized devices.
Source code in src/zenml/zen_stores/sql_zen_store.py
4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 | |
delete_flavor(flavor_id: UUID) -> None
Delete a flavor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_id
|
UUID
|
The id of the flavor to delete. |
required |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
if the flavor is used by a stack component. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 | |
delete_model(model_id: UUID) -> None
Deletes a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_id
|
UUID
|
id of the model to be deleted. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 | |
delete_model_version(model_version_id: UUID) -> None
Deletes a model version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
name or id of the model version to be deleted. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
specified ID or name not found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 | |
delete_model_version_artifact_link(model_version_id: UUID, model_version_artifact_link_name_or_id: Union[str, UUID]) -> None
Deletes a model version to artifact link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
ID of the model version containing the link. |
required |
model_version_artifact_link_name_or_id
|
Union[str, UUID]
|
name or ID of the model version to artifact link to be deleted. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
specified ID or name not found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 | |
delete_model_version_pipeline_run_link(model_version_id: UUID, model_version_pipeline_run_link_name_or_id: Union[str, UUID]) -> None
Deletes a model version to pipeline run link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
name or ID of the model version containing the link. |
required |
model_version_pipeline_run_link_name_or_id
|
Union[str, UUID]
|
name or ID of the model version to pipeline run link to be deleted. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
specified ID not found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 | |
delete_pipeline(pipeline_id: UUID) -> None
Deletes a pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
UUID
|
The ID of the pipeline to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 | |
delete_project(project_name_or_id: Union[str, UUID]) -> None
Deletes a project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name_or_id
|
Union[str, UUID]
|
Name or ID of the project to delete. |
required |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the project is the default project. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 | |
delete_run(run_id: UUID) -> None
Deletes a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_id
|
UUID
|
The ID of the pipeline run to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 | |
delete_run_template(template_id: UUID) -> None
Delete a run template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
The ID of the template to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 | |
delete_schedule(schedule_id: UUID) -> None
Deletes a schedule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_id
|
UUID
|
The ID of the schedule to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 | |
delete_secret(secret_id: UUID) -> None
Delete a secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The id of the secret to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the secret doesn't exist. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 | |
delete_service(service_id: UUID) -> None
Delete a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
UUID
|
The ID of the service to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 | |
delete_service_account(service_account_name_or_id: Union[str, UUID]) -> None
Delete a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_name_or_id
|
Union[str, UUID]
|
The name or the ID of the service account to delete. |
required |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
if the service account has already been used to create other resources. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 | |
delete_service_connector(service_connector_id: UUID) -> None
Deletes a service connector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to delete. |
required |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the service connector is still referenced by one or more stack components. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 | |
delete_snapshot(snapshot_id: UUID) -> None
Deletes a snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
The ID of the snapshot to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 | |
delete_stack(stack_id: UUID) -> None
Delete a stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_id
|
UUID
|
The ID of the stack to delete. |
required |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
if the stack is a default stack. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 | |
delete_stack_component(component_id: UUID) -> None
Delete a stack component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
UUID
|
The id of the stack component to delete. |
required |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
if the stack component is part of one or more stacks, or if it's a default stack component. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 | |
delete_tag(tag_id: UUID) -> None
Deletes a tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_id
|
UUID
|
id of the tag to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 | |
delete_tag_resource(tag_resource: TagResourceRequest) -> None
Deletes a tag resource relationship.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resource
|
TagResourceRequest
|
The tag resource relationship to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 | |
delete_trigger(trigger_id: UUID) -> None
Delete a trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_id
|
UUID
|
The ID of the trigger to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 | |
delete_trigger_execution(trigger_execution_id: UUID) -> None
Delete a trigger execution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_execution_id
|
UUID
|
The ID of the trigger execution to delete. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 | |
delete_user(user_name_or_id: Union[str, UUID]) -> None
Deletes a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name_or_id
|
Union[str, UUID]
|
The name or the ID of the user to delete. |
required |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the user is the default user account or if the user already owns resources. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 | |
entity_exists(entity_id: UUID, schema_class: Type[AnySchema]) -> bool
Check whether an entity exists in the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity_id
|
UUID
|
The ID of the entity to check. |
required |
schema_class
|
Type[AnySchema]
|
The schema class. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
If the entity exists. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 | |
filter_and_paginate(session: Session, query: Union[Select[Any], SelectOfScalar[Any]], table: Type[AnySchema], filter_model: BaseFilter, custom_schema_to_model_conversion: Optional[Callable[..., AnyResponse]] = None, custom_fetch: Optional[Callable[[Session, Union[Select[Any], SelectOfScalar[Any]], BaseFilter], Sequence[Any]]] = None, hydrate: bool = False, apply_query_options_from_schema: bool = False) -> Page[AnyResponse]
classmethod
Given a query, return a Page instance with a list of filtered Models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
The SQLModel Session |
required |
query
|
Union[Select[Any], SelectOfScalar[Any]]
|
The query to execute |
required |
table
|
Type[AnySchema]
|
The table to select from |
required |
filter_model
|
BaseFilter
|
The filter to use, including pagination and sorting |
required |
custom_schema_to_model_conversion
|
Optional[Callable[..., AnyResponse]]
|
Callable to convert the schema into a model. This is used if the Model contains additional data that is not explicitly stored as a field or relationship on the model. |
None
|
custom_fetch
|
Optional[Callable[[Session, Union[Select[Any], SelectOfScalar[Any]], BaseFilter], Sequence[Any]]]
|
Custom callable to use to fetch items from the
database for a given query. This is used if the items fetched
from the database need to be processed differently (e.g. to
perform additional filtering). The callable should take a
|
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
apply_query_options_from_schema
|
bool
|
Flag deciding whether to apply query options defined on the schema. |
False
|
Returns:
| Type | Description |
|---|---|
Page[AnyResponse]
|
The Domain Model representation of the DB resource |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the filtered page number is out of bounds. |
RuntimeError
|
if the schema does not have a |
Source code in src/zenml/zen_stores/sql_zen_store.py
1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 | |
finalize_api_transaction(api_transaction_id: UUID, api_transaction_update: ApiTransactionUpdate) -> None
Finalize an API transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_transaction_id
|
UUID
|
The ID of the API transaction to update. |
required |
api_transaction_update
|
ApiTransactionUpdate
|
The update to be applied to the API transaction. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the API transaction is not found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 | |
get_action(action_id: UUID, hydrate: bool = True) -> ActionResponse
Get an action by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
UUID
|
The ID of the action to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The action. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 | |
get_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID], hydrate: bool = True) -> APIKeyResponse
Get an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to fetch the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The API key with the given ID. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 | |
get_artifact(artifact_id: UUID, hydrate: bool = True) -> ArtifactResponse
Gets an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_id
|
UUID
|
The ID of the artifact to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The artifact. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 | |
get_artifact_version(artifact_version_id: UUID, hydrate: bool = True) -> ArtifactVersionResponse
Gets an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_id
|
UUID
|
The ID of the artifact version to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The artifact version. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 | |
get_artifact_visualization(artifact_visualization_id: UUID, hydrate: bool = True) -> ArtifactVisualizationResponse
Gets an artifact visualization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_visualization_id
|
UUID
|
The ID of the artifact visualization to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ArtifactVisualizationResponse
|
The artifact visualization. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 | |
get_auth_user(user_name_or_id: Union[str, UUID]) -> UserAuthModel
Gets the auth model to a specific user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name_or_id
|
Union[str, UUID]
|
The name or ID of the user to get. |
required |
Returns:
| Type | Description |
|---|---|
UserAuthModel
|
The requested user, if it was found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 | |
get_authorized_device(device_id: UUID, hydrate: bool = True) -> OAuthDeviceResponse
Gets a specific OAuth 2.0 authorized device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_id
|
UUID
|
The ID of the device to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
OAuthDeviceResponse
|
The requested device, if it was found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 | |
get_build(build_id: UUID, hydrate: bool = True) -> PipelineBuildResponse
Get a build with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build_id
|
UUID
|
ID of the build. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
PipelineBuildResponse
|
The build. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 | |
get_code_reference(code_reference_id: UUID, hydrate: bool = True) -> CodeReferenceResponse
Gets a code reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_reference_id
|
UUID
|
The ID of the code reference to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
CodeReferenceResponse
|
The code reference. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 | |
get_code_repository(code_repository_id: UUID, hydrate: bool = True) -> CodeRepositoryResponse
Gets a specific code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository_id
|
UUID
|
The ID of the code repository to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The requested code repository, if it was found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 | |
get_curated_visualization(visualization_id: UUID, hydrate: bool = True) -> CuratedVisualizationResponse
Fetch a curated visualization by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization_id
|
UUID
|
The ID of the curated visualization to fetch. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The curated visualization with the given ID. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 | |
get_deployment(deployment_id: UUID, hydrate: bool = True) -> DeploymentResponse
Get a deployment with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_id
|
UUID
|
ID of the deployment. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The deployment. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 | |
get_deployment_id() -> UUID
Get the ID of the deployment.
Returns:
| Type | Description |
|---|---|
UUID
|
The ID of the deployment. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the deployment ID could not be loaded from the database. |
Source code in src/zenml/zen_stores/sql_zen_store.py
1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 | |
get_entity_by_id(entity_id: UUID, schema_class: Type[AnySchema]) -> Optional[AnyIdentifiedResponse]
Get an entity by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity_id
|
UUID
|
The ID of the entity to get. |
required |
schema_class
|
Type[AnySchema]
|
The schema class. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the schema to model conversion failed. |
Returns:
| Type | Description |
|---|---|
Optional[AnyIdentifiedResponse]
|
The entity if it exists, None otherwise |
Source code in src/zenml/zen_stores/sql_zen_store.py
11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 | |
get_event_source(event_source_id: UUID, hydrate: bool = True) -> EventSourceResponse
Get an event_source by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_id
|
UUID
|
The ID of the event_source to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The event_source. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 | |
get_flavor(flavor_id: UUID, hydrate: bool = True) -> FlavorResponse
Get a flavor by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_id
|
UUID
|
The ID of the flavor to fetch. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The stack component flavor. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 | |
get_internal_api_key(api_key_id: UUID, hydrate: bool = True) -> APIKeyInternalResponse
Get internal details for an API key by its unique ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key_id
|
UUID
|
The ID of the API key to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
APIKeyInternalResponse
|
The internal details for the API key with the given ID. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the API key doesn't exist. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 | |
get_internal_authorized_device(device_id: Optional[UUID] = None, client_id: Optional[UUID] = None, hydrate: bool = True) -> OAuthDeviceInternalResponse
Gets a specific OAuth 2.0 authorized device for internal use.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client_id
|
Optional[UUID]
|
The client ID of the device to get. |
None
|
device_id
|
Optional[UUID]
|
The ID of the device to get. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
OAuthDeviceInternalResponse
|
The requested device, if it was found. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no device with the given client ID exists. |
ValueError
|
If neither device ID nor client ID are provided. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 | |
get_logs(logs_id: UUID, hydrate: bool = True) -> LogsResponse
Gets logs with the given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
logs_id
|
UUID
|
The ID of the logs to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
LogsResponse
|
The logs. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 | |
get_model(model_id: UUID, hydrate: bool = True) -> ModelResponse
Get an existing model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_id
|
UUID
|
id of the model to be retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The model of interest. |
Source code in src/zenml/zen_stores/sql_zen_store.py
12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 | |
get_model_by_name_or_id(model_name_or_id: Union[str, UUID], project: UUID, hydrate: bool = True) -> ModelResponse
Get a model by name or ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_name_or_id
|
Union[str, UUID]
|
The name or ID of the model to get. |
required |
project
|
UUID
|
The project ID of the model to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The model. |
Source code in src/zenml/zen_stores/sql_zen_store.py
12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 | |
get_model_version(model_version_id: UUID, hydrate: bool = True) -> ModelVersionResponse
Get an existing model version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
name, id, stage or number of the model version to be retrieved. If skipped - latest is retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
The model version of interest. |
Source code in src/zenml/zen_stores/sql_zen_store.py
12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 | |
get_onboarding_state() -> List[str]
Get the server onboarding state.
Returns:
| Type | Description |
|---|---|
List[str]
|
The server onboarding state. |
Source code in src/zenml/zen_stores/sql_zen_store.py
1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 | |
get_or_create_api_transaction(api_transaction: ApiTransactionRequest) -> Tuple[ApiTransactionResponse, bool]
Retrieve or create a new API transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_transaction
|
ApiTransactionRequest
|
The API transaction to retrieve or create. |
required |
Returns:
| Type | Description |
|---|---|
ApiTransactionResponse
|
The API transaction and a boolean indicating whether the transaction |
bool
|
was created. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 | |
get_or_create_run(pipeline_run: PipelineRunRequest, pre_creation_hook: Optional[Callable[[], None]] = None) -> Tuple[PipelineRunResponse, bool]
Gets or creates a pipeline run.
If a run with the same ID or name already exists, it is returned. Otherwise, a new run is created.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_run
|
PipelineRunRequest
|
The pipeline run to get or create. |
required |
pre_creation_hook
|
Optional[Callable[[], None]]
|
Optional function to run before creating the pipeline run. |
None
|
noqa: DAR401
Raises: EntityExistsError: If a run with the same name already exists. RuntimeError: If the run fetching failed unexpectedly.
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The pipeline run, and a boolean indicating whether the run was |
bool
|
created or not. |
Source code in src/zenml/zen_stores/sql_zen_store.py
6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 | |
get_pipeline(pipeline_id: UUID, hydrate: bool = True) -> PipelineResponse
Get a pipeline with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
UUID
|
ID of the pipeline. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The pipeline. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 | |
get_pipeline_run_dag(pipeline_run_id: UUID) -> PipelineRunDAG
Get the DAG of a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_run_id
|
UUID
|
The ID of the pipeline run. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunDAG
|
The DAG of the pipeline run. |
Source code in src/zenml/zen_stores/sql_zen_store.py
6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 | |
get_project(project_name_or_id: Union[str, UUID], hydrate: bool = True) -> ProjectResponse
Get an existing project by name or ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name_or_id
|
Union[str, UUID]
|
Name or ID of the project to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The requested project if one was found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 | |
get_run(run_id: UUID, hydrate: bool = True, include_full_metadata: bool = False, include_python_packages: bool = False) -> PipelineRunResponse
Gets a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_id
|
UUID
|
The ID of the pipeline run to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
include_full_metadata
|
bool
|
Flag deciding whether to include the full metadata in the response. |
False
|
include_python_packages
|
bool
|
Flag deciding whether to include the python packages in the response. |
False
|
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The pipeline run. |
Source code in src/zenml/zen_stores/sql_zen_store.py
6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 | |
get_run_status(run_id: UUID) -> ExecutionStatus
Gets the status of a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_id
|
UUID
|
The ID of the pipeline run to get. |
required |
Returns:
| Type | Description |
|---|---|
ExecutionStatus
|
The status of the pipeline run. |
Source code in src/zenml/zen_stores/sql_zen_store.py
6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 | |
get_run_step(step_run_id: UUID, hydrate: bool = True) -> StepRunResponse
Get a step run by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run_id
|
UUID
|
The ID of the step run to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The step run. |
Source code in src/zenml/zen_stores/sql_zen_store.py
10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 | |
get_run_template(template_id: UUID, hydrate: bool = True) -> RunTemplateResponse
Get a run template with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
ID of the template. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
The template. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 | |
get_schedule(schedule_id: UUID, hydrate: bool = True) -> ScheduleResponse
Get a schedule with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_id
|
UUID
|
ID of the schedule. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The schedule. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 | |
get_secret(secret_id: UUID, hydrate: bool = True) -> SecretResponse
Get a secret by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to fetch. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The secret. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the secret doesn't exist. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 | |
get_secret_by_name_or_id(secret_name_or_id: Union[str, UUID], include_secret_values: bool = False) -> SecretResponse
Get a secret by name or ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_name_or_id
|
Union[str, UUID]
|
The name or ID of the secret to fetch. |
required |
include_secret_values
|
bool
|
Whether to include the secret values in the response. |
False
|
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The secret. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 | |
get_server_settings(hydrate: bool = True) -> ServerSettingsResponse
Get the server settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ServerSettingsResponse
|
The server settings. |
Source code in src/zenml/zen_stores/sql_zen_store.py
1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 | |
get_service(service_id: UUID, hydrate: bool = True) -> ServiceResponse
Get a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
UUID
|
The ID of the service to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The service. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 | |
get_service_account(service_account_name_or_id: Union[str, UUID], hydrate: bool = True) -> ServiceAccountResponse
Gets a specific service account.
Raises a KeyError in case a service account with that id does not exist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_name_or_id
|
Union[str, UUID]
|
The name or ID of the service account to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The requested service account, if it was found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 | |
get_service_connector(service_connector_id: UUID, hydrate: bool = True, expand_secrets: bool = False) -> ServiceConnectorResponse
Gets a specific service connector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
expand_secrets
|
bool
|
Flag deciding whether to include the secrets in the output model. |
False
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
The requested service connector, if it was found. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 | |
get_service_connector_client(service_connector_id: UUID, resource_type: Optional[str] = None, resource_id: Optional[str] = None) -> ServiceConnectorResponse
Get a service connector client for a service connector and given resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the base service connector to use. |
required |
resource_type
|
Optional[str]
|
The type of resource to get a client for. |
None
|
resource_id
|
Optional[str]
|
The ID of the resource to get a client for. |
None
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
A service connector client that can be used to access the given |
ServiceConnectorResponse
|
resource. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 | |
get_service_connector_type(connector_type: str) -> ServiceConnectorTypeModel
Returns the requested service connector type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connector_type
|
str
|
the service connector type identifier. |
required |
Returns:
| Type | Description |
|---|---|
ServiceConnectorTypeModel
|
The requested service connector type. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 | |
get_snapshot(snapshot_id: UUID, hydrate: bool = True, step_configuration_filter: Optional[List[str]] = None, include_config_schema: Optional[bool] = None) -> PipelineSnapshotResponse
Get a snapshot with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
ID of the snapshot. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
step_configuration_filter
|
Optional[List[str]]
|
List of step configurations to include in the response. If not given, all step configurations will be included. |
None
|
include_config_schema
|
Optional[bool]
|
Whether to include the config schema in the response. |
None
|
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The snapshot. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 | |
get_stack(stack_id: UUID, hydrate: bool = True) -> StackResponse
Get a stack by its unique ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_id
|
UUID
|
The ID of the stack to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
StackResponse
|
The stack with the given ID. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 | |
get_stack_component(component_id: UUID, hydrate: bool = True) -> ComponentResponse
Get a stack component by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
UUID
|
The ID of the stack component to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
The stack component. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 | |
get_stack_deployment_config(provider: StackDeploymentProvider, stack_name: str, location: Optional[str] = None) -> StackDeploymentConfig
Return the cloud provider console URL and configuration needed to deploy the ZenML stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider
|
StackDeploymentProvider
|
The stack deployment provider. |
required |
stack_name
|
str
|
The name of the stack. |
required |
location
|
Optional[str]
|
The location where the stack should be deployed. |
None
|
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
Stack deployments are not supported by the local ZenML deployment. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 | |
get_stack_deployment_info(provider: StackDeploymentProvider) -> StackDeploymentInfo
Get information about a stack deployment provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider
|
StackDeploymentProvider
|
The stack deployment provider. |
required |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
Stack deployments are not supported by the local ZenML deployment. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 | |
get_stack_deployment_stack(provider: StackDeploymentProvider, stack_name: str, location: Optional[str] = None, date_start: Optional[datetime] = None) -> Optional[DeployedStack]
Return a matching ZenML stack that was deployed and registered.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider
|
StackDeploymentProvider
|
The stack deployment provider. |
required |
stack_name
|
str
|
The name of the stack. |
required |
location
|
Optional[str]
|
The location where the stack should be deployed. |
None
|
date_start
|
Optional[datetime]
|
The date when the deployment started. |
None
|
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
Stack deployments are not supported by the local ZenML deployment. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 | |
get_store_info() -> ServerModel
Get information about the store.
Returns:
| Type | Description |
|---|---|
ServerModel
|
Information about the store. |
Source code in src/zenml/zen_stores/sql_zen_store.py
1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 | |
get_tag(tag_id: UUID, hydrate: bool = True) -> TagResponse
Get an existing tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_id
|
UUID
|
id of the tag to be retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
TagResponse
|
The tag of interest. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 | |
get_trigger(trigger_id: UUID, hydrate: bool = True) -> TriggerResponse
Get a trigger by its unique ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_id
|
UUID
|
The ID of the trigger to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The trigger with the given ID. |
Source code in src/zenml/zen_stores/sql_zen_store.py
10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 | |
get_trigger_execution(trigger_execution_id: UUID, hydrate: bool = True) -> TriggerExecutionResponse
Get an trigger execution by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_execution_id
|
UUID
|
The ID of the trigger execution to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
TriggerExecutionResponse
|
The trigger execution. |
Source code in src/zenml/zen_stores/sql_zen_store.py
10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 | |
get_user(user_name_or_id: Optional[Union[str, UUID]] = None, include_private: bool = False, hydrate: bool = True) -> UserResponse
Gets a specific user, when no id is specified the active user is returned.
noqa: DAR401
noqa: DAR402
Raises a KeyError in case a user with that name or id does not exist.
For backwards-compatibility reasons, this method can also be called to fetch service accounts by their ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name_or_id
|
Optional[Union[str, UUID]]
|
The name or ID of the user to get. |
None
|
include_private
|
bool
|
Whether to include private user information |
False
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
UserResponse
|
The requested user, if it was found. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the user does not exist. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 | |
list_actions(action_filter_model: ActionFilter, hydrate: bool = False) -> Page[ActionResponse]
List all actions matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_filter_model
|
ActionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ActionResponse]
|
A page of actions matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 | |
list_api_keys(service_account_id: UUID, filter_model: APIKeyFilter, hydrate: bool = False) -> Page[APIKeyResponse]
List all API keys for a service account matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to list the API keys. |
required |
filter_model
|
APIKeyFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[APIKeyResponse]
|
A list of all API keys matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 | |
list_artifact_versions(artifact_version_filter_model: ArtifactVersionFilter, hydrate: bool = False) -> Page[ArtifactVersionResponse]
List all artifact versions matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_filter_model
|
ArtifactVersionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ArtifactVersionResponse]
|
A list of all artifact versions matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 | |
list_artifacts(filter_model: ArtifactFilter, hydrate: bool = False) -> Page[ArtifactResponse]
List all artifacts matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ArtifactFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ArtifactResponse]
|
A list of all artifacts matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 | |
list_authorized_devices(filter_model: OAuthDeviceFilter, hydrate: bool = False) -> Page[OAuthDeviceResponse]
List all OAuth 2.0 authorized devices for a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
OAuthDeviceFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[OAuthDeviceResponse]
|
A page of all matching OAuth 2.0 authorized devices. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 | |
list_builds(build_filter_model: PipelineBuildFilter, hydrate: bool = False) -> Page[PipelineBuildResponse]
List all builds matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build_filter_model
|
PipelineBuildFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineBuildResponse]
|
A page of all builds matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 | |
list_code_repositories(filter_model: CodeRepositoryFilter, hydrate: bool = False) -> Page[CodeRepositoryResponse]
List all code repositories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
CodeRepositoryFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[CodeRepositoryResponse]
|
A page of all code repositories. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 | |
list_deployments(deployment_filter_model: DeploymentFilter, hydrate: bool = False) -> Page[DeploymentResponse]
List all deployments matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_filter_model
|
DeploymentFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[DeploymentResponse]
|
A page of all deployments matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 | |
list_event_sources(event_source_filter_model: EventSourceFilter, hydrate: bool = False) -> Page[EventSourceResponse]
List all event_sources matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_filter_model
|
EventSourceFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[EventSourceResponse]
|
A list of all event_sources matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 | |
list_flavors(flavor_filter_model: FlavorFilter, hydrate: bool = False) -> Page[FlavorResponse]
List all stack component flavors matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_filter_model
|
FlavorFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[FlavorResponse]
|
List of all the stack component flavors matching the given criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 | |
list_model_version_artifact_links(model_version_artifact_link_filter_model: ModelVersionArtifactFilter, hydrate: bool = False) -> Page[ModelVersionArtifactResponse]
Get all model version to artifact links by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_artifact_link_filter_model
|
ModelVersionArtifactFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelVersionArtifactResponse]
|
A page of all model version to artifact links. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 | |
list_model_version_pipeline_run_links(model_version_pipeline_run_link_filter_model: ModelVersionPipelineRunFilter, hydrate: bool = False) -> Page[ModelVersionPipelineRunResponse]
Get all model version to pipeline run links by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_pipeline_run_link_filter_model
|
ModelVersionPipelineRunFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelVersionPipelineRunResponse]
|
A page of all model version to pipeline run links. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 | |
list_model_versions(model_version_filter_model: ModelVersionFilter, hydrate: bool = False) -> Page[ModelVersionResponse]
Get all model versions by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_filter_model
|
ModelVersionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelVersionResponse]
|
A page of all model versions. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 | |
list_models(model_filter_model: ModelFilter, hydrate: bool = False) -> Page[ModelResponse]
Get all models by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_filter_model
|
ModelFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelResponse]
|
A page of all models. |
Source code in src/zenml/zen_stores/sql_zen_store.py
12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 | |
list_pipelines(pipeline_filter_model: PipelineFilter, hydrate: bool = False) -> Page[PipelineResponse]
List all pipelines matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_filter_model
|
PipelineFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineResponse]
|
A list of all pipelines matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 | |
list_projects(project_filter_model: ProjectFilter, hydrate: bool = False) -> Page[ProjectResponse]
List all projects matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_filter_model
|
ProjectFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ProjectResponse]
|
A list of all projects matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 | |
list_run_steps(step_run_filter_model: StepRunFilter, hydrate: bool = False) -> Page[StepRunResponse]
List all step runs matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run_filter_model
|
StepRunFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[StepRunResponse]
|
A list of all step runs matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 | |
list_run_templates(template_filter_model: RunTemplateFilter, hydrate: bool = False) -> Page[RunTemplateResponse]
List all run templates matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_filter_model
|
RunTemplateFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[RunTemplateResponse]
|
A list of all templates matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 | |
list_runs(runs_filter_model: PipelineRunFilter, hydrate: bool = False, include_full_metadata: bool = False) -> Page[PipelineRunResponse]
List all pipeline runs matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
runs_filter_model
|
PipelineRunFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
include_full_metadata
|
bool
|
If True, include metadata of all steps in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineRunResponse]
|
A list of all pipeline runs matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 | |
list_schedules(schedule_filter_model: ScheduleFilter, hydrate: bool = False) -> Page[ScheduleResponse]
List all schedules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_filter_model
|
ScheduleFilter
|
All filter parameters including pagination params |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ScheduleResponse]
|
A list of schedules. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 | |
list_secrets(secret_filter_model: SecretFilter, hydrate: bool = False) -> Page[SecretResponse]
List all secrets matching the given filter criteria.
Note that returned secrets do not include any secret values. To fetch
the secret values, use get_secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_filter_model
|
SecretFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[SecretResponse]
|
A list of all secrets matching the filter criteria, with pagination |
Page[SecretResponse]
|
information and sorted according to the filter criteria. The |
Page[SecretResponse]
|
returned secrets do not include any secret values, only metadata. To |
Page[SecretResponse]
|
fetch the secret values, use |
Page[SecretResponse]
|
secret. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 | |
list_service_accounts(filter_model: ServiceAccountFilter, hydrate: bool = False) -> Page[ServiceAccountResponse]
List all service accounts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceAccountFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ServiceAccountResponse]
|
A list of filtered service accounts. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 | |
list_service_connector_resources(filter_model: ServiceConnectorFilter) -> List[ServiceConnectorResourcesModel]
List resources that can be accessed by service connectors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceConnectorFilter
|
Optional filter model to use when fetching service connectors. |
required |
Returns:
| Type | Description |
|---|---|
List[ServiceConnectorResourcesModel]
|
The matching list of resources that available service |
List[ServiceConnectorResourcesModel]
|
connectors have access to. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 | |
list_service_connector_types(connector_type: Optional[str] = None, resource_type: Optional[str] = None, auth_method: Optional[str] = None) -> List[ServiceConnectorTypeModel]
Get a list of service connector types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connector_type
|
Optional[str]
|
Filter by connector type. |
None
|
resource_type
|
Optional[str]
|
Filter by resource type. |
None
|
auth_method
|
Optional[str]
|
Filter by authentication method. |
None
|
Returns:
| Type | Description |
|---|---|
List[ServiceConnectorTypeModel]
|
List of service connector types. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 | |
list_service_connectors(filter_model: ServiceConnectorFilter, hydrate: bool = False, expand_secrets: bool = False) -> Page[ServiceConnectorResponse]
List all service connectors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceConnectorFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
expand_secrets
|
bool
|
Flag deciding whether to include the secrets in the output models. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ServiceConnectorResponse]
|
A page of all service connectors. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 | |
list_services(filter_model: ServiceFilter, hydrate: bool = False) -> Page[ServiceResponse]
List all services matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ServiceResponse]
|
A list of all services matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 | |
list_snapshots(snapshot_filter_model: PipelineSnapshotFilter, hydrate: bool = False) -> Page[PipelineSnapshotResponse]
List all snapshots matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_filter_model
|
PipelineSnapshotFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineSnapshotResponse]
|
A page of all snapshots matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 | |
list_stack_components(component_filter_model: ComponentFilter, hydrate: bool = False) -> Page[ComponentResponse]
List all stack components matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_filter_model
|
ComponentFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ComponentResponse]
|
A list of all stack components matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 | |
list_stacks(stack_filter_model: StackFilter, hydrate: bool = False) -> Page[StackResponse]
List all stacks matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_filter_model
|
StackFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[StackResponse]
|
A list of all stacks matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 | |
list_tags(tag_filter_model: TagFilter, hydrate: bool = False) -> Page[TagResponse]
Get all tags by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_filter_model
|
TagFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[TagResponse]
|
A page of all tags. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 | |
list_trigger_executions(trigger_execution_filter_model: TriggerExecutionFilter, hydrate: bool = False) -> Page[TriggerExecutionResponse]
List all trigger executions matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_execution_filter_model
|
TriggerExecutionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[TriggerExecutionResponse]
|
A list of all trigger executions matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 | |
list_triggers(trigger_filter_model: TriggerFilter, hydrate: bool = False) -> Page[TriggerResponse]
List all trigger matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_filter_model
|
TriggerFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[TriggerResponse]
|
A list of all triggers matching the filter criteria. |
Source code in src/zenml/zen_stores/sql_zen_store.py
10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 | |
list_users(user_filter_model: UserFilter, hydrate: bool = False) -> Page[UserResponse]
List all users.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_filter_model
|
UserFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[UserResponse]
|
A list of all users. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 | |
migrate_database() -> None
Migrate the database to the head as defined by the python package.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the database exists and is not empty but has never been migrated with alembic before. |
Source code in src/zenml/zen_stores/sql_zen_store.py
1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 | |
prune_artifact_versions(project_name_or_id: Union[str, UUID], only_versions: bool = True) -> None
Prunes unused artifact versions and their artifacts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name_or_id
|
Union[str, UUID]
|
The project name or ID to prune artifact versions for. |
required |
only_versions
|
bool
|
Only delete artifact versions, keeping artifacts |
True
|
Source code in src/zenml/zen_stores/sql_zen_store.py
3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 | |
restore_database(strategy: Optional[DatabaseBackupStrategy] = None, location: Optional[Any] = None, cleanup: bool = False) -> None
Restore the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
strategy
|
Optional[DatabaseBackupStrategy]
|
Custom backup strategy to use. If not set, the backup strategy from the store configuration will be used. |
None
|
location
|
Optional[Any]
|
Custom target location to restore the database from. If not set, the configured backup location will be used. Depending on the backup strategy, this can be a file path, a database name or an in-memory database representation. |
None
|
cleanup
|
bool
|
Whether to cleanup the backup after restoring the database. |
False
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If the backup database name is not set when the backup database is requested or if the backup strategy is invalid. |
Source code in src/zenml/zen_stores/sql_zen_store.py
1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 | |
restore_secrets(ignore_errors: bool = False, delete_secrets: bool = False) -> None
Restore all secrets from the configured backup secrets store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ignore_errors
|
bool
|
Whether to ignore individual errors during the restore process and attempt to restore all secrets. |
False
|
delete_secrets
|
bool
|
Whether to delete the secrets that have been successfully restored from the backup secrets store. Setting this flag effectively moves all secrets from the backup secrets store to the primary secrets store. |
False
|
noqa: DAR401
Raises: BackupSecretsStoreNotConfiguredError: if no backup secrets store is configured.
Source code in src/zenml/zen_stores/sql_zen_store.py
8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 | |
rotate_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID], rotate_request: APIKeyRotateRequest) -> APIKeyResponse
Rotate an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to rotate the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to rotate. |
required |
rotate_request
|
APIKeyRotateRequest
|
The rotate request on the API key. |
required |
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The updated API key. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 | |
run_snapshot(snapshot_id: UUID, run_request: PipelineSnapshotRunRequest) -> NoReturn
Run a snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
The ID of the snapshot to run. |
required |
run_request
|
PipelineSnapshotRunRequest
|
Configuration for the run. |
required |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
Always. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 | |
run_template(template_id: UUID, run_configuration: Optional[PipelineRunConfiguration] = None) -> NoReturn
Run a template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
The ID of the template to run. |
required |
run_configuration
|
Optional[PipelineRunConfiguration]
|
Configuration for the run. |
None
|
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
Always. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 | |
set_filter_project_id(filter_model: ProjectScopedFilter, project_name_or_id: Optional[Union[UUID, str]] = None) -> None
Set the project ID on a filter model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ProjectScopedFilter
|
The filter model to set the project ID on. |
required |
project_name_or_id
|
Optional[Union[UUID, str]]
|
The project to set the scope for. If not provided, the project scope is determined from the request project filter or the default project, in that order. |
None
|
Source code in src/zenml/zen_stores/sql_zen_store.py
11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 | |
update_action(action_id: UUID, action_update: ActionUpdate) -> ActionResponse
Update an existing action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
UUID
|
The ID of the action to update. |
required |
action_update
|
ActionUpdate
|
The update to be applied to the action. |
required |
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The updated action. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 | |
update_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID], api_key_update: APIKeyUpdate) -> APIKeyResponse
Update an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to update the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to update. |
required |
api_key_update
|
APIKeyUpdate
|
The update request on the API key. |
required |
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The updated API key. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
if the API key update would result in a name conflict with an existing API key for the same service account. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 | |
update_artifact(artifact_id: UUID, artifact_update: ArtifactUpdate) -> ArtifactResponse
Updates an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_id
|
UUID
|
The ID of the artifact to update. |
required |
artifact_update
|
ArtifactUpdate
|
The update to be applied to the artifact. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The updated artifact. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 | |
update_artifact_version(artifact_version_id: UUID, artifact_version_update: ArtifactVersionUpdate) -> ArtifactVersionResponse
Updates an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_id
|
UUID
|
The ID of the artifact version to update. |
required |
artifact_version_update
|
ArtifactVersionUpdate
|
The update to be applied to the artifact version. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The updated artifact version. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 | |
update_authorized_device(device_id: UUID, update: OAuthDeviceUpdate) -> OAuthDeviceResponse
Updates an existing OAuth 2.0 authorized device for internal use.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_id
|
UUID
|
The ID of the device to update. |
required |
update
|
OAuthDeviceUpdate
|
The update to be applied to the device. |
required |
Returns:
| Type | Description |
|---|---|
OAuthDeviceResponse
|
The updated OAuth 2.0 authorized device. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 | |
update_code_repository(code_repository_id: UUID, update: CodeRepositoryUpdate) -> CodeRepositoryResponse
Updates an existing code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository_id
|
UUID
|
The ID of the code repository to update. |
required |
update
|
CodeRepositoryUpdate
|
The update to be applied to the code repository. |
required |
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The updated code repository. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 | |
update_curated_visualization(visualization_id: UUID, visualization_update: CuratedVisualizationUpdate) -> CuratedVisualizationResponse
Update mutable fields on a curated visualization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization_id
|
UUID
|
The ID of the curated visualization to update. |
required |
visualization_update
|
CuratedVisualizationUpdate
|
The update to apply to the curated visualization. |
required |
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The updated curated visualization. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 | |
update_deployment(deployment_id: UUID, deployment_update: DeploymentUpdate) -> DeploymentResponse
Update a deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_id
|
UUID
|
The ID of the deployment to update. |
required |
deployment_update
|
DeploymentUpdate
|
The update to apply. |
required |
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The updated deployment. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 | |
update_event_source(event_source_id: UUID, event_source_update: EventSourceUpdate) -> EventSourceResponse
Update an existing event_source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_id
|
UUID
|
The ID of the event_source to update. |
required |
event_source_update
|
EventSourceUpdate
|
The update to be applied to the event_source. |
required |
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The updated event_source. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 | |
update_flavor(flavor_id: UUID, flavor_update: FlavorUpdate) -> FlavorResponse
Updates an existing user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_id
|
UUID
|
The id of the flavor to update. |
required |
flavor_update
|
FlavorUpdate
|
The update to be applied to the flavor. |
required |
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The updated flavor. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a flavor with the same name and type already exists. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 | |
update_internal_api_key(api_key_id: UUID, api_key_update: APIKeyInternalUpdate) -> APIKeyResponse
Update an API key with internal details.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key_id
|
UUID
|
The ID of the API key. |
required |
api_key_update
|
APIKeyInternalUpdate
|
The update request on the API key. |
required |
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The updated API key. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the API key doesn't exist. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 | |
update_internal_authorized_device(device_id: UUID, update: OAuthDeviceInternalUpdate) -> OAuthDeviceInternalResponse
Updates an existing OAuth 2.0 authorized device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_id
|
UUID
|
The ID of the device to update. |
required |
update
|
OAuthDeviceInternalUpdate
|
The update to be applied to the device. |
required |
Returns:
| Type | Description |
|---|---|
OAuthDeviceInternalResponse
|
The updated OAuth 2.0 authorized device. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 | |
update_model(model_id: UUID, model_update: ModelUpdate) -> ModelResponse
Updates an existing model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_id
|
UUID
|
UUID of the model to be updated. |
required |
model_update
|
ModelUpdate
|
the Model to be updated. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
specified ID not found. |
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The updated model. |
Source code in src/zenml/zen_stores/sql_zen_store.py
12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 | |
update_model_version(model_version_id: UUID, model_version_update_model: ModelVersionUpdate) -> ModelVersionResponse
Get all model versions by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
The ID of model version to be updated. |
required |
model_version_update_model
|
ModelVersionUpdate
|
The model version to be updated. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
An updated model version. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the model version not found |
RuntimeError
|
If there is a model version with target stage,
but |
Source code in src/zenml/zen_stores/sql_zen_store.py
13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 | |
update_onboarding_state(completed_steps: Set[str]) -> None
Update the server onboarding state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
completed_steps
|
Set[str]
|
Newly completed onboarding steps. |
required |
Source code in src/zenml/zen_stores/sql_zen_store.py
1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 | |
update_pipeline(pipeline_id: UUID, pipeline_update: PipelineUpdate) -> PipelineResponse
Updates a pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
UUID
|
The ID of the pipeline to be updated. |
required |
pipeline_update
|
PipelineUpdate
|
The update to be applied. |
required |
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The updated pipeline. |
Source code in src/zenml/zen_stores/sql_zen_store.py
4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 | |
update_project(project_id: UUID, project_update: ProjectUpdate) -> ProjectResponse
Update an existing project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_id
|
UUID
|
The ID of the project to be updated. |
required |
project_update
|
ProjectUpdate
|
The update to be applied to the project. |
required |
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The updated project. |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the request tries to update the name of the default project. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 | |
update_run(run_id: UUID, run_update: PipelineRunUpdate) -> PipelineRunResponse
Updates a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_id
|
UUID
|
The ID of the pipeline run to update. |
required |
run_update
|
PipelineRunUpdate
|
The update to be applied to the pipeline run. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The updated pipeline run. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a log entry with the same source already exists within the scope of the same pipeline run. |
IllegalOperationError
|
If the orchestrator run id is being updated on a non-placeholder run or if the orchestrator run id is already set and is different from the new orchestrator run id. |
Source code in src/zenml/zen_stores/sql_zen_store.py
6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 | |
update_run_step(step_run_id: UUID, step_run_update: StepRunUpdate) -> StepRunResponse
Updates a step run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run_id
|
UUID
|
The ID of the step to update. |
required |
step_run_update
|
StepRunUpdate
|
The update to be applied to the step. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If trying to update the step status to retried. |
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The updated step run. |
Source code in src/zenml/zen_stores/sql_zen_store.py
10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 | |
update_run_template(template_id: UUID, template_update: RunTemplateUpdate) -> RunTemplateResponse
Updates a run template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
The ID of the template to update. |
required |
template_update
|
RunTemplateUpdate
|
The update to apply. |
required |
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
The updated template. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 | |
update_schedule(schedule_id: UUID, schedule_update: ScheduleUpdate) -> ScheduleResponse
Updates a schedule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_id
|
UUID
|
The ID of the schedule to be updated. |
required |
schedule_update
|
ScheduleUpdate
|
The update to be applied. |
required |
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The updated schedule. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 | |
update_secret(secret_id: UUID, secret_update: SecretUpdate) -> SecretResponse
Updates a secret.
Secret values that are specified as None in the update that are
present in the existing secret are removed from the existing secret.
Values that are present in both secrets are overwritten. All other
values in both the existing secret and the update are kept (merged).
If the update includes a change of name or scope, the scoping rules enforced in the secrets store are used to validate the update:
- a user cannot own two private secrets with the same name
- two public secrets cannot have the same name
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to be updated. |
required |
secret_update
|
SecretUpdate
|
The update to be applied. |
required |
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The updated secret. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the secret doesn't exist. |
EntityExistsError
|
If a secret with the same name already exists in the same scope. |
IllegalOperationError
|
if the secret is private and the current user is not the owner of the secret. |
Source code in src/zenml/zen_stores/sql_zen_store.py
7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 | |
update_server_settings(settings_update: ServerSettingsUpdate) -> ServerSettingsResponse
Update the server settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings_update
|
ServerSettingsUpdate
|
The server settings update. |
required |
Returns:
| Type | Description |
|---|---|
ServerSettingsResponse
|
The updated server settings. |
Source code in src/zenml/zen_stores/sql_zen_store.py
1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 | |
update_service(service_id: UUID, update: ServiceUpdate) -> ServiceResponse
Update a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
UUID
|
The ID of the service to update. |
required |
update
|
ServiceUpdate
|
The update to be applied to the service. |
required |
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The updated service. |
Source code in src/zenml/zen_stores/sql_zen_store.py
2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 | |
update_service_account(service_account_name_or_id: Union[str, UUID], service_account_update: ServiceAccountUpdate) -> ServiceAccountResponse
Updates an existing service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_name_or_id
|
Union[str, UUID]
|
The name or the ID of the service account to update. |
required |
service_account_update
|
ServiceAccountUpdate
|
The update to be applied to the service account. |
required |
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The updated service account. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a user or service account with the given name already exists. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 | |
update_service_connector(service_connector_id: UUID, update: ServiceConnectorUpdate) -> ServiceConnectorResponse
Updates an existing service connector.
The update model contains the fields to be updated. If a field value is set to None in the model, the field is not updated, but there are special rules concerning some fields:
- the
configurationfield represents a full valid configuration update, not just a partial update. If it is set (i.e. not None) in the update, its values will replace the existing configuration values. - the
resource_idfield value is also a full replacement value: if set toNone, the resource ID is removed from the service connector. - the
expiration_secondsfield value is also a full replacement value: if set toNone, the expiration is removed from the service connector. - the
labelsfield 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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to update. |
required |
update
|
ServiceConnectorUpdate
|
The update to be applied to the service connector. |
required |
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
The updated service connector. |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the service connector is referenced by one or more stack components and the update would change the connector type, resource type or resource ID. |
Source code in src/zenml/zen_stores/sql_zen_store.py
8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 | |
update_snapshot(snapshot_id: UUID, snapshot_update: PipelineSnapshotUpdate) -> PipelineSnapshotResponse
Update a snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
The ID of the snapshot to update. |
required |
snapshot_update
|
PipelineSnapshotUpdate
|
The update to apply. |
required |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a snapshot with the same version already exists for the same pipeline. |
RuntimeError
|
If the snapshot update fails. |
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The updated snapshot. |
Source code in src/zenml/zen_stores/sql_zen_store.py
5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 | |
update_stack(stack_id: UUID, stack_update: StackUpdate) -> StackResponse
Update a stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_id
|
UUID
|
The ID of the stack update. |
required |
stack_update
|
StackUpdate
|
The update request on the stack. |
required |
Returns:
| Type | Description |
|---|---|
StackResponse
|
The updated stack. |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
if the stack is a default stack. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 | |
update_stack_component(component_id: UUID, component_update: ComponentUpdate) -> ComponentResponse
Update an existing stack component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
UUID
|
The ID of the stack component to update. |
required |
component_update
|
ComponentUpdate
|
The update to be applied to the stack component. |
required |
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
The updated stack component. |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
if the stack component is a default stack component. |
Source code in src/zenml/zen_stores/sql_zen_store.py
3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 | |
update_tag(tag_id: UUID, tag_update_model: TagUpdate) -> TagResponse
Update tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_id
|
UUID
|
id of the tag to be updated. |
required |
tag_update_model
|
TagUpdate
|
Tag to use for the update. |
required |
Returns:
| Type | Description |
|---|---|
TagResponse
|
An updated tag. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the tag can not be converted to an exclusive tag due to it being associated to multiple entities. |
Source code in src/zenml/zen_stores/sql_zen_store.py
13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 | |
update_trigger(trigger_id: UUID, trigger_update: TriggerUpdate) -> TriggerResponse
Update a trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_id
|
UUID
|
The ID of the trigger update. |
required |
trigger_update
|
TriggerUpdate
|
The update request on the trigger. |
required |
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The updated trigger. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If both a schedule and an event source are provided. |
Source code in src/zenml/zen_stores/sql_zen_store.py
10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 | |
update_user(user_id: UUID, user_update: UserUpdate) -> UserResponse
Updates an existing user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
UUID
|
The id of the user to update. |
required |
user_update
|
UserUpdate
|
The update to be applied to the user. |
required |
Returns:
| Type | Description |
|---|---|
UserResponse
|
The updated user. |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
If the request tries to update the username for the default user account. |
EntityExistsError
|
If the request tries to update the username to a name that is already taken by another user or service account. |
Source code in src/zenml/zen_stores/sql_zen_store.py
11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 | |
verify_service_connector(service_connector_id: UUID, resource_type: Optional[str] = None, resource_id: Optional[str] = None, list_resources: bool = True) -> ServiceConnectorResourcesModel
Verifies if a service connector instance has access to one or more resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to verify. |
required |
resource_type
|
Optional[str]
|
The type of resource to verify access to. |
None
|
resource_id
|
Optional[str]
|
The ID of the resource to verify access to. |
None
|
list_resources
|
bool
|
If True, the list of all resources accessible through the service connector and matching the supplied resource type and ID are returned. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResourcesModel
|
The list of resources that the service connector has access to, |
ServiceConnectorResourcesModel
|
scoped to the supplied resource type and ID, if provided. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 | |
verify_service_connector_config(service_connector: ServiceConnectorRequest, list_resources: bool = True) -> ServiceConnectorResourcesModel
Verifies if a service connector configuration has access to resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector
|
ServiceConnectorRequest
|
The service connector configuration to verify. |
required |
list_resources
|
bool
|
If True, the list of all resources accessible through the service connector is returned. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResourcesModel
|
The list of resources that the service connector configuration has |
ServiceConnectorResourcesModel
|
access to. |
Source code in src/zenml/zen_stores/sql_zen_store.py
9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 | |
SqlZenStoreConfiguration
Bases: StoreConfiguration
SQL ZenML store configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
StoreType
|
The type of the store. |
secrets_store |
Optional[SerializeAsAny[SecretsStoreConfiguration]]
|
The configuration of the secrets store to use. This defaults to a SQL secrets store that extends the SQL ZenML store. |
backup_secrets_store |
Optional[SerializeAsAny[SecretsStoreConfiguration]]
|
The configuration of a backup secrets store to use in addition to the primary one as an intermediate step during the migration to a new secrets store. |
driver |
Optional[SQLDatabaseDriver]
|
The SQL database driver. |
database |
Optional[str]
|
database name. If not already present on the server, it will be created automatically on first access. |
username |
Optional[PlainSerializedSecretStr]
|
The database username. |
password |
Optional[PlainSerializedSecretStr]
|
The database password. |
ssl |
bool
|
Whether to use SSL. |
ssl_ca |
Optional[PlainSerializedSecretStr]
|
certificate authority certificate. Required for SSL enabled authentication if the CA certificate is not part of the certificates shipped by the operating system. |
ssl_cert |
Optional[PlainSerializedSecretStr]
|
client certificate. Required for SSL enabled authentication if client certificates are used. |
ssl_key |
Optional[PlainSerializedSecretStr]
|
client certificate private key. Required for SSL enabled if client certificates are used. |
ssl_verify_server_cert |
bool
|
set to verify the identity of the server against the provided server certificate. |
pool_size |
int
|
The maximum number of connections to keep in the SQLAlchemy pool. |
max_overflow |
int
|
The maximum number of connections to allow in the SQLAlchemy pool in addition to the pool_size. |
pool_pre_ping |
bool
|
Enable emitting a test statement on the SQL connection at the start of each connection pool checkout, to test that the database connection is still viable. |
get_local_url(path: str) -> str
staticmethod
Get a local SQL url for a given local path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path to the local sqlite file. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The local SQL url for the given path. |
Source code in src/zenml/zen_stores/sql_zen_store.py
852 853 854 855 856 857 858 859 860 861 862 | |
get_sqlalchemy_config(database: Optional[str] = None) -> Tuple[URL, Dict[str, Any], Dict[str, Any]]
Get the SQLAlchemy engine configuration for the SQL ZenML store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
database
|
Optional[str]
|
Custom database name to use. If not set, the database name from the configuration will be used. |
None
|
Returns:
| Type | Description |
|---|---|
Tuple[URL, Dict[str, Any], Dict[str, Any]]
|
The URL and connection arguments for the SQLAlchemy engine. |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the SQL driver is not supported. |
Source code in src/zenml/zen_stores/sql_zen_store.py
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 | |
supports_url_scheme(url: str) -> bool
classmethod
Check if a URL scheme is supported by this store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
The URL to check. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the URL scheme is supported, False otherwise. |
Source code in src/zenml/zen_stores/sql_zen_store.py
864 865 866 867 868 869 870 871 872 873 874 | |
validate_secrets_store(secrets_store: Optional[SecretsStoreConfiguration]) -> SecretsStoreConfiguration
classmethod
Ensures that the secrets store is initialized with a default SQL secrets store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secrets_store
|
Optional[SecretsStoreConfiguration]
|
The secrets store config to be validated. |
required |
Returns:
| Type | Description |
|---|---|
SecretsStoreConfiguration
|
The validated secrets store config. |
Source code in src/zenml/zen_stores/sql_zen_store.py
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 | |
Functions
exponential_backoff_with_jitter(attempt: int, base_duration: float = 0.05) -> float
Exponential backoff with jitter.
Implemented the Full jitter algorithm described in
https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
attempt
|
int
|
The backoff attempt. |
required |
base_duration
|
float
|
The backoff base duration. |
0.05
|
Returns:
| Type | Description |
|---|---|
float
|
The backoff duration. |
Source code in src/zenml/zen_stores/sql_zen_store.py
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | |
Modules
template_utils
Utilities for run templates.
Classes
Functions
generate_config_schema(snapshot: PipelineSnapshotSchema, step_configurations: Dict[str, Step]) -> Dict[str, Any]
Generate a run configuration schema for the snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot
|
PipelineSnapshotSchema
|
The snapshot schema. |
required |
step_configurations
|
Dict[str, Step]
|
The step configurations. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The generated schema dictionary. |
Source code in src/zenml/zen_stores/template_utils.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 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 | |
generate_config_template(snapshot: PipelineSnapshotSchema, pipeline_configuration: PipelineConfiguration, step_configurations: Dict[str, Step]) -> Dict[str, Any]
Generate a run configuration template for a snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot
|
PipelineSnapshotSchema
|
The snapshot. |
required |
pipeline_configuration
|
PipelineConfiguration
|
The pipeline configuration. |
required |
step_configurations
|
Dict[str, Step]
|
The step configurations. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The run configuration template. |
Source code in src/zenml/zen_stores/template_utils.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 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
validate_snapshot_is_templatable(snapshot: PipelineSnapshotSchema) -> None
Validate that a snapshot is templatable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot
|
PipelineSnapshotSchema
|
The snapshot to validate. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the snapshot is not templatable. |
Source code in src/zenml/zen_stores/template_utils.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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
zen_store_interface
ZenML Store interface.
Classes
ZenStoreInterface
Bases: ABC
ZenML store interface.
All ZenML stores must implement the methods in this interface.
The methods in this interface are organized in the following way:
-
they are grouped into categories based on the type of resource that they operate on (e.g. stacks, stack components, etc.)
-
each category has a set of CRUD methods (create, read, update, delete) that operate on the resources in that category. The order of the methods in each category should be:
-
create methods - store a new resource. These methods should fill in generated fields (e.g. UUIDs, creation timestamps) in the resource and return the updated resource.
- get methods - retrieve a single existing resource identified by a unique key or identifier from the store. These methods should always return a resource and raise an exception if the resource does not exist.
- list methods - retrieve a list of resources from the store. These methods should accept a set of filter parameters that can be used to filter the list of resources retrieved from the store.
- update methods - update an existing resource in the store. These methods should expect the updated resource to be correctly identified by its unique key or identifier and raise an exception if the resource does not exist.
- delete methods - delete an existing resource from the store. These methods should expect the resource to be correctly identified by its unique key or identifier. If the resource does not exist, an exception should be raised.
Best practices for implementing and keeping this interface clean and easy to maintain and extend:
- keep methods organized by resource type and ordered by CRUD operation
- for resources with multiple keys, don't implement multiple get or list methods here if the same functionality can be achieved by a single get or list method. Instead, implement them in the BaseZenStore class and have them call the generic get or list method in this interface.
- keep the logic required to convert between ZenML domain Model classes and internal store representations outside the ZenML domain Model classes
- methods for resources that have two or more unique keys (e.g. a project
is uniquely identified by its name as well as its UUID) should reflect
that in the method variants and/or method arguments:
- methods that take in a resource identifier as argument should accept
all variants of the identifier (e.g.
project_name_or_uuidfor methods that get/list/update/delete projects) - if a compound key is involved, separate get methods should be
implemented (e.g.
get_pipelineto get a pipeline by ID andget_pipeline_in_projectto get a pipeline by its name and the ID of the project it belongs to)
- methods that take in a resource identifier as argument should accept
all variants of the identifier (e.g.
- methods for resources that are scoped as children of other resources
(e.g. a pipeline is always owned by a project) should reflect the
key(s) of the parent resource in the provided method arguments:
- list methods should feature optional filter arguments that reflect the parent resource key(s)
backup_secrets(ignore_errors: bool = True, delete_secrets: bool = False) -> None
abstractmethod
Backs up all secrets to the configured backup secrets store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ignore_errors
|
bool
|
Whether to ignore individual errors during the backup process and attempt to backup all secrets. |
True
|
delete_secrets
|
bool
|
Whether to delete the secrets that have been successfully backed up from the primary secrets store. Setting this flag effectively moves all secrets from the primary secrets store to the backup secrets store. |
False
|
Raises:
| Type | Description |
|---|---|
BackupSecretsStoreNotConfiguredError
|
if no backup secrets store is configured. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 | |
batch_create_artifact_versions(artifact_versions: List[ArtifactVersionRequest]) -> List[ArtifactVersionResponse]
abstractmethod
Creates a batch of artifact versions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_versions
|
List[ArtifactVersionRequest]
|
The artifact versions to create. |
required |
Returns:
| Type | Description |
|---|---|
List[ArtifactVersionResponse]
|
The created artifact versions. |
Source code in src/zenml/zen_stores/zen_store_interface.py
670 671 672 673 674 675 676 677 678 679 680 681 | |
batch_create_tag_resource(tag_resources: List[TagResourceRequest]) -> List[TagResourceResponse]
abstractmethod
Create a new tag resource relationship.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resources
|
List[TagResourceRequest]
|
The tag resource relationships to be created. |
required |
Returns:
| Type | Description |
|---|---|
List[TagResourceResponse]
|
The newly created tag resource relationships. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 | |
batch_delete_tag_resource(tag_resources: List[TagResourceRequest]) -> None
abstractmethod
Delete a batch of tag resource relationships.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resources
|
List[TagResourceRequest]
|
The tag resource relationships to be deleted. |
required |
Source code in src/zenml/zen_stores/zen_store_interface.py
3297 3298 3299 3300 3301 3302 3303 3304 3305 | |
create_action(action: ActionRequest) -> ActionResponse
abstractmethod
Create an action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
ActionRequest
|
The action to create. |
required |
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The created action. |
Source code in src/zenml/zen_stores/zen_store_interface.py
284 285 286 287 288 289 290 291 292 293 | |
create_api_key(service_account_id: UUID, api_key: APIKeyRequest) -> APIKeyResponse
abstractmethod
Create a new API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to create the API key. |
required |
api_key
|
APIKeyRequest
|
The API key to create. |
required |
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The created API key. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the service account doesn't exist. |
EntityExistsError
|
If an API key with the same name is already configured for the same service account. |
Source code in src/zenml/zen_stores/zen_store_interface.py
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | |
create_artifact(artifact: ArtifactRequest) -> ArtifactResponse
abstractmethod
Creates a new artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact
|
ArtifactRequest
|
The artifact to create. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The newly created artifact. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If an artifact with the same name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
579 580 581 582 583 584 585 586 587 588 589 590 591 | |
create_artifact_version(artifact_version: ArtifactVersionRequest) -> ArtifactVersionResponse
abstractmethod
Creates an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version
|
ArtifactVersionRequest
|
The artifact version to create. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The created artifact version. |
Source code in src/zenml/zen_stores/zen_store_interface.py
657 658 659 660 661 662 663 664 665 666 667 668 | |
create_build(build: PipelineBuildRequest) -> PipelineBuildResponse
abstractmethod
Creates a new build.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build
|
PipelineBuildRequest
|
The build to create. |
required |
Returns:
| Type | Description |
|---|---|
PipelineBuildResponse
|
The newly created build. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If an identical build already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 | |
create_code_repository(code_repository: CodeRepositoryRequest) -> CodeRepositoryResponse
abstractmethod
Creates a new code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository
|
CodeRepositoryRequest
|
Code repository to be created. |
required |
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The newly created code repository. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a code repository with the given name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 | |
create_curated_visualization(visualization: CuratedVisualizationRequest) -> CuratedVisualizationResponse
abstractmethod
Create a new curated visualization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization
|
CuratedVisualizationRequest
|
The curated visualization to create. |
required |
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The created curated visualization. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 | |
create_deployment(deployment: DeploymentRequest) -> DeploymentResponse
abstractmethod
Create a new deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment
|
DeploymentRequest
|
The deployment to create. |
required |
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The newly created deployment. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a deployment with the same name already exists in the same project. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 | |
create_event_source(event_source: EventSourceRequest) -> EventSourceResponse
abstractmethod
Create an event_source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source
|
EventSourceRequest
|
The event_source to create. |
required |
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The created event_source. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 | |
create_flavor(flavor: FlavorRequest) -> FlavorResponse
abstractmethod
Creates a new stack component flavor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor
|
FlavorRequest
|
The stack component flavor to create. |
required |
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The newly created flavor. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a flavor with the same name and type already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 | |
create_model(model: ModelRequest) -> ModelResponse
abstractmethod
Creates a new model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
ModelRequest
|
the Model to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The newly created model. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a model with the given name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 | |
create_model_version(model_version: ModelVersionRequest) -> ModelVersionResponse
abstractmethod
Creates a new model version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version
|
ModelVersionRequest
|
the Model Version to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
The newly created model version. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
EntityExistsError
|
If a model version with the given name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 | |
create_model_version_artifact_link(model_version_artifact_link: ModelVersionArtifactRequest) -> ModelVersionArtifactResponse
abstractmethod
Creates a new model version link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_artifact_link
|
ModelVersionArtifactRequest
|
the Model Version to Artifact Link to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionArtifactResponse
|
The newly created model version to artifact link. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a link with the given name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 | |
create_model_version_pipeline_run_link(model_version_pipeline_run_link: ModelVersionPipelineRunRequest) -> ModelVersionPipelineRunResponse
abstractmethod
Creates a new model version to pipeline run link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_pipeline_run_link
|
ModelVersionPipelineRunRequest
|
the Model Version to Pipeline Run Link to be created. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionPipelineRunResponse
|
|
ModelVersionPipelineRunResponse
|
|
Source code in src/zenml/zen_stores/zen_store_interface.py
3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 | |
create_pipeline(pipeline: PipelineRequest) -> PipelineResponse
abstractmethod
Creates a new pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline
|
PipelineRequest
|
The pipeline to create. |
required |
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The newly created pipeline. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If an identical pipeline already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 | |
create_project(project: ProjectRequest) -> ProjectResponse
abstractmethod
Creates a new project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
ProjectRequest
|
The project to create. |
required |
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The newly created project. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a project with the given name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 | |
create_run_metadata(run_metadata: RunMetadataRequest) -> None
abstractmethod
Creates run metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_metadata
|
RunMetadataRequest
|
The run metadata to create. |
required |
Returns:
| Type | Description |
|---|---|
None
|
None |
Source code in src/zenml/zen_stores/zen_store_interface.py
1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 | |
create_run_step(step_run: StepRunRequest) -> StepRunResponse
abstractmethod
Creates a step run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run
|
StepRunRequest
|
The step run to create. |
required |
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The created step run. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
if the step run already exists. |
KeyError
|
if the pipeline run doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 | |
create_run_template(template: RunTemplateRequest) -> RunTemplateResponse
abstractmethod
Create a new run template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template
|
RunTemplateRequest
|
The template to create. |
required |
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
The newly created template. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a template with the same name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 | |
create_schedule(schedule: ScheduleRequest) -> ScheduleResponse
abstractmethod
Creates a new schedule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule
|
ScheduleRequest
|
The schedule to create. |
required |
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The newly created schedule. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 | |
create_secret(secret: SecretRequest) -> SecretResponse
abstractmethod
Creates a new secret.
The new secret is also validated against the scoping rules enforced in the secrets store:
- only one private secret with the given name can exist.
- only one public secret with the given name can exist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret
|
SecretRequest
|
The secret to create. |
required |
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The newly created secret. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the user does not exist. |
EntityExistsError
|
If a secret with the same name already exists in the same scope. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 | |
create_service(service: ServiceRequest) -> ServiceResponse
abstractmethod
Create a new service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service
|
ServiceRequest
|
The service to create. |
required |
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The newly created service. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a service with the same name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | |
create_service_account(service_account: ServiceAccountRequest) -> ServiceAccountResponse
abstractmethod
Creates a new service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account
|
ServiceAccountRequest
|
Service account to be created. |
required |
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The newly created service account. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a user or service account with the given name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 | |
create_service_connector(service_connector: ServiceConnectorRequest) -> ServiceConnectorResponse
abstractmethod
Creates a new service connector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector
|
ServiceConnectorRequest
|
Service connector to be created. |
required |
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
The newly created service connector. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a service connector with the given name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 | |
create_snapshot(snapshot: PipelineSnapshotRequest) -> PipelineSnapshotResponse
abstractmethod
Creates a new snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot
|
PipelineSnapshotRequest
|
The snapshot to create. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The newly created snapshot. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If an identical snapshot already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 | |
create_stack(stack: StackRequest) -> StackResponse
abstractmethod
Create a new stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack
|
StackRequest
|
The stack to create. |
required |
Returns:
| Type | Description |
|---|---|
StackResponse
|
The created stack. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a stack, stack component or service connector with the same name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 | |
create_stack_component(component: ComponentRequest) -> ComponentResponse
abstractmethod
Create a stack component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component
|
ComponentRequest
|
The stack component to create. |
required |
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
The created stack component. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a stack component with the same name and type already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 | |
create_tag(tag: TagRequest) -> TagResponse
abstractmethod
Creates a new tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
TagRequest
|
the tag to be created. |
required |
Returns:
| Type | Description |
|---|---|
TagResponse
|
The newly created tag. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a tag with the given name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 | |
create_tag_resource(tag_resource: TagResourceRequest) -> TagResourceResponse
abstractmethod
Create a new tag resource relationship.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resource
|
TagResourceRequest
|
The tag resource relationship to be created. |
required |
Returns:
| Type | Description |
|---|---|
TagResourceResponse
|
The newly created tag resource relationship. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 | |
create_trigger(trigger: TriggerRequest) -> TriggerResponse
abstractmethod
Create an trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger
|
TriggerRequest
|
The trigger to create. |
required |
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The created trigger. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 | |
create_user(user: UserRequest) -> UserResponse
abstractmethod
Creates a new user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
UserRequest
|
User to be created. |
required |
Returns:
| Type | Description |
|---|---|
UserResponse
|
The newly created user. |
Raises:
| Type | Description |
|---|---|
EntityExistsError
|
If a user with the given name already exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 | |
delete_action(action_id: UUID) -> None
abstractmethod
Delete an action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
UUID
|
The ID of the action to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the action doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
352 353 354 355 356 357 358 359 360 361 | |
delete_all_model_version_artifact_links(model_version_id: UUID, only_links: bool = True) -> None
abstractmethod
Deletes all model version to artifact links.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
ID of the model version containing the link. |
required |
only_links
|
bool
|
Flag deciding whether to delete only links or all. |
True
|
Source code in src/zenml/zen_stores/zen_store_interface.py
3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 | |
delete_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID]) -> None
abstractmethod
Delete an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to delete the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if an API key with the given name or ID is not configured for the given service account. |
Source code in src/zenml/zen_stores/zen_store_interface.py
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | |
delete_artifact(artifact_id: UUID) -> None
abstractmethod
Deletes an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_id
|
UUID
|
The ID of the artifact to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the artifact doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
644 645 646 647 648 649 650 651 652 653 | |
delete_artifact_version(artifact_version_id: UUID) -> None
abstractmethod
Deletes an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_id
|
UUID
|
The ID of the artifact version to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the artifact version doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
739 740 741 742 743 744 745 746 747 748 | |
delete_authorized_device(device_id: UUID) -> None
abstractmethod
Deletes an OAuth 2.0 authorized device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_id
|
UUID
|
The ID of the device to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no device with the given ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 | |
delete_build(build_id: UUID) -> None
abstractmethod
Deletes a build.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build_id
|
UUID
|
The ID of the build to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the build doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 | |
delete_code_repository(code_repository_id: UUID) -> None
abstractmethod
Deletes a code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository_id
|
UUID
|
The ID of the code repository to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no code repository with the given ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
875 876 877 878 879 880 881 882 883 884 | |
delete_curated_visualization(visualization_id: UUID) -> None
abstractmethod
Delete a curated visualization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization_id
|
UUID
|
The ID of the curated visualization to delete. |
required |
Source code in src/zenml/zen_stores/zen_store_interface.py
1523 1524 1525 1526 1527 1528 1529 | |
delete_deployment(deployment_id: UUID) -> None
abstractmethod
Delete a deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_id
|
UUID
|
The ID of the deployment to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the deployment does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 | |
delete_event_source(event_source_id: UUID) -> None
abstractmethod
Delete an event_source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_id
|
UUID
|
The ID of the event_source to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the event_source doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 | |
delete_flavor(flavor_id: UUID) -> None
abstractmethod
Delete a stack component flavor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_id
|
UUID
|
The ID of the stack component flavor to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the stack component flavor doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 | |
delete_model(model_id: UUID) -> None
abstractmethod
Deletes a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_id
|
UUID
|
id of the model to be deleted. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
model with specified ID not found. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 | |
delete_model_version(model_version_id: UUID) -> None
abstractmethod
Deletes a model version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
id of the model version to be deleted. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
specified ID or name not found. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 | |
delete_model_version_artifact_link(model_version_id: UUID, model_version_artifact_link_name_or_id: Union[str, UUID]) -> None
abstractmethod
Deletes a model version to artifact link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
ID of the model version containing the link. |
required |
model_version_artifact_link_name_or_id
|
Union[str, UUID]
|
name or ID of the model version to artifact link to be deleted. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
specified ID or name not found. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 | |
delete_model_version_pipeline_run_link(model_version_id: UUID, model_version_pipeline_run_link_name_or_id: Union[str, UUID]) -> None
abstractmethod
Deletes a model version to pipeline run link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
ID of the model version containing the link. |
required |
model_version_pipeline_run_link_name_or_id
|
Union[str, UUID]
|
name or ID of the model version to pipeline run link to be deleted. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
specified ID not found. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 | |
delete_pipeline(pipeline_id: UUID) -> None
abstractmethod
Deletes a pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
UUID
|
The ID of the pipeline to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the pipeline doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 | |
delete_project(project_name_or_id: Union[str, UUID]) -> None
abstractmethod
Deletes a project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name_or_id
|
Union[str, UUID]
|
Name or ID of the project to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no project with the given name exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 | |
delete_run(run_id: UUID) -> None
abstractmethod
Deletes a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_id
|
UUID
|
The ID of the pipeline run to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the pipeline run doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 | |
delete_run_template(template_id: UUID) -> None
abstractmethod
Delete a run template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
The ID of the template to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the template does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 | |
delete_schedule(schedule_id: UUID) -> None
abstractmethod
Deletes a schedule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_id
|
UUID
|
The ID of the schedule to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the schedule doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 | |
delete_secret(secret_id: UUID) -> None
abstractmethod
Deletes a secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the secret doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 | |
delete_service(service_id: UUID) -> None
abstractmethod
Delete a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
UUID
|
The ID of the service to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the service doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
566 567 568 569 570 571 572 573 574 575 | |
delete_service_account(service_account_name_or_id: Union[str, UUID]) -> None
abstractmethod
Delete a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_name_or_id
|
Union[str, UUID]
|
The name or the ID of the service account to delete. |
required |
Raises:
| Type | Description |
|---|---|
IllegalOperationError
|
if the service account has already been used to create other resources. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 | |
delete_service_connector(service_connector_id: UUID) -> None
abstractmethod
Deletes a service connector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no service connector with the given ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 | |
delete_snapshot(snapshot_id: UUID) -> None
abstractmethod
Deletes a snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
The ID of the snapshot to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the snapshot doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | |
delete_stack(stack_id: UUID) -> None
abstractmethod
Delete a stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_id
|
UUID
|
The ID of the stack to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the stack doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 | |
delete_stack_component(component_id: UUID) -> None
abstractmethod
Delete a stack component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
UUID
|
The ID of the stack component to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the stack component doesn't exist. |
ValueError
|
if the stack component is part of one or more stacks. |
Source code in src/zenml/zen_stores/zen_store_interface.py
962 963 964 965 966 967 968 969 970 971 972 | |
delete_tag(tag_id: UUID) -> None
abstractmethod
Deletes a tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_id
|
UUID
|
id of the tag to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
specified ID or name not found. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 | |
delete_tag_resource(tag_resource: TagResourceRequest) -> None
abstractmethod
Delete a tag resource relationship.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_resource
|
TagResourceRequest
|
The tag resource relationship to delete. |
required |
Source code in src/zenml/zen_stores/zen_store_interface.py
3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 | |
delete_trigger(trigger_id: UUID) -> None
abstractmethod
Delete an trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_id
|
UUID
|
The ID of the trigger to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the trigger doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 | |
delete_trigger_execution(trigger_execution_id: UUID) -> None
abstractmethod
Delete a trigger execution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_execution_id
|
UUID
|
The ID of the trigger execution to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the trigger execution doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 | |
delete_user(user_name_or_id: Union[str, UUID]) -> None
abstractmethod
Deletes a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name_or_id
|
Union[str, UUID]
|
The name or ID of the user to delete. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no user with the given ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 | |
get_action(action_id: UUID, hydrate: bool = True) -> ActionResponse
abstractmethod
Get an action by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
UUID
|
The ID of the action to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The action. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the action doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | |
get_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID], hydrate: bool = True) -> APIKeyResponse
abstractmethod
Get an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to fetch the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The API key with the given ID. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if an API key with the given name or ID is not configured for the given service account. |
Source code in src/zenml/zen_stores/zen_store_interface.py
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | |
get_artifact(artifact_id: UUID, hydrate: bool = True) -> ArtifactResponse
abstractmethod
Gets an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_id
|
UUID
|
The ID of the artifact to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The artifact. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the artifact doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 | |
get_artifact_version(artifact_version_id: UUID, hydrate: bool = True) -> ArtifactVersionResponse
abstractmethod
Gets an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_id
|
UUID
|
The ID of the artifact version to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The artifact version. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the artifact version doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 | |
get_artifact_visualization(artifact_visualization_id: UUID, hydrate: bool = True) -> ArtifactVisualizationResponse
abstractmethod
Gets an artifact visualization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_visualization_id
|
UUID
|
The ID of the artifact visualization to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ArtifactVisualizationResponse
|
The artifact visualization. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the artifact visualization doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | |
get_authorized_device(device_id: UUID, hydrate: bool = True) -> OAuthDeviceResponse
abstractmethod
Gets a specific OAuth 2.0 authorized device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_id
|
UUID
|
The ID of the device to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
OAuthDeviceResponse
|
The requested device, if it was found. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no device with the given ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 | |
get_build(build_id: UUID, hydrate: bool = True) -> PipelineBuildResponse
abstractmethod
Get a build with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build_id
|
UUID
|
ID of the build. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
PipelineBuildResponse
|
The build. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the build does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 | |
get_code_reference(code_reference_id: UUID, hydrate: bool = True) -> CodeReferenceResponse
abstractmethod
Gets a specific code reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_reference_id
|
UUID
|
The ID of the code reference to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
CodeReferenceResponse
|
The requested code reference, if it was found. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no code reference with the given ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | |
get_code_repository(code_repository_id: UUID, hydrate: bool = True) -> CodeRepositoryResponse
abstractmethod
Gets a specific code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository_id
|
UUID
|
The ID of the code repository to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The requested code repository, if it was found. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no code repository with the given ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 | |
get_curated_visualization(visualization_id: UUID, hydrate: bool = True) -> CuratedVisualizationResponse
abstractmethod
Get a curated visualization by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization_id
|
UUID
|
The ID of the curated visualization to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The curated visualization with the given ID. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 | |
get_deployment(deployment_id: UUID, hydrate: bool = True) -> DeploymentResponse
abstractmethod
Get a deployment with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_id
|
UUID
|
ID of the deployment. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The deployment. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the deployment does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 | |
get_deployment_id() -> UUID
abstractmethod
Get the ID of the deployment.
Returns:
| Type | Description |
|---|---|
UUID
|
The ID of the deployment. |
Source code in src/zenml/zen_stores/zen_store_interface.py
245 246 247 248 249 250 251 | |
get_event_source(event_source_id: UUID, hydrate: bool = True) -> EventSourceResponse
abstractmethod
Get an event_source by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_id
|
UUID
|
The ID of the event_source to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The event_source. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the stack event_source doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 | |
get_flavor(flavor_id: UUID, hydrate: bool = True) -> FlavorResponse
abstractmethod
Get a stack component flavor by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_id
|
UUID
|
The ID of the flavor to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The stack component flavor. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the stack component flavor doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 | |
get_logs(logs_id: UUID, hydrate: bool = True) -> LogsResponse
abstractmethod
Get logs by its unique ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
logs_id
|
UUID
|
The ID of the logs to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
LogsResponse
|
The logs with the given ID. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the logs doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 | |
get_model(model_id: UUID, hydrate: bool = True) -> ModelResponse
abstractmethod
Get an existing model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_id
|
UUID
|
id of the model to be retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The model of interest. |
Raises:
| Type | Description |
|---|---|
KeyError
|
model with specified ID not found. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 | |
get_model_version(model_version_id: UUID, hydrate: bool = True) -> ModelVersionResponse
abstractmethod
Get an existing model version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
name, id, stage or number of the model version to be retrieved. If skipped - latest is retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
The model version of interest. |
Raises:
| Type | Description |
|---|---|
KeyError
|
specified ID or name not found. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 | |
get_or_create_run(pipeline_run: PipelineRunRequest) -> Tuple[PipelineRunResponse, bool]
abstractmethod
Gets or creates a pipeline run.
If a run with the same ID or name already exists, it is returned. Otherwise, a new run is created.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_run
|
PipelineRunRequest
|
The pipeline run to get or create. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The pipeline run, and a boolean indicating whether the run was |
bool
|
created or not. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 | |
get_pipeline(pipeline_id: UUID, hydrate: bool = True) -> PipelineResponse
abstractmethod
Get a pipeline with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
UUID
|
ID of the pipeline. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The pipeline. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the pipeline does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 | |
get_project(project_name_or_id: Union[UUID, str], hydrate: bool = True) -> ProjectResponse
abstractmethod
Get an existing project by name or ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name_or_id
|
Union[UUID, str]
|
Name or ID of the project to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The requested project. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If there is no such project. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 | |
get_run(run_id: UUID, hydrate: bool = True, include_full_metadata: bool = False) -> PipelineRunResponse
abstractmethod
Gets a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_id
|
UUID
|
The ID of the pipeline run to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
include_full_metadata
|
bool
|
If True, include metadata of all steps in the response. |
False
|
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The pipeline run. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the pipeline run doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 | |
get_run_step(step_run_id: UUID, hydrate: bool = True) -> StepRunResponse
abstractmethod
Get a step run by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run_id
|
UUID
|
The ID of the step run to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The step run. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the step run doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 | |
get_run_template(template_id: UUID, hydrate: bool = True) -> RunTemplateResponse
abstractmethod
Get a run template with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
ID of the template. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
The template. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the template does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 | |
get_schedule(schedule_id: UUID, hydrate: bool = True) -> ScheduleResponse
abstractmethod
Get a schedule with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_id
|
UUID
|
ID of the schedule. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The schedule. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the schedule does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 | |
get_secret(secret_id: UUID, hydrate: bool = True) -> SecretResponse
abstractmethod
Get a secret with a given name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
ID of the secret. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The secret. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the secret does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 | |
get_server_settings(hydrate: bool = True) -> ServerSettingsResponse
abstractmethod
Get the server settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ServerSettingsResponse
|
The server settings. |
Source code in src/zenml/zen_stores/zen_store_interface.py
255 256 257 258 259 260 261 262 263 264 265 266 267 | |
get_service(service_id: UUID, hydrate: bool = True) -> ServiceResponse
abstractmethod
Get a service by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
UUID
|
The ID of the service to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The service. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the service doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | |
get_service_account(service_account_name_or_id: Union[str, UUID], hydrate: bool = True) -> ServiceAccountResponse
abstractmethod
Gets a specific service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_name_or_id
|
Union[str, UUID]
|
The name or ID of the service account to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The requested service account, if it was found. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no service account with the given name or ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 | |
get_service_connector(service_connector_id: UUID, hydrate: bool = True, expand_secrets: bool = False) -> ServiceConnectorResponse
abstractmethod
Gets a specific service connector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
expand_secrets
|
bool
|
Flag deciding whether to include the secrets associated with the service connector. |
False
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
The requested service connector, if it was found. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no service connector with the given ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 | |
get_service_connector_client(service_connector_id: UUID, resource_type: Optional[str] = None, resource_id: Optional[str] = None) -> ServiceConnectorResponse
abstractmethod
Get a service connector client for a service connector and given resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the base service connector to use. |
required |
resource_type
|
Optional[str]
|
The type of resource to get a client for. |
None
|
resource_id
|
Optional[str]
|
The ID of the resource to get a client for. |
None
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
A service connector client that can be used to access the given |
ServiceConnectorResponse
|
resource. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no service connector with the given name exists. |
NotImplementError
|
If the service connector cannot be instantiated on the store e.g. due to missing package dependencies. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 | |
get_service_connector_type(connector_type: str) -> ServiceConnectorTypeModel
abstractmethod
Returns the requested service connector type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connector_type
|
str
|
the service connector type identifier. |
required |
Returns:
| Type | Description |
|---|---|
ServiceConnectorTypeModel
|
The requested service connector type. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no service connector type with the given ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 | |
get_snapshot(snapshot_id: UUID, hydrate: bool = True, step_configuration_filter: Optional[List[str]] = None, include_config_schema: Optional[bool] = None) -> PipelineSnapshotResponse
abstractmethod
Get a snapshot with a given ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
ID of the snapshot. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
step_configuration_filter
|
Optional[List[str]]
|
List of step configurations to include in the response. If not given, all step configurations will be included. |
None
|
include_config_schema
|
Optional[bool]
|
Whether to include the config schema in the response. |
None
|
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The snapshot. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the snapshot does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 | |
get_stack(stack_id: UUID, hydrate: bool = True) -> StackResponse
abstractmethod
Get a stack by its unique ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_id
|
UUID
|
The ID of the stack to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
StackResponse
|
The stack with the given ID. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the stack doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 | |
get_stack_component(component_id: UUID, hydrate: bool = True) -> ComponentResponse
abstractmethod
Get a stack component by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
UUID
|
The ID of the stack component to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
The stack component. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the stack component doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 | |
get_stack_deployment_config(provider: StackDeploymentProvider, stack_name: str, location: Optional[str] = None) -> StackDeploymentConfig
abstractmethod
Return the cloud provider console URL and configuration needed to deploy the ZenML stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider
|
StackDeploymentProvider
|
The stack deployment provider. |
required |
stack_name
|
str
|
The name of the stack. |
required |
location
|
Optional[str]
|
The location where the stack should be deployed. |
None
|
Returns:
| Type | Description |
|---|---|
StackDeploymentConfig
|
The cloud provider console URL and configuration needed to deploy |
StackDeploymentConfig
|
the ZenML stack to the specified cloud provider. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 | |
get_stack_deployment_info(provider: StackDeploymentProvider) -> StackDeploymentInfo
abstractmethod
Get information about a stack deployment provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider
|
StackDeploymentProvider
|
The stack deployment provider. |
required |
Returns:
| Type | Description |
|---|---|
StackDeploymentInfo
|
Information about the stack deployment provider. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 | |
get_stack_deployment_stack(provider: StackDeploymentProvider, stack_name: str, location: Optional[str] = None, date_start: Optional[datetime.datetime] = None) -> Optional[DeployedStack]
abstractmethod
Return a matching ZenML stack that was deployed and registered.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider
|
StackDeploymentProvider
|
The stack deployment provider. |
required |
stack_name
|
str
|
The name of the stack. |
required |
location
|
Optional[str]
|
The location where the stack should be deployed. |
None
|
date_start
|
Optional[datetime]
|
The date when the deployment started. |
None
|
Returns:
| Type | Description |
|---|---|
Optional[DeployedStack]
|
The ZenML stack that was deployed and registered or None if the |
Optional[DeployedStack]
|
stack was not found. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 | |
get_store_info() -> ServerModel
abstractmethod
Get information about the store.
Returns:
| Type | Description |
|---|---|
ServerModel
|
Information about the store. |
Source code in src/zenml/zen_stores/zen_store_interface.py
237 238 239 240 241 242 243 | |
get_tag(tag_id: UUID, hydrate: bool = True) -> TagResponse
abstractmethod
Get an existing tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_id
|
UUID
|
id of the tag to be retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
TagResponse
|
The tag of interest. |
Raises:
| Type | Description |
|---|---|
KeyError
|
specified ID or name not found. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 | |
get_trigger(trigger_id: UUID, hydrate: bool = True) -> TriggerResponse
abstractmethod
Get an trigger by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_id
|
UUID
|
The ID of the trigger to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The trigger. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the stack trigger doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 | |
get_trigger_execution(trigger_execution_id: UUID, hydrate: bool = True) -> TriggerExecutionResponse
abstractmethod
Get a trigger execution by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_execution_id
|
UUID
|
The ID of the trigger execution to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
TriggerExecutionResponse
|
The trigger execution. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the trigger execution doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 | |
get_user(user_name_or_id: Optional[Union[str, UUID]] = None, include_private: bool = False, hydrate: bool = True) -> UserResponse
abstractmethod
Gets a specific user, when no id is specified the active user is returned.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name_or_id
|
Optional[Union[str, UUID]]
|
The name or ID of the user to get. |
None
|
include_private
|
bool
|
Whether to include private user information. |
False
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
| Type | Description |
|---|---|
UserResponse
|
The requested user, if it was found. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no user with the given name or ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 | |
list_actions(action_filter_model: ActionFilter, hydrate: bool = False) -> Page[ActionResponse]
abstractmethod
List all actions matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_filter_model
|
ActionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ActionResponse]
|
A list of all actions matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | |
list_api_keys(service_account_id: UUID, filter_model: APIKeyFilter, hydrate: bool = False) -> Page[APIKeyResponse]
abstractmethod
List all API keys for a service account matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to list the API keys. |
required |
filter_model
|
APIKeyFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[APIKeyResponse]
|
A list of all API keys matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | |
list_artifact_versions(artifact_version_filter_model: ArtifactVersionFilter, hydrate: bool = False) -> Page[ArtifactVersionResponse]
abstractmethod
List all artifact versions matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_filter_model
|
ArtifactVersionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ArtifactVersionResponse]
|
A list of all artifact versions matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 | |
list_artifacts(filter_model: ArtifactFilter, hydrate: bool = False) -> Page[ArtifactResponse]
abstractmethod
List all artifacts matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ArtifactFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ArtifactResponse]
|
A list of all artifacts matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 | |
list_authorized_devices(filter_model: OAuthDeviceFilter, hydrate: bool = False) -> Page[OAuthDeviceResponse]
abstractmethod
List all OAuth 2.0 authorized devices for a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
OAuthDeviceFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[OAuthDeviceResponse]
|
A page of all matching OAuth 2.0 authorized devices. |
Source code in src/zenml/zen_stores/zen_store_interface.py
994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 | |
list_builds(build_filter_model: PipelineBuildFilter, hydrate: bool = False) -> Page[PipelineBuildResponse]
abstractmethod
List all builds matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build_filter_model
|
PipelineBuildFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineBuildResponse]
|
A page of all builds matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 | |
list_code_repositories(filter_model: CodeRepositoryFilter, hydrate: bool = False) -> Page[CodeRepositoryResponse]
abstractmethod
List all code repositories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
CodeRepositoryFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[CodeRepositoryResponse]
|
A page of all code repositories. |
Source code in src/zenml/zen_stores/zen_store_interface.py
842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 | |
list_deployments(deployment_filter_model: DeploymentFilter, hydrate: bool = False) -> Page[DeploymentResponse]
abstractmethod
List all deployments matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_filter_model
|
DeploymentFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[DeploymentResponse]
|
A list of all deployments matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 | |
list_event_sources(event_source_filter_model: EventSourceFilter, hydrate: bool = False) -> Page[EventSourceResponse]
abstractmethod
List all event_sources matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_filter_model
|
EventSourceFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[EventSourceResponse]
|
A list of all event_sources matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 | |
list_flavors(flavor_filter_model: FlavorFilter, hydrate: bool = False) -> Page[FlavorResponse]
abstractmethod
List all stack component flavors matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_filter_model
|
FlavorFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[FlavorResponse]
|
List of all the stack component flavors matching the given criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 | |
list_model_version_artifact_links(model_version_artifact_link_filter_model: ModelVersionArtifactFilter, hydrate: bool = False) -> Page[ModelVersionArtifactResponse]
abstractmethod
Get all model version to artifact links by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_artifact_link_filter_model
|
ModelVersionArtifactFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelVersionArtifactResponse]
|
A page of all model version to artifact links. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 | |
list_model_version_pipeline_run_links(model_version_pipeline_run_link_filter_model: ModelVersionPipelineRunFilter, hydrate: bool = False) -> Page[ModelVersionPipelineRunResponse]
abstractmethod
Get all model version to pipeline run links by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_pipeline_run_link_filter_model
|
ModelVersionPipelineRunFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelVersionPipelineRunResponse]
|
A page of all model version to pipeline run links. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 | |
list_model_versions(model_version_filter_model: ModelVersionFilter, hydrate: bool = False) -> Page[ModelVersionResponse]
abstractmethod
Get all model versions by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_filter_model
|
ModelVersionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelVersionResponse]
|
A page of all model versions. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 | |
list_models(model_filter_model: ModelFilter, hydrate: bool = False) -> Page[ModelResponse]
abstractmethod
Get all models by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_filter_model
|
ModelFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ModelResponse]
|
A page of all models. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 | |
list_pipelines(pipeline_filter_model: PipelineFilter, hydrate: bool = False) -> Page[PipelineResponse]
abstractmethod
List all pipelines matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_filter_model
|
PipelineFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineResponse]
|
A list of all pipelines matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 | |
list_projects(project_filter_model: ProjectFilter, hydrate: bool = False) -> Page[ProjectResponse]
abstractmethod
List all projects matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_filter_model
|
ProjectFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ProjectResponse]
|
A list of all projects matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 | |
list_run_steps(step_run_filter_model: StepRunFilter, hydrate: bool = False) -> Page[StepRunResponse]
abstractmethod
List all step runs matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run_filter_model
|
StepRunFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[StepRunResponse]
|
A list of all step runs matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 | |
list_run_templates(template_filter_model: RunTemplateFilter, hydrate: bool = False) -> Page[RunTemplateResponse]
abstractmethod
List all run templates matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_filter_model
|
RunTemplateFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[RunTemplateResponse]
|
A list of all templates matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 | |
list_runs(runs_filter_model: PipelineRunFilter, hydrate: bool = False, include_full_metadata: bool = False) -> Page[PipelineRunResponse]
abstractmethod
List all pipeline runs matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
runs_filter_model
|
PipelineRunFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
include_full_metadata
|
bool
|
If True, include metadata of all steps in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineRunResponse]
|
A list of all pipeline runs matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 | |
list_schedules(schedule_filter_model: ScheduleFilter, hydrate: bool = False) -> Page[ScheduleResponse]
abstractmethod
List all schedules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_filter_model
|
ScheduleFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ScheduleResponse]
|
A list of schedules. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 | |
list_secrets(secret_filter_model: SecretFilter, hydrate: bool = False) -> Page[SecretResponse]
abstractmethod
List all secrets matching the given filter criteria.
Note that returned secrets do not include any secret values. To fetch
the secret values, use get_secret.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_filter_model
|
SecretFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[SecretResponse]
|
A list of all secrets matching the filter criteria, with pagination |
Page[SecretResponse]
|
information and sorted according to the filter criteria. The |
Page[SecretResponse]
|
returned secrets do not include any secret values, only metadata. To |
Page[SecretResponse]
|
fetch the secret values, use |
Page[SecretResponse]
|
secret. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 | |
list_service_accounts(filter_model: ServiceAccountFilter, hydrate: bool = False) -> Page[ServiceAccountResponse]
abstractmethod
List all service accounts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceAccountFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ServiceAccountResponse]
|
A list of filtered service accounts. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 | |
list_service_connector_resources(filter_model: ServiceConnectorFilter) -> List[ServiceConnectorResourcesModel]
abstractmethod
List resources that can be accessed by service connectors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceConnectorFilter
|
The filter model to use when fetching service connectors. |
required |
Returns:
| Type | Description |
|---|---|
List[ServiceConnectorResourcesModel]
|
The matching list of resources that available service |
List[ServiceConnectorResourcesModel]
|
connectors have access to. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 | |
list_service_connector_types(connector_type: Optional[str] = None, resource_type: Optional[str] = None, auth_method: Optional[str] = None) -> List[ServiceConnectorTypeModel]
abstractmethod
Get a list of service connector types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connector_type
|
Optional[str]
|
Filter by connector type. |
None
|
resource_type
|
Optional[str]
|
Filter by resource type. |
None
|
auth_method
|
Optional[str]
|
Filter by authentication method. |
None
|
Returns:
| Type | Description |
|---|---|
List[ServiceConnectorTypeModel]
|
List of service connector types. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 | |
list_service_connectors(filter_model: ServiceConnectorFilter, hydrate: bool = False, expand_secrets: bool = False) -> Page[ServiceConnectorResponse]
abstractmethod
List all service connectors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceConnectorFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
expand_secrets
|
bool
|
Flag deciding whether to include the secrets associated with the service connector. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ServiceConnectorResponse]
|
A page of all service connectors. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 | |
list_services(filter_model: ServiceFilter, hydrate: bool = False) -> Page[ServiceResponse]
abstractmethod
List all services matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_model
|
ServiceFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ServiceResponse]
|
A list of all services matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 | |
list_snapshots(snapshot_filter_model: PipelineSnapshotFilter, hydrate: bool = False) -> Page[PipelineSnapshotResponse]
abstractmethod
List all snapshots matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_filter_model
|
PipelineSnapshotFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[PipelineSnapshotResponse]
|
A page of all snapshots matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 | |
list_stack_components(component_filter_model: ComponentFilter, hydrate: bool = False) -> Page[ComponentResponse]
abstractmethod
List all stack components matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_filter_model
|
ComponentFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[ComponentResponse]
|
A list of all stack components matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 | |
list_stacks(stack_filter_model: StackFilter, hydrate: bool = False) -> Page[StackResponse]
abstractmethod
List all stacks matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_filter_model
|
StackFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[StackResponse]
|
A list of all stacks matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 | |
list_tags(tag_filter_model: TagFilter, hydrate: bool = False) -> Page[TagResponse]
abstractmethod
Get all tags by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_filter_model
|
TagFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[TagResponse]
|
A page of all tags. |
Source code in src/zenml/zen_stores/zen_store_interface.py
3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 | |
list_trigger_executions(trigger_execution_filter_model: TriggerExecutionFilter, hydrate: bool = False) -> Page[TriggerExecutionResponse]
abstractmethod
List all trigger executions matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_execution_filter_model
|
TriggerExecutionFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[TriggerExecutionResponse]
|
A list of all trigger executions matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 | |
list_triggers(trigger_filter_model: TriggerFilter, hydrate: bool = False) -> Page[TriggerResponse]
abstractmethod
List all triggers matching the given filter criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_filter_model
|
TriggerFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[TriggerResponse]
|
A list of all triggers matching the filter criteria. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 | |
list_users(user_filter_model: UserFilter, hydrate: bool = False) -> Page[UserResponse]
abstractmethod
List all users.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_filter_model
|
UserFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
| Type | Description |
|---|---|
Page[UserResponse]
|
A list of all users. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 | |
prune_artifact_versions(project_name_or_id: Union[str, UUID], only_versions: bool = True) -> None
abstractmethod
Prunes unused artifact versions and their artifacts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name_or_id
|
Union[str, UUID]
|
The project name or ID to prune artifact versions for. |
required |
only_versions
|
bool
|
Only delete artifact versions, keeping artifacts |
True
|
Source code in src/zenml/zen_stores/zen_store_interface.py
750 751 752 753 754 755 756 757 758 759 760 761 762 | |
restore_secrets(ignore_errors: bool = False, delete_secrets: bool = False) -> None
abstractmethod
Restore all secrets from the configured backup secrets store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ignore_errors
|
bool
|
Whether to ignore individual errors during the restore process and attempt to restore all secrets. |
False
|
delete_secrets
|
bool
|
Whether to delete the secrets that have been successfully restored from the backup secrets store. Setting this flag effectively moves all secrets from the backup secrets store to the primary secrets store. |
False
|
Raises:
| Type | Description |
|---|---|
BackupSecretsStoreNotConfiguredError
|
if no backup secrets store is configured. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 | |
rotate_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID], rotate_request: APIKeyRotateRequest) -> APIKeyResponse
abstractmethod
Rotate an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to rotate the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to rotate. |
required |
rotate_request
|
APIKeyRotateRequest
|
The rotate request on the API key. |
required |
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The updated API key. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if an API key with the given name or ID is not configured for the given service account. |
Source code in src/zenml/zen_stores/zen_store_interface.py
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | |
run_snapshot(snapshot_id: UUID, run_request: PipelineSnapshotRunRequest) -> PipelineRunResponse
abstractmethod
Run a snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
The ID of the snapshot to run. |
required |
run_request
|
PipelineSnapshotRunRequest
|
Configuration for the run. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The created pipeline run. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 | |
run_template(template_id: UUID, run_configuration: Optional[PipelineRunConfiguration] = None) -> PipelineRunResponse
abstractmethod
Run a template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
The ID of the template to run. |
required |
run_configuration
|
Optional[PipelineRunConfiguration]
|
Configuration for the run. |
None
|
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
Model of the pipeline run. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 | |
update_action(action_id: UUID, action_update: ActionUpdate) -> ActionResponse
abstractmethod
Update an existing action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
UUID
|
The ID of the action to update. |
required |
action_update
|
ActionUpdate
|
The update to be applied to the action. |
required |
Returns:
| Type | Description |
|---|---|
ActionResponse
|
The updated action. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the action doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | |
update_api_key(service_account_id: UUID, api_key_name_or_id: Union[str, UUID], api_key_update: APIKeyUpdate) -> APIKeyResponse
abstractmethod
Update an API key for a service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
UUID
|
The ID of the service account for which to update the API key. |
required |
api_key_name_or_id
|
Union[str, UUID]
|
The name or ID of the API key to update. |
required |
api_key_update
|
APIKeyUpdate
|
The update request on the API key. |
required |
Returns:
| Type | Description |
|---|---|
APIKeyResponse
|
The updated API key. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if an API key with the given name or ID is not configured for the given service account. |
EntityExistsError
|
if the API key update would result in a name conflict with an existing API key for the same service account. |
Source code in src/zenml/zen_stores/zen_store_interface.py
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | |
update_artifact(artifact_id: UUID, artifact_update: ArtifactUpdate) -> ArtifactResponse
abstractmethod
Updates an artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_id
|
UUID
|
The ID of the artifact to update. |
required |
artifact_update
|
ArtifactUpdate
|
The update to be applied to the artifact. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactResponse
|
The updated artifact. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the artifact doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 | |
update_artifact_version(artifact_version_id: UUID, artifact_version_update: ArtifactVersionUpdate) -> ArtifactVersionResponse
abstractmethod
Updates an artifact version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_version_id
|
UUID
|
The ID of the artifact version to update. |
required |
artifact_version_update
|
ArtifactVersionUpdate
|
The update to be applied to the artifact version. |
required |
Returns:
| Type | Description |
|---|---|
ArtifactVersionResponse
|
The updated artifact version. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the artifact version doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 | |
update_authorized_device(device_id: UUID, update: OAuthDeviceUpdate) -> OAuthDeviceResponse
abstractmethod
Updates an existing OAuth 2.0 authorized device for internal use.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_id
|
UUID
|
The ID of the device to update. |
required |
update
|
OAuthDeviceUpdate
|
The update to be applied to the device. |
required |
Returns:
| Type | Description |
|---|---|
OAuthDeviceResponse
|
The updated OAuth 2.0 authorized device. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no device with the given ID exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 | |
update_code_repository(code_repository_id: UUID, update: CodeRepositoryUpdate) -> CodeRepositoryResponse
abstractmethod
Updates an existing code repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code_repository_id
|
UUID
|
The ID of the code repository to update. |
required |
update
|
CodeRepositoryUpdate
|
The update to be applied to the code repository. |
required |
Returns:
| Type | Description |
|---|---|
CodeRepositoryResponse
|
The updated code repository. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no code repository with the given name exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 | |
update_curated_visualization(visualization_id: UUID, visualization_update: CuratedVisualizationUpdate) -> CuratedVisualizationResponse
abstractmethod
Update a curated visualization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visualization_id
|
UUID
|
The ID of the curated visualization to update. |
required |
visualization_update
|
CuratedVisualizationUpdate
|
The update to apply to the curated visualization. |
required |
Returns:
| Type | Description |
|---|---|
CuratedVisualizationResponse
|
The updated curated visualization. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 | |
update_deployment(deployment_id: UUID, deployment_update: DeploymentUpdate) -> DeploymentResponse
abstractmethod
Update a deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment_id
|
UUID
|
The ID of the deployment to update. |
required |
deployment_update
|
DeploymentUpdate
|
The update to apply. |
required |
Returns:
| Type | Description |
|---|---|
DeploymentResponse
|
The updated deployment. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the deployment does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 | |
update_event_source(event_source_id: UUID, event_source_update: EventSourceUpdate) -> EventSourceResponse
abstractmethod
Update an existing event_source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_source_id
|
UUID
|
The ID of the event_source to update. |
required |
event_source_update
|
EventSourceUpdate
|
The update to be applied to the event_source. |
required |
Returns:
| Type | Description |
|---|---|
EventSourceResponse
|
The updated event_source. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the event_source doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 | |
update_flavor(flavor_id: UUID, flavor_update: FlavorUpdate) -> FlavorResponse
abstractmethod
Updates an existing user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flavor_id
|
UUID
|
The id of the flavor to update. |
required |
flavor_update
|
FlavorUpdate
|
The update to be applied to the flavor. |
required |
Returns:
| Type | Description |
|---|---|
FlavorResponse
|
The updated flavor. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 | |
update_model(model_id: UUID, model_update: ModelUpdate) -> ModelResponse
abstractmethod
Updates an existing model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_id
|
UUID
|
UUID of the model to be updated. |
required |
model_update
|
ModelUpdate
|
the Model to be updated. |
required |
Returns:
| Type | Description |
|---|---|
ModelResponse
|
The updated model. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 | |
update_model_version(model_version_id: UUID, model_version_update_model: ModelVersionUpdate) -> ModelVersionResponse
abstractmethod
Get all model versions by filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_version_id
|
UUID
|
The ID of model version to be updated. |
required |
model_version_update_model
|
ModelVersionUpdate
|
The model version to be updated. |
required |
Returns:
| Type | Description |
|---|---|
ModelVersionResponse
|
An updated model version. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the model version not found |
RuntimeError
|
If there is a model version with target stage,
but |
Source code in src/zenml/zen_stores/zen_store_interface.py
3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 | |
update_pipeline(pipeline_id: UUID, pipeline_update: PipelineUpdate) -> PipelineResponse
abstractmethod
Updates a pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
UUID
|
The ID of the pipeline to be updated. |
required |
pipeline_update
|
PipelineUpdate
|
The update to be applied. |
required |
Returns:
| Type | Description |
|---|---|
PipelineResponse
|
The updated pipeline. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the pipeline doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 | |
update_project(project_id: UUID, project_update: ProjectUpdate) -> ProjectResponse
abstractmethod
Update an existing project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_id
|
UUID
|
The ID of the project to be updated. |
required |
project_update
|
ProjectUpdate
|
The update to be applied to the project. |
required |
Returns:
| Type | Description |
|---|---|
ProjectResponse
|
The updated project. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the project does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 | |
update_run(run_id: UUID, run_update: PipelineRunUpdate) -> PipelineRunResponse
abstractmethod
Updates a pipeline run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_id
|
UUID
|
The ID of the pipeline run to update. |
required |
run_update
|
PipelineRunUpdate
|
The update to be applied to the pipeline run. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRunResponse
|
The updated pipeline run. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the pipeline run doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 | |
update_run_step(step_run_id: UUID, step_run_update: StepRunUpdate) -> StepRunResponse
abstractmethod
Updates a step run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_run_id
|
UUID
|
The ID of the step to update. |
required |
step_run_update
|
StepRunUpdate
|
The update to be applied to the step. |
required |
Returns:
| Type | Description |
|---|---|
StepRunResponse
|
The updated step run. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the step run doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 | |
update_run_template(template_id: UUID, template_update: RunTemplateUpdate) -> RunTemplateResponse
abstractmethod
Updates a run template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
UUID
|
The ID of the template to update. |
required |
template_update
|
RunTemplateUpdate
|
The update to apply. |
required |
Returns:
| Type | Description |
|---|---|
RunTemplateResponse
|
The updated template. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the template does not exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 | |
update_schedule(schedule_id: UUID, schedule_update: ScheduleUpdate) -> ScheduleResponse
abstractmethod
Updates a schedule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule_id
|
UUID
|
The ID of the schedule to be updated. |
required |
schedule_update
|
ScheduleUpdate
|
The update to be applied. |
required |
Returns:
| Type | Description |
|---|---|
ScheduleResponse
|
The updated schedule. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the schedule doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 | |
update_secret(secret_id: UUID, secret_update: SecretUpdate) -> SecretResponse
abstractmethod
Updates a secret.
Secret values that are specified as None in the update that are
present in the existing secret are removed from the existing secret.
Values that are present in both secrets are overwritten. All other
values in both the existing secret and the update are kept (merged).
If the update includes a change of name or scope, the scoping rules enforced in the secrets store are used to validate the update:
- only one private secret with the given name can exist.
- only one public secret with the given name can exist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret_id
|
UUID
|
The ID of the secret to be updated. |
required |
secret_update
|
SecretUpdate
|
The update to be applied. |
required |
Returns:
| Type | Description |
|---|---|
SecretResponse
|
The updated secret. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the secret doesn't exist. |
EntityExistsError
|
If a secret with the same name already exists in the same scope. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 | |
update_server_settings(settings_update: ServerSettingsUpdate) -> ServerSettingsResponse
abstractmethod
Update the server settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings_update
|
ServerSettingsUpdate
|
The server settings update. |
required |
Returns:
| Type | Description |
|---|---|
ServerSettingsResponse
|
The updated server settings. |
Source code in src/zenml/zen_stores/zen_store_interface.py
269 270 271 272 273 274 275 276 277 278 279 280 | |
update_service(service_id: UUID, update: ServiceUpdate) -> ServiceResponse
abstractmethod
Update an existing service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
UUID
|
The ID of the service to update. |
required |
update
|
ServiceUpdate
|
The update to be applied to the service. |
required |
Returns:
| Type | Description |
|---|---|
ServiceResponse
|
The updated service. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the service doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 | |
update_service_account(service_account_name_or_id: Union[str, UUID], service_account_update: ServiceAccountUpdate) -> ServiceAccountResponse
abstractmethod
Updates an existing service account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_name_or_id
|
Union[str, UUID]
|
The name or the ID of the service account to update. |
required |
service_account_update
|
ServiceAccountUpdate
|
The update to be applied to the service account. |
required |
Returns:
| Type | Description |
|---|---|
ServiceAccountResponse
|
The updated service account. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no service account with the given name exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 | |
update_service_connector(service_connector_id: UUID, update: ServiceConnectorUpdate) -> ServiceConnectorResponse
abstractmethod
Updates an existing service connector.
The update model contains the fields to be updated. If a field value is set to None in the model, the field is not updated, but there are special rules concerning some fields:
- the
configurationandsecretsfields 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
resource_idfield value is also a full replacement value: if set toNone, the resource ID is removed from the service connector. - the
expiration_secondsfield value is also a full replacement value: if set toNone, the expiration is removed from the service connector. - the
secret_idfield value in the update is ignored, given that secrets are managed internally by the ZenML store. - the
labelsfield 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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to update. |
required |
update
|
ServiceConnectorUpdate
|
The update to be applied to the service connector. |
required |
Returns:
| Type | Description |
|---|---|
ServiceConnectorResponse
|
The updated service connector. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no service connector with the given name exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 | |
update_snapshot(snapshot_id: UUID, snapshot_update: PipelineSnapshotUpdate) -> PipelineSnapshotResponse
abstractmethod
Update a snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot_id
|
UUID
|
The ID of the snapshot to update. |
required |
snapshot_update
|
PipelineSnapshotUpdate
|
The update to apply. |
required |
Returns:
| Type | Description |
|---|---|
PipelineSnapshotResponse
|
The updated snapshot. |
Source code in src/zenml/zen_stores/zen_store_interface.py
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 | |
update_stack(stack_id: UUID, stack_update: StackUpdate) -> StackResponse
abstractmethod
Update a stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack_id
|
UUID
|
The ID of the stack update. |
required |
stack_update
|
StackUpdate
|
The update request on the stack. |
required |
Returns:
| Type | Description |
|---|---|
StackResponse
|
The updated stack. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the stack doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 | |
update_stack_component(component_id: UUID, component_update: ComponentUpdate) -> ComponentResponse
abstractmethod
Update an existing stack component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
UUID
|
The ID of the stack component to update. |
required |
component_update
|
ComponentUpdate
|
The update to be applied to the stack component. |
required |
Returns:
| Type | Description |
|---|---|
ComponentResponse
|
The updated stack component. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the stack component doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 | |
update_tag(tag_id: UUID, tag_update_model: TagUpdate) -> TagResponse
abstractmethod
Update tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_id
|
UUID
|
id of the tag to be updated. |
required |
tag_update_model
|
TagUpdate
|
Tag to use for the update. |
required |
Returns:
| Type | Description |
|---|---|
TagResponse
|
An updated tag. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the tag is not found |
Source code in src/zenml/zen_stores/zen_store_interface.py
3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 | |
update_trigger(trigger_id: UUID, trigger_update: TriggerUpdate) -> TriggerResponse
abstractmethod
Update an existing trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trigger_id
|
UUID
|
The ID of the trigger to update. |
required |
trigger_update
|
TriggerUpdate
|
The update to be applied to the trigger. |
required |
Returns:
| Type | Description |
|---|---|
TriggerResponse
|
The updated trigger. |
Raises:
| Type | Description |
|---|---|
KeyError
|
if the trigger doesn't exist. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 | |
update_user(user_id: UUID, user_update: UserUpdate) -> UserResponse
abstractmethod
Updates an existing user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
UUID
|
The id of the user to update. |
required |
user_update
|
UserUpdate
|
The update to be applied to the user. |
required |
Returns:
| Type | Description |
|---|---|
UserResponse
|
The updated user. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no user with the given name exists. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 | |
verify_service_connector(service_connector_id: UUID, resource_type: Optional[str] = None, resource_id: Optional[str] = None, list_resources: bool = True) -> ServiceConnectorResourcesModel
abstractmethod
Verifies if a service connector instance has access to one or more resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector_id
|
UUID
|
The ID of the service connector to verify. |
required |
resource_type
|
Optional[str]
|
The type of resource to verify access to. |
None
|
resource_id
|
Optional[str]
|
The ID of the resource to verify access to. |
None
|
list_resources
|
bool
|
If True, the list of all resources accessible through the service connector and matching the supplied resource type and ID are returned. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResourcesModel
|
The list of resources that the service connector has access to, |
ServiceConnectorResourcesModel
|
scoped to the supplied resource type and ID, if provided. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no service connector with the given name exists. |
NotImplementError
|
If the service connector cannot be verified e.g. due to missing package dependencies. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 | |
verify_service_connector_config(service_connector: ServiceConnectorRequest, list_resources: bool = True) -> ServiceConnectorResourcesModel
abstractmethod
Verifies if a service connector configuration has access to resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_connector
|
ServiceConnectorRequest
|
The service connector configuration to verify. |
required |
list_resources
|
bool
|
If True, the list of all resources accessible through the service connector is returned. |
True
|
Returns:
| Type | Description |
|---|---|
ServiceConnectorResourcesModel
|
The list of resources that the service connector configuration has |
ServiceConnectorResourcesModel
|
access to. |
Raises:
| Type | Description |
|---|---|
NotImplementError
|
If the service connector cannot be verified on the store e.g. due to missing package dependencies. |
Source code in src/zenml/zen_stores/zen_store_interface.py
2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 | |