Skip to content

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 property

completed

Whether this iteration is completed.

Returns:

Type Description
bool

Whether the iteration is completed.

connection property

connection

The connection to which this iteration belongs.

Returns:

Type Description
Connection

The connection to which this iteration belongs.

description property writable

description

The iteration's description.

Returns:

Type Description
str | None

The iteration's description.

id property writable

id

The iteration's identifier.

Returns:

Type Description
str

The iteration's identifier.

index property

index

The iteration's index.

Returns:

Type Description
int

The iteration's index.

name property writable

name

The iteration's name.

Returns:

Type Description
str

The iteration's name.

phase property

phase

The phase to which this iteration belongs.

Returns:

Type Description
Phase

The phase to which this iteration belongs.

project property

project

The project to which this iteration belongs.

Returns:

Type Description
Project

The project to which this iteration belongs.

properties property

properties

The iteration's identifier, index and name.

Returns:

Type Description
dict[str, int | str]

A dictionary containing the id, index and name items.

status property

status

The iteration's status.

Returns:

Type Description
str

The iteration's status.

workspace property

workspace

The workspace to which this iteration belongs.

Returns:

Type Description
Workspace

The workspace to which this iteration belongs.

cancel

cancel()

Cancel the iteration.

complete

complete()

Mark the iteration as completed.

delete

delete()

Permanently deletes the iteration.

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.

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()

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

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

update

update(name=None, description=None)

Update the Iteration from the API.

Parameters:

Name Type Description Default
name str | None

The new name of the iteration.

None
description str | None

The new description of the iteration.

None

Returns:

Type Description
None

None