Using the Stardag Registry Web UI¶
So far we have mostly leveraged stardag to store and retrieve intermediate task outputs (persistent caching) and materialized them with bottom-up, make-style, execution. Next we will leverage the Stardag Registry to, among other things, get some observability of our DAGs execution.
Get setup¶
Go to app.stardag.com and click [Sign In] or [Get Started] and complete the signup.
When signing up, a new personal Workspace with one Environment (main, unless you picked another name) will have been created for you.
Setup your profile and Authenticate¶
Activate the virtual environment where you have stardag installed (or prefix commands with uv run):
You should be redirected to your browser to complete the log in.
Then follow the steps to get your current profile setup. Then list your profiles to verify the setup.
Prerequisites¶
Clone the repo¶
Use the GitHub official CLI. Learn more
Start services locally¶
In your browser, navigate to localhost:3000, click and [Sign In] or [Get Started]. Click [Register] and sign up with a new user. You can use any email and password, e.g. me@localhost and mypass.
When signing up, a new personal Workspace with one Environment (main, unless you picked another name) will have been created for you.
Setup your profile and Authenticate¶
Activate the virtual environment where you have stardag installed (or prefix commands with uv run):
You should be redirected to your browser to complete the log in.
Then follow the steps to get your current profile setup. Then list your profiles to verify the setup.
Build your DAG¶
Now let's build the DAG from the previous example again, but make sure to set get_range's limit argument to something new, so that we need to actually build something (otherwise all tasks will be materialized already from previous runs).
import stardag as sd
@sd.task
def get_range(limit: int) -> list[int]:
return list(range(limit))
@sd.task
def get_sum(integers: sd.Depends[list[int]]) -> int:
return sum(integers)
# Compose the DAG
task = get_sum(integers=get_range(limit=4)) # <-- SET SOME OTHER NUMBER
# Build executes both tasks in the correct order
sd.build(task)
print(task.output().load()) # 10
Now refresh the home page and click the started build.