metaflow/tutorials/05-hello-cloud/hello-cloud.ipynb (76 lines of code) (raw):
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Episode 05-hellocloud: Look Mom, We're in the Cloud\n",
"\n",
"### In HellowCloudFlow, the 'start' and 'end' steps were run locally, while the 'hello' step was run remotely on Kubernetes. Since we are using AWS, data artifacts and metadata were stored remotely. This means you can use the client to access information about any flow from anywhere. This notebook shows you how. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Import the metaflow client"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from metaflow import Flow, get_metadata, namespace\n",
"print(\"Current metadata provider: %s\" % get_metadata())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Print the message generated from the flow"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Set namespace to None to search over all namespaces\n",
"namespace(None)\n",
"run = Flow('HelloCloudFlow').latest_successful_run\n",
"print(\"Using run: %s\" % str(run))\n",
"print(run.data.message)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.6 64-bit ('3.10.6')",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
},
"vscode": {
"interpreter": {
"hash": "60d98827d7482d2a0f6aae287a18990d3a1d423e0f66197ec6cdef8a2e07b41f"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}