Skip to content
Open
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
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ repos:
# - tags
# - slideshow
# - --
- repo: https://github.com/psf/black
rev: 24.10.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.1.0
hooks:
- id: black
- id: black-jupyter

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
rev: "v6.0.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -50,14 +50,14 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.4"
rev: "v0.14.14"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/abravalheri/validate-pyproject
rev: "v0.23"
rev: "v0.25"
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]
Expand All @@ -70,13 +70,13 @@ repos:
args: [--prose-wrap=always]

- repo: https://github.com/codespell-project/codespell
rev: "v2.3.0"
rev: "v2.4.1"
hooks:
- id: codespell
args: ["-L", "precessing"]

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.30.0"
rev: "0.36.1"
hooks:
- id: check-dependabot
- id: check-github-workflows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,10 @@
"source": [
"# Test the prompt you want to send to OLMo.\n",
"question = \"What is the best method for multiplying large numbers?\"\n",
"input_content = textwrap.dedent(\n",
" f\"\"\"\\\n",
"input_content = textwrap.dedent(f\"\"\"\\\n",
" You are an algorithms expert. Please answer the following question on algorithms.\n",
" Question: {question}\n",
"\"\"\"\n",
")\n",
"\"\"\")\n",
"input_messages = [\n",
" {\n",
" \"role\": \"user\",\n",
Expand Down Expand Up @@ -271,13 +269,11 @@
"metadata": {},
"outputs": [],
"source": [
"input_prompt_template = textwrap.dedent(\n",
" \"\"\"\\\n",
"input_prompt_template = textwrap.dedent(\"\"\"\\\n",
"{instruction}\n",
"\n",
"Question: {question}\n",
"\"\"\"\n",
")"
"\"\"\")"
]
},
{
Expand Down
6 changes: 2 additions & 4 deletions AI_Postdoc_Workshop/module2/2-olmo-chat-rag.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,13 @@
"metadata": {},
"outputs": [],
"source": [
"input_prompt_template = textwrap.dedent(\n",
" \"\"\"\\\n",
"input_prompt_template = textwrap.dedent(\"\"\"\\\n",
"You are an algorithms expert. Please answer the question on algorithms based on the following context:\n",
"\n",
"{context}\n",
"\n",
"Question: {question}\n",
"\"\"\"\n",
")"
"\"\"\")"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,10 @@
"source": [
"# Test the prompt you want to send to OLMo.\n",
"question = \"What is dark matter?\"\n",
"input_content = textwrap.dedent(\n",
" f\"\"\"\\\n",
"input_content = textwrap.dedent(f\"\"\"\\\n",
" You are an astrophysics expert. Please answer the following question on astrophysics.\n",
" Question: {question}\n",
"\"\"\"\n",
")\n",
"\"\"\")\n",
"input_messages = [\n",
" {\n",
" \"role\": \"user\",\n",
Expand Down Expand Up @@ -330,13 +328,11 @@
"metadata": {},
"outputs": [],
"source": [
"input_prompt_template = textwrap.dedent(\n",
" \"\"\"\\\n",
"input_prompt_template = textwrap.dedent(\"\"\"\\\n",
"{instruction}\n",
"\n",
"Question: {question}\n",
"\"\"\"\n",
")"
"\"\"\")"
]
},
{
Expand Down
6 changes: 2 additions & 4 deletions Archive/SciPy2024/module3/1-olmo-chat-rag.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,13 @@
"metadata": {},
"outputs": [],
"source": [
"input_prompt_template = textwrap.dedent(\n",
" \"\"\"\\\n",
"input_prompt_template = textwrap.dedent(\"\"\"\\\n",
"You are an astrophysics expert. Please answer the question on astrophysics based on the following context:\n",
"\n",
"{context}\n",
"\n",
"Question: {question}\n",
"\"\"\"\n",
")"
"\"\"\")"
]
},
{
Expand Down
6 changes: 2 additions & 4 deletions demos/olmo-rag/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -806,15 +806,13 @@
"metadata": {},
"outputs": [],
"source": [
"input_prompt_template = textwrap.dedent(\n",
" \"\"\"\\\n",
"input_prompt_template = textwrap.dedent(\"\"\"\\\n",
"You are an astrophysics expert. Please answer the question on astrophysics based on the following context:\n",
"\n",
"{context}\n",
"\n",
"Question: {question}\n",
"\"\"\"\n",
")"
"\"\"\")"
]
},
{
Expand Down
1 change: 0 additions & 1 deletion resources/download_data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ssec_tutorials


if __name__ == "__main__":
ssec_tutorials.download_all_tutorial_data()