Steps
Step ¶
Step(
id,
iteration,
name,
index,
slug,
description=None,
completed=None,
artifacts=None,
step_type=StepType.Step,
text=None,
)
Model a Vectice step.
Steps define the logical sequence of steps required to complete the phase along with their expected outcomes.
Steps belong to an Iteration. The steps created under a Phase are Step Definitions that are then re-used in Iterations to iteratively complete the steps until a satisfactory result is obtained.
📁 phase 1
├── 📄 step definition 1
├── 📄 step definition 2
└── 📄 step definition 3
📁 iteration 1 of phase 1
├── 📄 step 1
├── 📄 step 2
└── 📄 step 3
If steps are added to a phase after iterations have been created and completed, these steps won't appear in these iterations.
Phases and Steps Definitions are created in the Vectice App, Iterations are created from the Vectice Python API.
To complete an iteration's step, you just need to assign a value to it.
To access the step and assign a value, you can use the "slug" of the step:
the slug is the name of the step, transformed to fit Python's naming rules,
and prefixed with step_
. For example, a step called "Clean Dataset" can
be accessed with my_iteration.step_clean_dataset
.
Therefore, to complete a step:
my_clean_dataset = ...
my_iteration.step_clean_dataset = my_clean_dataset
Depending on the step, you can assign it a Model
,
a Dataset
, code source, or attachments.
Vectice users shouldn't need to instantiate Steps manually, but here are the step parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
int
|
The step identifier. |
required |
iteration |
Iteration
|
The iteration to which the step belongs. |
required |
name |
str
|
The name of the step. |
required |
index |
int
|
The index of the step. |
required |
slug |
str
|
The slug of the step. |
required |
description |
str | None
|
The description of the step. |
None
|
completed |
bool | None
|
Deprecated. Whether the step is completed. |
None
|
artifacts |
list[IterationStepArtifact] | None
|
The artifacts linked to the steps. |
None
|
step_type |
StepType
|
The step type. |
StepType.Step
|
text |
str | None
|
The step text. |
None
|
Source code in src/vectice/models/step.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
clean_dataset
writable
property
¶
clean_dataset: Dataset | None
Deprecated. The step's cleaned dataset.
Deprecated.
Assign and retrieve datasets directly to/from steps instead.
Returns:
Type | Description |
---|---|
Dataset | None
|
The step's cleaned dataset, or None. |
completed
property
¶
completed: bool
Whether this step is completed.
Deprecated since 23.1:
Use Iteration.completed
instead,
or simply check that a step has a value / is not None
.
To support previous Vectice versions (22.4), this property will return True if the step was previously marked as complete. For new Vectice versions (23.1+), and steps that haven't been marked as complete, this property returns whether the iteration is completed.
Returns:
Type | Description |
---|---|
bool
|
Whether this step is completed. |
connection
property
¶
connection: Connection
The connection to which this step belongs.
Returns:
Type | Description |
---|---|
Connection
|
The connection to which this step belongs. |
iteration
property
¶
iteration: Iteration
The iteration to which this step belongs.
Returns:
Type | Description |
---|---|
Iteration
|
The iteration to which this step belongs. |
model
writable
property
¶
model: Model | None
modeling_dataset
writable
property
¶
modeling_dataset: Dataset | None
Deprecated. The step's modeling dataset.
Deprecated.
Assign and retrieve datasets directly to/from steps instead.
Returns:
Type | Description |
---|---|
Dataset | None
|
The training set, the test set and the validation set if it exists. |
origin_dataset
writable
property
¶
origin_dataset: Dataset | None
Deprecated. The step's origin dataset.
Deprecated.
Assign and retrieve datasets directly to/from steps instead.
Returns:
Type | Description |
---|---|
Dataset | None
|
The origin dataset, or None if there is none. |
phase
property
¶
phase: Phase
The phase to which this step belongs.
Returns:
Type | Description |
---|---|
Phase
|
The phase to which this step belongs. |
project
property
¶
project: Project
The project to which this step belongs.
Returns:
Type | Description |
---|---|
Project
|
The project to which this step belongs. |
properties
property
¶
properties: dict
The step's name, id, and index.
Returns:
Type | Description |
---|---|
dict
|
A dictionary containing the |
text
property
¶
text: str | None
The step's text.
A string that is stored in the step.
Returns:
Type | Description |
---|---|
str | None
|
The step's text. |
workspace
property
¶
workspace: Workspace
The workspace to which this step belongs.
Returns:
Type | Description |
---|---|
Workspace
|
The workspace to which this step belongs. |
close ¶
close(message=None)
Deprecated. Close the current step, marking it completed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message |
str | None
|
The message to use when closing the step. |
None
|
Source code in src/vectice/models/step.py
535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 |
|
next_step ¶
next_step(message=None)
Deprecated. Advance to the next step.
Close the current step (mark it completed) and return the next step to complete if another open step exists. Otherwise return None.
Note that steps are not currently ordered, and so the concept of "next" is rather arbitrary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message |
str | None
|
The message to use when closing the current step. |
None
|
Returns:
Type | Description |
---|---|
Step | None
|
The next step. |
Source code in src/vectice/models/step.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 |
|