Documentation Index
Fetch the complete documentation index at: https://docs.vectorshift.ai/llms.txt
Use this file to discover all available pages before exploring further.
from vectorshift.pipeline import Pipeline, BumpLevel
# Create a pipeline to demonstrate version management
# pipeline = Pipeline.new(name="revert_manage_example_12345")
# inp = pipeline.add(name="input_0", id="input_0").input(input_type="string")
# out = pipeline.add(name="output_0", id="output_0").output(
# output_type="string", value=inp.text
# )
# pipeline.save(deploy=True)
pipeline = Pipeline.fetch(name="revert_manage_example_12345")
print("PIPELINE CREATED")
# Save new versions with bumps
pipeline.save(bump=BumpLevel.MINOR, description="version 0.1.0")
pipeline.save(bump=BumpLevel.MINOR, description="version 0.2.0")
print("VERSIONS SAVED")
# Revert to an earlier version
result = pipeline.revert(version="0.6.2")
print(f"REVERTED TO VERSION 0.1.0: {result}")
# Move to a folder (replace with a real folder ID)
result = pipeline.move_to_folder(folder_id="69c28367535a2a4abd668606")
print(f"Move: {result}")
# # Remove a node by name
result = pipeline.remove_node(node_name="output_0")
# print(f"Remove node: {result}")
Source:
examples/pipelines/revert_and_manage.py in the SDK repo.