Skip to content

Commit 1aa0d5a

Browse files
authored
Merge pull request #208 from comet-ml/dsb/update-notebooks
Update notebooks to use %pip and comet_ml.login()
2 parents f399ec8 + b7f858d commit 1aa0d5a

6 files changed

+15
-48
lines changed

notebooks/Comet-Python-API.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"metadata": {},
3232
"outputs": [],
3333
"source": [
34-
"%pip install -U \"comet_ml>=3.44.0\""
34+
"%pip install comet_ml"
3535
]
3636
},
3737
{

notebooks/Comet_Custom_Panels_for_Object_Detection.ipynb

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"outputId": "126c0c65-0781-4a7c-e3f1-6b00af076838"
2424
},
2525
"source": [
26-
"!pip install comet_ml"
26+
"%pip install comet_ml"
2727
],
2828
"execution_count": null,
2929
"outputs": [
@@ -71,20 +71,10 @@
7171
},
7272
"source": [
7373
"import comet_ml\n",
74-
"import getpass, os\n",
75-
"\n",
76-
"os.environ[\"COMET_API_KEY\"] = getpass.getpass(\"Paste your COMET API KEY: \")"
74+
"comet_ml.login()"
7775
],
7876
"execution_count": null,
79-
"outputs": [
80-
{
81-
"output_type": "stream",
82-
"text": [
83-
"Paste your COMET API KEY: ··········\n"
84-
],
85-
"name": "stdout"
86-
}
87-
]
77+
"outputs": []
8878
},
8979
{
9080
"cell_type": "code",

notebooks/Comet_Logging_Curves.ipynb

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"id": "Tx5C-o8hy0y6"
2121
},
2222
"source": [
23-
"!pip install comet_ml"
23+
"%pip install comet_ml"
2424
],
2525
"execution_count": null,
2626
"outputs": []
@@ -36,20 +36,10 @@
3636
},
3737
"source": [
3838
"import comet_ml\n",
39-
"import getpass, os\n",
40-
"\n",
41-
"os.environ[\"COMET_API_KEY\"] = getpass.getpass(\"Paste your COMET API KEY: \")"
39+
"comet_ml.login()"
4240
],
4341
"execution_count": null,
44-
"outputs": [
45-
{
46-
"output_type": "stream",
47-
"text": [
48-
"Paste your COMET API KEY: ··········\n"
49-
],
50-
"name": "stdout"
51-
}
52-
]
42+
"outputs": []
5343
},
5444
{
5545
"cell_type": "code",

notebooks/Comet_Tensorflow_Model_Analysis.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"id": "TMTwnEtTHXE6"
2020
},
2121
"source": [
22-
"!pip install -U pip"
22+
"%pip install -U pip"
2323
],
2424
"execution_count": null,
2525
"outputs": []
@@ -30,7 +30,7 @@
3030
"id": "dWTbGtU2HkZA"
3131
},
3232
"source": [
33-
"!pip install tensorflow-model-analysis"
33+
"%pip install tensorflow-model-analysis"
3434
],
3535
"execution_count": null,
3636
"outputs": []
@@ -41,7 +41,7 @@
4141
"id": "l2pryucSqLOS"
4242
},
4343
"source": [
44-
"!pip install comet_ml"
44+
"%pip install comet_ml"
4545
],
4646
"execution_count": null,
4747
"outputs": []
@@ -52,7 +52,6 @@
5252
"id": "tMFDWlcEHmEo"
5353
},
5454
"source": [
55-
"import getpass, os\n",
5655
"import comet_ml\n",
5756
"import tensorflow_model_analysis as tfma"
5857
],
@@ -65,7 +64,7 @@
6564
"id": "yYhrTG1kffZB"
6665
},
6766
"source": [
68-
"os.environ[\"COMET_API_KEY\"] = getpass.getpass(\"Paste your COMET API KEY: \")"
67+
"comet_ml.login()"
6968
],
7069
"execution_count": null,
7170
"outputs": []

notebooks/Comet_Visualizations_to_Debug_CNNs.ipynb

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"outputId": "6878478a-055d-42bc-c7cf-584012b724fd"
2525
},
2626
"source": [
27-
"!pip install comet_ml"
27+
"%pip install comet_ml"
2828
],
2929
"execution_count": null,
3030
"outputs": [
@@ -63,20 +63,10 @@
6363
},
6464
"source": [
6565
"import comet_ml\n",
66-
"import getpass, os\n",
67-
"\n",
68-
"os.environ[\"COMET_API_KEY\"] = getpass.getpass(\"Paste your COMET API KEY: \")"
66+
"comet_ml.login()"
6967
],
7068
"execution_count": null,
71-
"outputs": [
72-
{
73-
"output_type": "stream",
74-
"text": [
75-
"Paste your COMET API KEY: ··········\n"
76-
],
77-
"name": "stdout"
78-
}
79-
]
69+
"outputs": []
8070
},
8171
{
8272
"cell_type": "code",

notebooks/Comet_and_Vega.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
},
3232
"source": [
3333
"import comet_ml\n",
34-
"import getpass, os\n",
35-
"\n",
36-
"os.environ[\"COMET_API_KEY\"] = getpass.getpass(\"Paste your COMET API KEY: \")"
34+
"comet_ml.login()"
3735
],
3836
"execution_count": null,
3937
"outputs": []

0 commit comments

Comments
 (0)