Skip to content

Commit 6c54261

Browse files
committed
Format notebooks
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
1 parent 3631a10 commit 6c54261

10 files changed

Lines changed: 3329 additions & 3314 deletions

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,6 @@ target-version = "py310"
7070
[tool.ruff.lint]
7171
select = ["E", "F", "I", "N", "W", "UP"]
7272
ignore = []
73+
74+
[tool.ruff.lint.per-file-ignores]
75+
"*.ipynb" = ["E501"]

usage-cookbook/Llama-Nemotron-Super-49B-v1.5/nim_tool_calling_cookbook.ipynb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"source": [
103103
"import json\n",
104104
"import os\n",
105+
"\n",
105106
"from dotenv import load_dotenv\n",
106107
"from openai import OpenAI\n",
107108
"\n",
@@ -115,7 +116,7 @@
115116
" raise RuntimeError(\"Set NVIDIA_API_KEY in your environment or .env before running this cell.\")\n",
116117
"\n",
117118
"client = OpenAI(api_key=api_key, base_url=NIM_BASE_URL)\n",
118-
"print(f\"Client ready for {MODEL_ID}\")\n"
119+
"print(f\"Client ready for {MODEL_ID}\")"
119120
]
120121
},
121122
{
@@ -160,6 +161,7 @@
160161
" \"wind_kph\": forecast[\"wind_kph\"],\n",
161162
" }\n",
162163
"\n",
164+
"\n",
163165
"tools = [\n",
164166
" {\n",
165167
" \"type\": \"function\",\n",
@@ -183,7 +185,7 @@
183185
" },\n",
184186
" },\n",
185187
" }\n",
186-
"]\n"
188+
"]"
187189
]
188190
},
189191
{
@@ -288,14 +290,11 @@
288290
"\n",
289291
"\n",
290292
"final_completion = client.chat.completions.create(\n",
291-
" model=MODEL_ID,\n",
292-
" messages=messages,\n",
293-
" temperature=0.2,\n",
294-
" max_tokens=512\n",
293+
" model=MODEL_ID, messages=messages, temperature=0.2, max_tokens=512\n",
295294
")\n",
296295
"final_message = final_completion.choices[0].message\n",
297296
"print(\"\\nFinal model answer:\\n\")\n",
298-
"print(final_message.content)\n"
297+
"print(final_message.content)"
299298
]
300299
},
301300
{

usage-cookbook/Llama-Nemotron-Super-49B-v1.5/sglang_api_cookbook.ipynb

Lines changed: 775 additions & 768 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)