diff --git a/.agents/recipes/docs-and-references/recipe.md b/.agents/recipes/docs-and-references/recipe.md index 3658e8178..b93b7eeb9 100644 --- a/.agents/recipes/docs-and-references/recipe.md +++ b/.agents/recipes/docs-and-references/recipe.md @@ -3,8 +3,8 @@ name: docs-and-references description: Audit documentation freshness - docstrings vs signatures, broken links, architecture refs, docs site content accuracy trigger: schedule tool: claude-code -timeout_minutes: 20 -max_turns: 30 +timeout_minutes: 40 +max_turns: 50 permissions: contents: write --- diff --git a/.github/workflows/agentic-ci-issue-triage.yml b/.github/workflows/agentic-ci-issue-triage.yml index 4594ea8da..598d027bb 100644 --- a/.github/workflows/agentic-ci-issue-triage.yml +++ b/.github/workflows/agentic-ci-issue-triage.yml @@ -55,18 +55,27 @@ jobs: echo "Claude CLI version: $(claude --version 2>&1 || true)" if [ -n "$ANTHROPIC_BASE_URL" ] && [ -n "$ANTHROPIC_API_KEY" ]; then - HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ - --max-time 30 \ - -X POST "${ANTHROPIC_BASE_URL}/v1/messages" \ - -H "Content-Type: application/json" \ - -H "x-api-key: ${ANTHROPIC_API_KEY}" \ - -H "anthropic-version: 2023-06-01" \ - -d "{\"model\":\"${AGENTIC_CI_MODEL}\",\"max_tokens\":5,\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}]}") - if [ "$HTTP_CODE" -lt 200 ] || [ "$HTTP_CODE" -ge 300 ]; then - echo "::error::API pre-flight failed with HTTP ${HTTP_CODE}" - exit 1 - fi - echo "API pre-flight passed (HTTP ${HTTP_CODE})" + for ATTEMPT in 1 2 3; do + if ! HTTP_CODE=$(curl -sS -o /dev/null -w "%{http_code}" \ + --max-time 30 \ + -X POST "${ANTHROPIC_BASE_URL}/v1/messages" \ + -H "Content-Type: application/json" \ + -H "x-api-key: ${ANTHROPIC_API_KEY}" \ + -H "anthropic-version: 2023-06-01" \ + -d "{\"model\":\"${AGENTIC_CI_MODEL}\",\"max_tokens\":5,\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}]}"); then + HTTP_CODE="000" + fi + if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then + echo "API pre-flight passed (HTTP ${HTTP_CODE})" + break + fi + if [ "$ATTEMPT" = "3" ]; then + echo "::error::API pre-flight failed with HTTP ${HTTP_CODE}" + exit 1 + fi + echo "API pre-flight failed with HTTP ${HTTP_CODE}; retrying (${ATTEMPT}/3)" + sleep $((ATTEMPT * 10)) + done fi - name: Run issue triage recipe diff --git a/.github/workflows/build-notebooks.yml b/.github/workflows/build-notebooks.yml index 610c7aac8..9ac8818ab 100644 --- a/.github/workflows/build-notebooks.yml +++ b/.github/workflows/build-notebooks.yml @@ -87,7 +87,12 @@ jobs: echo "No previous successful run found, proceeding without cache" fi - name: Convert and execute notebooks - run: make convert-execute-notebooks ${{ inputs.use_cache && 'USE_CACHE=1' || '' }} + run: | + if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then + export DATA_DESIGNER_SKIP_NVIDIA_VISION_HEALTH_CHECK=1 + export DATA_DESIGNER_FLUX_2_PRO_CREATE_NUM_RECORDS=2 + fi + make convert-execute-notebooks ${{ inputs.use_cache && 'USE_CACHE=1' || '' }} - name: Upload notebooks as artifacts uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: diff --git a/docs/colab_notebooks/4-providing-images-as-context.ipynb b/docs/colab_notebooks/4-providing-images-as-context.ipynb index 17cc4f0d9..188b40567 100644 --- a/docs/colab_notebooks/4-providing-images-as-context.ipynb +++ b/docs/colab_notebooks/4-providing-images-as-context.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "4ca15f91", + "id": "6cf6b900", "metadata": { "nemo_colab_inject": true }, @@ -12,7 +12,7 @@ }, { "cell_type": "markdown", - "id": "2cd80b1e", + "id": "9336f640", "metadata": {}, "source": [ "# 🎨 Data Designer Tutorial: Providing Images as Context for Vision-Based Data Generation" @@ -20,7 +20,7 @@ }, { "cell_type": "markdown", - "id": "f4907fbd", + "id": "439d7fec", "metadata": {}, "source": [ "#### 📚 What you'll learn\n", @@ -37,7 +37,7 @@ }, { "cell_type": "markdown", - "id": "64041401", + "id": "e3b8eb25", "metadata": {}, "source": [ "### 📦 Import Data Designer\n", @@ -49,7 +49,7 @@ }, { "cell_type": "markdown", - "id": "a272a017", + "id": "8d8e8db6", "metadata": { "nemo_colab_inject": true }, @@ -62,7 +62,7 @@ { "cell_type": "code", "execution_count": null, - "id": "786e739e", + "id": "43eba549", "metadata": { "nemo_colab_inject": true }, @@ -75,7 +75,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c71603f7", + "id": "d4430cdf", "metadata": { "nemo_colab_inject": true }, @@ -95,13 +95,14 @@ { "cell_type": "code", "execution_count": null, - "id": "798b74f0", + "id": "39965c9f", "metadata": {}, "outputs": [], "source": [ "# Standard library imports\n", "import base64\n", "import io\n", + "import os\n", "import uuid\n", "\n", "# Third-party imports\n", @@ -118,7 +119,7 @@ }, { "cell_type": "markdown", - "id": "fcc79cd5", + "id": "091fe0ae", "metadata": {}, "source": [ "### ⚙️ Initialize the Data Designer interface\n", @@ -131,7 +132,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d0c5ad95", + "id": "aec3b66d", "metadata": {}, "outputs": [], "source": [ @@ -140,7 +141,7 @@ }, { "cell_type": "markdown", - "id": "dde957c8", + "id": "cc437623", "metadata": {}, "source": [ "### 🏗️ Initialize the Data Designer Config Builder\n", @@ -155,16 +156,21 @@ { "cell_type": "code", "execution_count": null, - "id": "ed9f9c8d", + "id": "70641660", "metadata": {}, "outputs": [], "source": [ - "config_builder = dd.DataDesignerConfigBuilder()" + "config_builder = dd.DataDesignerConfigBuilder()\n", + "if os.environ.get(\"DATA_DESIGNER_SKIP_NVIDIA_VISION_HEALTH_CHECK\"):\n", + " for model_config in config_builder.model_configs:\n", + " if model_config.alias == \"nvidia-vision\":\n", + " model_config.skip_health_check = True\n", + " break" ] }, { "cell_type": "markdown", - "id": "1cfa8352", + "id": "d46b40e2", "metadata": {}, "source": [ "### 🌱 Seed Dataset Creation\n", @@ -181,7 +187,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ad5dcc9e", + "id": "69a574fc", "metadata": {}, "outputs": [], "source": [ @@ -196,7 +202,7 @@ { "cell_type": "code", "execution_count": null, - "id": "94f73f6a", + "id": "af034de4", "metadata": {}, "outputs": [], "source": [ @@ -241,7 +247,7 @@ { "cell_type": "code", "execution_count": null, - "id": "641d0d6f", + "id": "8edc7072", "metadata": {}, "outputs": [], "source": [ @@ -259,7 +265,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4cc6da4d", + "id": "c8dc4c96", "metadata": {}, "outputs": [], "source": [ @@ -269,7 +275,7 @@ { "cell_type": "code", "execution_count": null, - "id": "82d962de", + "id": "f993932b", "metadata": {}, "outputs": [], "source": [ @@ -280,7 +286,7 @@ }, { "cell_type": "markdown", - "id": "5a8fcb53", + "id": "7c8ac017", "metadata": {}, "source": [ "### 🧩 Media context and model capabilities\n", @@ -317,7 +323,7 @@ { "cell_type": "code", "execution_count": null, - "id": "571b94a9", + "id": "1ea97eea", "metadata": {}, "outputs": [], "source": [ @@ -339,7 +345,7 @@ }, { "cell_type": "markdown", - "id": "f591a975", + "id": "c2975763", "metadata": {}, "source": [ "### 🔁 Iteration is key – preview the dataset!\n", @@ -356,7 +362,7 @@ { "cell_type": "code", "execution_count": null, - "id": "25cdbea4", + "id": "44a36e82", "metadata": {}, "outputs": [], "source": [ @@ -366,7 +372,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6a2e9028", + "id": "e8c1e22a", "metadata": {}, "outputs": [], "source": [ @@ -377,7 +383,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f29e5a7a", + "id": "db06e0d0", "metadata": {}, "outputs": [], "source": [ @@ -387,7 +393,7 @@ }, { "cell_type": "markdown", - "id": "48dd0ead", + "id": "5d9f8a3a", "metadata": {}, "source": [ "### 📊 Analyze the generated data\n", @@ -400,7 +406,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e0570168", + "id": "afafea71", "metadata": {}, "outputs": [], "source": [ @@ -410,7 +416,7 @@ }, { "cell_type": "markdown", - "id": "95fa4cea", + "id": "b215ce02", "metadata": {}, "source": [ "### 🔎 Visual Inspection\n", @@ -421,7 +427,7 @@ { "cell_type": "code", "execution_count": null, - "id": "622d3d4a", + "id": "e520ad19", "metadata": { "lines_to_next_cell": 2 }, @@ -445,7 +451,7 @@ }, { "cell_type": "markdown", - "id": "a4e4b2ee", + "id": "12830a2d", "metadata": {}, "source": [ "### 🆙 Scale up!\n", @@ -458,7 +464,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1fa4a946", + "id": "400f74d8", "metadata": {}, "outputs": [], "source": [ @@ -468,7 +474,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cbdb22bc", + "id": "1ad0695d", "metadata": {}, "outputs": [], "source": [ @@ -481,7 +487,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e3c86efa", + "id": "3dc2ec79", "metadata": {}, "outputs": [], "source": [ @@ -493,7 +499,7 @@ }, { "cell_type": "markdown", - "id": "2ac40b13", + "id": "d82cf6ec", "metadata": {}, "source": [ "## ⏭️ Next Steps\n", diff --git a/docs/colab_notebooks/5-generating-images.ipynb b/docs/colab_notebooks/5-generating-images.ipynb index e907b2306..a3326bdfe 100644 --- a/docs/colab_notebooks/5-generating-images.ipynb +++ b/docs/colab_notebooks/5-generating-images.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "41cc395b", + "id": "65b9060b", "metadata": { "nemo_colab_inject": true }, @@ -12,7 +12,7 @@ }, { "cell_type": "markdown", - "id": "65a1403f", + "id": "c4e6e092", "metadata": {}, "source": [ "# 🎨 Data Designer Tutorial: Generating Images\n", @@ -34,7 +34,7 @@ }, { "cell_type": "markdown", - "id": "99092733", + "id": "ee4483fa", "metadata": {}, "source": [ "### 📦 Import Data Designer\n", @@ -45,7 +45,7 @@ }, { "cell_type": "markdown", - "id": "27603893", + "id": "51d483c7", "metadata": { "nemo_colab_inject": true }, @@ -58,7 +58,7 @@ { "cell_type": "code", "execution_count": null, - "id": "049d408e", + "id": "d7ee52dd", "metadata": { "nemo_colab_inject": true }, @@ -71,7 +71,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9c0ada32", + "id": "a03b4341", "metadata": { "nemo_colab_inject": true }, @@ -91,7 +91,7 @@ { "cell_type": "code", "execution_count": null, - "id": "573231fe", + "id": "c4cef742", "metadata": {}, "outputs": [], "source": [ @@ -104,7 +104,7 @@ }, { "cell_type": "markdown", - "id": "b76f8b4f", + "id": "9994e661", "metadata": {}, "source": [ "### ⚙️ Initialize the Data Designer interface\n", @@ -115,7 +115,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3c9ffd7e", + "id": "b9e690ca", "metadata": {}, "outputs": [], "source": [ @@ -124,7 +124,7 @@ }, { "cell_type": "markdown", - "id": "30d99324", + "id": "6282186e", "metadata": {}, "source": [ "### 🎛️ Define an image-generation model\n", @@ -136,7 +136,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b52705fe", + "id": "ca6a0ecd", "metadata": {}, "outputs": [], "source": [ @@ -158,7 +158,7 @@ }, { "cell_type": "markdown", - "id": "0c79ffa0", + "id": "a22bd450", "metadata": {}, "source": [ "### 🏗️ Build the config: samplers + image column\n", @@ -169,7 +169,7 @@ { "cell_type": "code", "execution_count": null, - "id": "35ce3240", + "id": "3a2ab6b4", "metadata": {}, "outputs": [], "source": [ @@ -342,7 +342,7 @@ }, { "cell_type": "markdown", - "id": "32fe1130", + "id": "c6b03426", "metadata": {}, "source": [ "### 🔁 Preview: images as base64\n", @@ -353,7 +353,7 @@ { "cell_type": "code", "execution_count": null, - "id": "640e2498", + "id": "8c5e3afa", "metadata": {}, "outputs": [], "source": [ @@ -363,7 +363,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8960fa65", + "id": "06fb8cf0", "metadata": {}, "outputs": [], "source": [ @@ -374,7 +374,7 @@ { "cell_type": "code", "execution_count": null, - "id": "16529a8f", + "id": "26d5d669", "metadata": {}, "outputs": [], "source": [ @@ -383,7 +383,7 @@ }, { "cell_type": "markdown", - "id": "1d4b0823", + "id": "f455461f", "metadata": {}, "source": [ "### 🆙 Create: images saved to disk\n", @@ -394,7 +394,7 @@ { "cell_type": "code", "execution_count": null, - "id": "71adee62", + "id": "345863d9", "metadata": {}, "outputs": [], "source": [ @@ -404,7 +404,7 @@ { "cell_type": "code", "execution_count": null, - "id": "63b805cd", + "id": "8d1e9d64", "metadata": {}, "outputs": [], "source": [ @@ -415,7 +415,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a23e2639", + "id": "93412fe3", "metadata": {}, "outputs": [], "source": [ @@ -431,7 +431,7 @@ }, { "cell_type": "markdown", - "id": "3aa170d3", + "id": "06313d5d", "metadata": {}, "source": [ "## ⏭️ Next steps\n", diff --git a/docs/colab_notebooks/6-editing-images-with-image-context.ipynb b/docs/colab_notebooks/6-editing-images-with-image-context.ipynb index 456dee007..453cfdb01 100644 --- a/docs/colab_notebooks/6-editing-images-with-image-context.ipynb +++ b/docs/colab_notebooks/6-editing-images-with-image-context.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "f0129425", + "id": "4d4097ae", "metadata": { "nemo_colab_inject": true }, @@ -12,7 +12,7 @@ }, { "cell_type": "markdown", - "id": "7679a185", + "id": "1b2fa378", "metadata": {}, "source": [ "# 🎨 Data Designer Tutorial: Image-to-Image Editing\n", @@ -34,7 +34,7 @@ }, { "cell_type": "markdown", - "id": "98800984", + "id": "76ab2f1d", "metadata": {}, "source": [ "### 📦 Import Data Designer\n", @@ -45,7 +45,7 @@ }, { "cell_type": "markdown", - "id": "07011c0c", + "id": "fb13df5a", "metadata": { "nemo_colab_inject": true }, @@ -58,7 +58,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87b72634", + "id": "4d3c7bd4", "metadata": { "nemo_colab_inject": true }, @@ -71,7 +71,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c02362d5", + "id": "ddc1cb9f", "metadata": { "nemo_colab_inject": true }, @@ -91,11 +91,12 @@ { "cell_type": "code", "execution_count": null, - "id": "a42350a9", + "id": "a1c0e995", "metadata": {}, "outputs": [], "source": [ "import base64\n", + "import os\n", "from pathlib import Path\n", "\n", "from IPython.display import Image as IPImage\n", @@ -107,7 +108,7 @@ }, { "cell_type": "markdown", - "id": "7d2bb57c", + "id": "d2aae9f3", "metadata": {}, "source": [ "### ⚙️ Initialize the Data Designer interface\n", @@ -118,7 +119,7 @@ { "cell_type": "code", "execution_count": null, - "id": "efecc41d", + "id": "eb203020", "metadata": {}, "outputs": [], "source": [ @@ -127,7 +128,7 @@ }, { "cell_type": "markdown", - "id": "20487d6b", + "id": "af277728", "metadata": {}, "source": [ "### 🎛️ Define an image model\n", @@ -143,7 +144,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1620aad6", + "id": "bd413e69", "metadata": {}, "outputs": [], "source": [ @@ -165,7 +166,7 @@ }, { "cell_type": "markdown", - "id": "61e068dc", + "id": "30f05284", "metadata": {}, "source": [ "### 🏗️ Build the configuration\n", @@ -180,7 +181,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f588c739", + "id": "5b232c75", "metadata": {}, "outputs": [], "source": [ @@ -278,7 +279,7 @@ }, { "cell_type": "markdown", - "id": "546cd814", + "id": "bdd659bb", "metadata": {}, "source": [ "### 🔁 Preview: quick iteration\n", @@ -289,7 +290,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dd78a63e", + "id": "7d871dd9", "metadata": {}, "outputs": [], "source": [ @@ -299,7 +300,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0f1fb781", + "id": "11ea7ad8", "metadata": {}, "outputs": [], "source": [ @@ -310,7 +311,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3ad5dd10", + "id": "688a8e70", "metadata": {}, "outputs": [], "source": [ @@ -319,7 +320,7 @@ }, { "cell_type": "markdown", - "id": "da4fd095", + "id": "d32c8b50", "metadata": { "lines_to_next_cell": 2 }, @@ -332,7 +333,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5de6b9db", + "id": "bed933f1", "metadata": {}, "outputs": [], "source": [ @@ -363,7 +364,7 @@ { "cell_type": "code", "execution_count": null, - "id": "468787e5", + "id": "5e3a7307", "metadata": {}, "outputs": [], "source": [ @@ -373,7 +374,7 @@ }, { "cell_type": "markdown", - "id": "61600f2e", + "id": "53086140", "metadata": {}, "source": [ "### 🆙 Create at scale\n", @@ -384,17 +385,22 @@ { "cell_type": "code", "execution_count": null, - "id": "70a9db40", + "id": "098794da", "metadata": {}, "outputs": [], "source": [ - "results = data_designer.create(config_builder, num_records=5, dataset_name=\"tutorial-6-edited-images\")" + "create_num_records = int(os.environ.get(\"DATA_DESIGNER_FLUX_2_PRO_CREATE_NUM_RECORDS\", \"5\"))\n", + "results = data_designer.create(\n", + " config_builder,\n", + " num_records=create_num_records,\n", + " dataset_name=\"tutorial-6-edited-images\",\n", + ")" ] }, { "cell_type": "code", "execution_count": null, - "id": "1c5e0413", + "id": "d5d5b777", "metadata": {}, "outputs": [], "source": [ @@ -405,7 +411,7 @@ { "cell_type": "code", "execution_count": null, - "id": "62643434", + "id": "985122f0", "metadata": {}, "outputs": [], "source": [ @@ -415,7 +421,7 @@ }, { "cell_type": "markdown", - "id": "eb965144", + "id": "1128a296", "metadata": {}, "source": [ "## ⏭️ Next steps\n", diff --git a/docs/notebook_source/4-providing-images-as-context.py b/docs/notebook_source/4-providing-images-as-context.py index 402246403..6f987a29d 100644 --- a/docs/notebook_source/4-providing-images-as-context.py +++ b/docs/notebook_source/4-providing-images-as-context.py @@ -40,6 +40,7 @@ # Standard library imports import base64 import io +import os import uuid # Third-party imports @@ -76,6 +77,11 @@ # %% config_builder = dd.DataDesignerConfigBuilder() +if os.environ.get("DATA_DESIGNER_SKIP_NVIDIA_VISION_HEALTH_CHECK"): + for model_config in config_builder.model_configs: + if model_config.alias == "nvidia-vision": + model_config.skip_health_check = True + break # %% [markdown] # ### 🌱 Seed Dataset Creation diff --git a/docs/notebook_source/6-editing-images-with-image-context.py b/docs/notebook_source/6-editing-images-with-image-context.py index 211f1e761..cfe655be3 100644 --- a/docs/notebook_source/6-editing-images-with-image-context.py +++ b/docs/notebook_source/6-editing-images-with-image-context.py @@ -39,6 +39,7 @@ # %% import base64 +import os from pathlib import Path from IPython.display import Image as IPImage @@ -244,7 +245,12 @@ def display_before_after(row, index: int, base_path: Path | None = None) -> None # # %% -results = data_designer.create(config_builder, num_records=5, dataset_name="tutorial-6-edited-images") +create_num_records = int(os.environ.get("DATA_DESIGNER_FLUX_2_PRO_CREATE_NUM_RECORDS", "5")) +results = data_designer.create( + config_builder, + num_records=create_num_records, + dataset_name="tutorial-6-edited-images", +) # %% dataset = results.load_dataset() diff --git a/fern/versions/latest/pages/concepts/models/default-model-settings.mdx b/fern/versions/latest/pages/concepts/models/default-model-settings.mdx index ff8377b71..8b73c5575 100644 --- a/fern/versions/latest/pages/concepts/models/default-model-settings.mdx +++ b/fern/versions/latest/pages/concepts/models/default-model-settings.mdx @@ -49,7 +49,7 @@ The following model configurations are automatically available when `NVIDIA_API_ | `nvidia-text` | `nvidia/nemotron-3-nano-30b-a3b` | General text generation | `temperature=1.0, top_p=1.0` | | `nvidia-reasoning` | `nvidia/nemotron-3-super-120b-a12b` | Reasoning and analysis tasks | `temperature=1.0, top_p=0.95, extra_body={"reasoning_effort": "medium"}` | | `nvidia-vision` | `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning` | Omni multimodal understanding for image, audio, and video inputs | `temperature=0.60, top_p=0.95` | -| `nvidia-embedding` | `nvidia/llama-3.2-nv-embedqa-1b-v2` | Text embeddings | `encoding_format="float", extra_body={"input_type": "query"}` | +| `nvidia-embedding` | `nvidia/llama-nemotron-embed-1b-v2` | Text embeddings | `encoding_format="float", extra_body={"input_type": "query"}` | ### OpenAI Models diff --git a/fern/versions/latest/pages/concepts/models/model-configs.mdx b/fern/versions/latest/pages/concepts/models/model-configs.mdx index 647fece16..90834e8ff 100644 --- a/fern/versions/latest/pages/concepts/models/model-configs.mdx +++ b/fern/versions/latest/pages/concepts/models/model-configs.mdx @@ -101,7 +101,7 @@ model_configs = [ # Embedding tasks dd.ModelConfig( alias="embedding_model", - model="nvidia/llama-3.2-nv-embedqa-1b-v2", + model="nvidia/llama-nemotron-embed-1b-v2", provider="nvidia", inference_parameters=dd.EmbeddingInferenceParams( encoding_format="float", diff --git a/packages/data-designer-config/src/data_designer/config/utils/constants.py b/packages/data-designer-config/src/data_designer/config/utils/constants.py index db450e872..d7b3391e2 100644 --- a/packages/data-designer-config/src/data_designer/config/utils/constants.py +++ b/packages/data-designer-config/src/data_designer/config/utils/constants.py @@ -360,7 +360,7 @@ class NordColor(Enum): "inference_parameters": NEMOTRON_3_NANO_OMNI_30B_A3B_REASONING_INFERENCE_PARAMS, }, "embedding": { - "model": "nvidia/llama-3.2-nv-embedqa-1b-v2", + "model": "nvidia/llama-nemotron-embed-1b-v2", "inference_parameters": DEFAULT_EMBEDDING_INFERENCE_PARAMS | {"extra_body": {"input_type": "query"}}, }, }, diff --git a/packages/data-designer-config/tests/config/test_default_model_settings.py b/packages/data-designer-config/tests/config/test_default_model_settings.py index 24c98af51..dc5f03107 100644 --- a/packages/data-designer-config/tests/config/test_default_model_settings.py +++ b/packages/data-designer-config/tests/config/test_default_model_settings.py @@ -65,7 +65,7 @@ def test_get_builtin_model_configs(): assert builtin_model_configs[2].model == "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning" assert builtin_model_configs[2].provider == "nvidia" assert builtin_model_configs[3].alias == "nvidia-embedding" - assert builtin_model_configs[3].model == "nvidia/llama-3.2-nv-embedqa-1b-v2" + assert builtin_model_configs[3].model == "nvidia/llama-nemotron-embed-1b-v2" assert builtin_model_configs[3].provider == "nvidia" assert builtin_model_configs[4].alias == "openai-text" assert builtin_model_configs[4].model == "gpt-4.1" diff --git a/scripts/health_checks.py b/scripts/health_checks.py index c4956f14f..118ea68c8 100644 --- a/scripts/health_checks.py +++ b/scripts/health_checks.py @@ -14,6 +14,7 @@ import os import sys +import time import traceback from pathlib import Path from tempfile import TemporaryDirectory @@ -29,8 +30,12 @@ PREDEFINED_PROVIDERS, PREDEFINED_PROVIDERS_MODEL_MAP, ) +from data_designer.engine.models.errors import RETRYABLE_MODEL_ERRORS from data_designer.interface import DataDesigner +MAX_ATTEMPTS = 3 +RETRY_BACKOFF_SECONDS = 5 +HEALTH_CHECK_RETRYABLE_ERRORS = RETRYABLE_MODEL_ERRORS + (TimeoutError,) PROVIDER_API_KEY_ENV_VARS = { NVIDIA_PROVIDER_NAME: NVIDIA_API_KEY_ENV_VAR_NAME, OPENAI_PROVIDER_NAME: OPENAI_API_KEY_ENV_VAR_NAME, @@ -88,8 +93,20 @@ def _check_model(provider_name: str, model_type: str) -> None: model_config = _get_model_config(provider_name, model_type) config_builder = _build_check_config(model_config, model_type) - with TemporaryDirectory(prefix="data-designer-health-check-") as temp_dir: - DataDesigner(artifact_path=Path(temp_dir), model_providers=[provider]).check_models(config_builder) + for attempt in range(1, MAX_ATTEMPTS + 1): + try: + with TemporaryDirectory(prefix="data-designer-health-check-") as temp_dir: + DataDesigner(artifact_path=Path(temp_dir), model_providers=[provider]).check_models(config_builder) + return + except HEALTH_CHECK_RETRYABLE_ERRORS as exc: + if attempt == MAX_ATTEMPTS: + raise + delay = attempt * RETRY_BACKOFF_SECONDS + print( + f"RETRY {provider_name}/{model_type} after {type(exc).__name__}: {exc} " + f"(attempt {attempt + 1}/{MAX_ATTEMPTS}, sleeping {delay}s)" + ) + time.sleep(delay) def main() -> int: