diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 30ca2e8..0d111e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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]"] @@ -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 diff --git a/AI_Postdoc_Workshop/module1/4-algorithms-prompting-with-olmo.ipynb b/AI_Postdoc_Workshop/module1/4-algorithms-prompting-with-olmo.ipynb index 16764d4..238bcb2 100644 --- a/AI_Postdoc_Workshop/module1/4-algorithms-prompting-with-olmo.ipynb +++ b/AI_Postdoc_Workshop/module1/4-algorithms-prompting-with-olmo.ipynb @@ -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", @@ -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", - ")" + "\"\"\")" ] }, { diff --git a/AI_Postdoc_Workshop/module2/2-olmo-chat-rag.ipynb b/AI_Postdoc_Workshop/module2/2-olmo-chat-rag.ipynb index 294c22c..5eaf661 100644 --- a/AI_Postdoc_Workshop/module2/2-olmo-chat-rag.ipynb +++ b/AI_Postdoc_Workshop/module2/2-olmo-chat-rag.ipynb @@ -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", - ")" + "\"\"\")" ] }, { diff --git a/Archive/SciPy2024/module2/2-astrophysics-prompting-with-olmo.ipynb b/Archive/SciPy2024/module2/2-astrophysics-prompting-with-olmo.ipynb index 797bdf2..2ddb5ef 100644 --- a/Archive/SciPy2024/module2/2-astrophysics-prompting-with-olmo.ipynb +++ b/Archive/SciPy2024/module2/2-astrophysics-prompting-with-olmo.ipynb @@ -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", @@ -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", - ")" + "\"\"\")" ] }, { diff --git a/Archive/SciPy2024/module3/1-olmo-chat-rag.ipynb b/Archive/SciPy2024/module3/1-olmo-chat-rag.ipynb index 6fde82d..072853c 100644 --- a/Archive/SciPy2024/module3/1-olmo-chat-rag.ipynb +++ b/Archive/SciPy2024/module3/1-olmo-chat-rag.ipynb @@ -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", - ")" + "\"\"\")" ] }, { diff --git a/demos/olmo-rag/index.ipynb b/demos/olmo-rag/index.ipynb index 6a51657..943f583 100644 --- a/demos/olmo-rag/index.ipynb +++ b/demos/olmo-rag/index.ipynb @@ -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", - ")" + "\"\"\")" ] }, { diff --git a/resources/download_data.py b/resources/download_data.py index 0fdc122..415e0eb 100644 --- a/resources/download_data.py +++ b/resources/download_data.py @@ -1,5 +1,4 @@ import ssec_tutorials - if __name__ == "__main__": ssec_tutorials.download_all_tutorial_data()