Iterations
Iteration ¶
Represents a Vectice iteration.
An iteration is a recurring work cycle within a phase, primarily used for logging assets (models, datasets, graphs and notes) to document your work and maintain transparency throughout an AI project.
By organizing work into iterations, you can share your key assets, make informed decisions based on previous work, and automatically track and document your progress.
Each iteration may include sections for organizing assets together, contributing to a more structured narrative to share your work in the way you want.
Typical usage example:
# Create a new iteration within a phase
iteration = phase.create_iteration()
# Log a dataset to the iteration
iteration.log(my_dataset)
# Log a model to the iteration with optional section assignment
iteration.log(my_model, section="Modeling")
You can create sections dynamically using the API.
To create a new iteration:
iteration = phase.create_iteration()
completed ¶
completed()
Whether this iteration is completed.
Returns:
Type | Description |
---|---|
bool
|
Whether the iteration is completed. |
connection ¶
connection()
The connection to which this iteration belongs.
Returns:
Type | Description |
---|---|
Connection
|
The connection to which this iteration belongs. |
delete_asset ¶
delete_asset(asset)
Delete an asset from the iteration. This action is irreversible, and the deleted assets cannot be recovered.
asset: The asset Vectice ID, filename or table name.
iteration.delete_asset(asset="MDV-XXXX")
delete_assets_from_iteration ¶
delete_assets_from_iteration()
Delete all assets from the iteration. This action is irreversible, and the deleted assets cannot be recovered.
iteration.delete_assets_from_iteration()
delete_assets_in_section ¶
delete_assets_in_section(section)
Delete assets within a specified section of the iteration. This action is irreversible, and the deleted assets cannot be recovered.
iteration.delete_assets_in_section(section="Collect Initial Data")
Parameters:
Name | Type | Description | Default |
---|---|---|---|
section
|
str
|
The iteration's section where the assets are displayed in the Vectice App. |
required |
delete_assets_without_a_section ¶
delete_assets_without_a_section()
Delete assets without a section of the iteration. This action is irreversible, and the deleted assets cannot be recovered.
iteration.delete_assets_without_a_section()
download_attachments ¶
download_attachments(attachments=None, output_dir=None)
Downloads a list of attachments associated with the current iteration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
attachments
|
list[str] | str | None
|
A list of attachment file names or a single attachment file name to be downloaded. If None, all attachments will be downloaded. |
None
|
output_dir
|
str | None
|
The directory path where the attachments will be saved. If None, the current working directory is used. |
None
|
Returns:
Type | Description |
---|---|
None
|
None |
get_table ¶
get_table(table)
Retrieves a table associated with the current iteration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
str
|
The name of the table. |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
The data from the specified table as a DataFrame. |
id ¶
id(iteration_id)
Set the iteration's identifier.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
iteration_id
|
str
|
The identifier. |
required |
list_assets ¶
list_assets()
Retrieves a list of assets associated with the iteration.
Returns:
Type | Description |
---|---|
list[IterationAssetRepresentation]
|
list[IterationAssetRepresentation]: A list of IterationAssetRepresentation objects representing the assets associated with the iteration. |
list_attachments ¶
list_attachments()
Lists all the attachments (tables, files, pickle...) of the Iteration.
Returns:
Type | Description |
---|---|
list[Attachment]
|
The attachments list. |
list_phase_requirements ¶
list_phase_requirements()
Deprecation Notice
list_phase_requirements
is deprecated. Use print_phase_requirements
instead.
Prints a list of phase requirements in a tabular format, limited to the first 10 requirements. A link is provided to view the remaining requirements.
Returns:
Type | Description |
---|---|
None
|
None |
list_sections ¶
list_sections()
Deprecation Notice
list_sections
is deprecated. Use print_sections
instead.
Prints a list of sections belonging to the iteration in a tabular format, limited to the first 10 sections. A link is provided to view the remaining sections.
Returns:
Type | Description |
---|---|
None
|
None |
log ¶
log(asset, section=None)
Log an asset to an iteration. Assets can be organized into sections for improved clarity within the iteration.
from vectice import Model
my_model = Model(name="my_model")
iteration.log(my_model)
iteration.log("my note")
Parameters:
Name | Type | Description | Default |
---|---|---|---|
asset
|
Any
|
The asset to log to an iteration. Assets can include notes, images, Vectice datasets, or Vectice models. |
required |
section
|
Optional
|
The iteration's section where the asset will be displayed in the Vectice App. Assets without sections are logged in the iteration itself. |
None
|
phase ¶
phase()
The phase to which this iteration belongs.
Returns:
Type | Description |
---|---|
Phase
|
The phase to which this iteration belongs. |
print_phase_requirements ¶
print_phase_requirements()
Prints a list of phase requirements in a tabular format, limited to the first 10 requirements. A link is provided to view the remaining requirements.
Returns:
Type | Description |
---|---|
None
|
None |
print_sections ¶
print_sections()
Prints a list of sections belonging to the iteration in a tabular format, limited to the first 10 sections. A link is provided to view the remaining sections.
Returns:
Type | Description |
---|---|
None
|
None |
project ¶
project()
The project to which this iteration belongs.
Returns:
Type | Description |
---|---|
Project
|
The project to which this iteration belongs. |
properties ¶
properties()
update ¶
update(name=None, description=None)
Update the Iteration from the API.
name: The new name of the iteration.
description: The new description of the iteration.
Returns:
Type | Description |
---|---|
None
|
None |