Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UUIDs to notebook telemetry #34

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions examples/complex_model/complex_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"source": [
"import os\n",
"import time\n",
"import sys"
"import sys\n",
"import uuid"
]
},
{
Expand Down Expand Up @@ -151,7 +152,7 @@
"\n",
"# Set telemetry if opted in\n",
"if enable_telemetry:\n",
" identifier = \"nada-ai-complex-model\" + my_identifier\n",
" identifier = f\"nada-ai-complex-model-{str(uuid.uuid4())}-{my_identifier}\"\n",
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
"\n",
"# Install the lastest SDK and initialise it\n",
Expand Down
5 changes: 3 additions & 2 deletions examples/conv_net/conv_net.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
"source": [
"import os\n",
"import time\n",
"import sys"
"import sys\n",
"import uuid"
]
},
{
Expand Down Expand Up @@ -173,7 +174,7 @@
"\n",
"# Set telemetry if opted in\n",
"if enable_telemetry:\n",
" identifier = \"nada-ai-conv-net\" + my_identifier\n",
" identifier = f\"nada-ai-conv-net-{str(uuid.uuid4())}-{my_identifier}\"\n",
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
"\n",
"# Install the lastest SDK and initialise it\n",
Expand Down
59 changes: 30 additions & 29 deletions examples/linear_regression/linear_regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "o4PXBlE2v_7K",
"outputId": "943693f2-51f8-4685-ea29-07b89b7b876a",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"id": "o4PXBlE2v_7K",
"outputId": "943693f2-51f8-4685-ea29-07b89b7b876a"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m61.0/61.0 kB\u001b[0m \u001b[31m1.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.8/54.8 kB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
Expand All @@ -89,29 +89,30 @@
},
{
"cell_type": "code",
"source": [
"import os\n",
"import time\n",
"import sys"
],
"execution_count": 2,
"metadata": {
"id": "IltP23dY9Wuq"
},
"execution_count": 2,
"outputs": []
"outputs": [],
"source": [
"import os\n",
"import time\n",
"import sys\n",
"import uuid"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"id": "-qsIYfic9X3T"
},
"outputs": [],
"source": [
"# Configure telemetry settings\n",
"enable_telemetry = True #@param {type:\"boolean\"}\n",
"my_identifier = \"your-telemetry-identifier\" #@param {type:\"string\"}"
],
"metadata": {
"id": "-qsIYfic9X3T"
},
"execution_count": 3,
"outputs": []
]
},
{
"cell_type": "code",
Expand All @@ -125,8 +126,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
" Dload Upload Total Spent Left Speed\n",
Expand Down Expand Up @@ -173,7 +174,7 @@
"\n",
"# Set telemetry if opted in\n",
"if enable_telemetry:\n",
" identifier = \"nada-ai-linear-regression\" + my_identifier\n",
" identifier = f\"nada-ai-linear-regression-{str(uuid.uuid4())}-{my_identifier}\"\n",
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
"\n",
"# Install the lastest SDK and initialise it\n",
Expand All @@ -194,8 +195,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"nohup: appending output to 'nohup.out'\n"
]
Expand All @@ -212,16 +213,16 @@
"cell_type": "code",
"execution_count": 6,
"metadata": {
"id": "4teHBr6W5_Mz",
"outputId": "977f6410-431b-4015-be80-f0278df7f058",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"id": "4teHBr6W5_Mz",
"outputId": "977f6410-431b-4015-be80-f0278df7f058"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"Cloning into 'nada-ai'...\n",
"remote: Enumerating objects: 1483, done.\u001b[K\n",
Expand Down Expand Up @@ -273,8 +274,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"Building program: \u001b[1m\u001b[32mlinear_regression\u001b[39m\u001b[0m\n",
"\u001b[1;32mBuild complete!\u001b[0m\n"
Expand All @@ -297,8 +298,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"linear_regression.nada.bin\n"
]
Expand Down Expand Up @@ -343,8 +344,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"Running test: \u001b[1m\u001b[32mlinear_regression\u001b[39m\u001b[0m\n",
"Building ...\n",
Expand Down Expand Up @@ -390,8 +391,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"Getting quote for operation...\n",
"Submitting payment receipt 2 unil, tx hash C9B4C1614E43958E1174F3A8068CB8385B2A72EBD6224381CC0C4039C810D3DD\n",
Expand Down Expand Up @@ -461,4 +462,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
39 changes: 20 additions & 19 deletions examples/neural_net/neural_net.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "o4PXBlE2v_7K",
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "o4PXBlE2v_7K",
"outputId": "4b268ef1-60d7-49df-b9c1-51c4038addd1"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m61.0/61.0 kB\u001b[0m \u001b[31m1.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.8/54.8 kB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
Expand Down Expand Up @@ -97,21 +97,22 @@
"source": [
"import os\n",
"import time\n",
"import sys"
"import sys\n",
"import uuid"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"id": "nQVtynG6_CSG"
},
"outputs": [],
"source": [
"# Configure telemetry settings\n",
"enable_telemetry = True #@param {type:\"boolean\"}\n",
"my_identifier = \"your-telemetry-identifier\" #@param {type:\"string\"}"
],
"metadata": {
"id": "nQVtynG6_CSG"
},
"execution_count": 3,
"outputs": []
]
},
{
"cell_type": "code",
Expand All @@ -125,8 +126,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
" Dload Upload Total Spent Left Speed\n",
Expand Down Expand Up @@ -173,7 +174,7 @@
"\n",
"# Set telemetry if opted in\n",
"if enable_telemetry:\n",
" identifier = \"nada-ai-neural-net\" + my_identifier\n",
" identifier = f\"nada-ai-neural-net-{str(uuid.uuid4())}-{my_identifier}\"\n",
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
"\n",
"# Install the lastest SDK and initialise it\n",
Expand All @@ -194,8 +195,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"nohup: appending output to 'nohup.out'\n"
]
Expand All @@ -212,16 +213,16 @@
"cell_type": "code",
"execution_count": 6,
"metadata": {
"id": "4teHBr6W5_Mz",
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "4teHBr6W5_Mz",
"outputId": "44a9abf7-c3fd-4e46-ad8a-5ca9582fbef0"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"Cloning into 'nada-ai'...\n",
"remote: Enumerating objects: 1483, done.\u001b[K\n",
Expand Down Expand Up @@ -273,8 +274,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"Building program: \u001b[1m\u001b[32mneural_net\u001b[39m\u001b[0m\n",
"\u001b[1;32mBuild complete!\u001b[0m\n"
Expand All @@ -297,8 +298,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"neural_net.nada.bin\n"
]
Expand Down Expand Up @@ -343,8 +344,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"Running test: \u001b[1m\u001b[32mneural_net\u001b[39m\u001b[0m\n",
"Building ...\n",
Expand Down Expand Up @@ -390,8 +391,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"Getting quote for operation...\n",
"Submitting payment receipt 2 unil, tx hash BA58D92BBBC4286DCDFCB0F7D26456C1C3B86FA0EF25B02597EDD7A4D0C0F9C6\n",
Expand Down Expand Up @@ -464,4 +465,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
Loading
Loading