Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .agents/recipes/docs-and-references/recipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Audit documentation freshness - docstrings vs signatures, broken li
trigger: schedule
tool: claude-code
timeout_minutes: 20
max_turns: 30
max_turns: 50
permissions:
contents: write
---
Expand Down
31 changes: 19 additions & 12 deletions .github/workflows/agentic-ci-issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,25 @@ 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
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" -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
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ 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_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:
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/models/default-model-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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` | Vision and image understanding | `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
Expand Down
4 changes: 4 additions & 0 deletions docs/notebook_source/4-providing-images-as-context.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@

# %%
config_builder = dd.DataDesignerConfigBuilder()
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
Expand Down
7 changes: 6 additions & 1 deletion docs/notebook_source/5-generating-images.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#

# %%
import os

from IPython.display import Image as IPImage
from IPython.display import display

Expand Down Expand Up @@ -272,7 +274,10 @@
#

# %%
results = data_designer.create(config_builder, num_records=2, dataset_name="tutorial-5-images")
create_num_records = 2
if MODEL_ID == "black-forest-labs/flux.2-pro":
create_num_records = int(os.environ.get("DATA_DESIGNER_FLUX_2_PRO_CREATE_NUM_RECORDS") or create_num_records)
results = data_designer.create(config_builder, num_records=create_num_records, dataset_name="tutorial-5-images")

# %%
dataset = results.load_dataset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

# %%
import base64
import os
from pathlib import Path

from IPython.display import Image as IPImage
Expand Down Expand Up @@ -244,7 +245,10 @@ 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 = 5
if MODEL_ID == "black-forest-labs/flux.2-pro":
create_num_records = int(os.environ.get("DATA_DESIGNER_FLUX_2_PRO_CREATE_NUM_RECORDS") or create_num_records)
results = data_designer.create(config_builder, num_records=create_num_records, dataset_name="tutorial-6-edited-images")

# %%
dataset = results.load_dataset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"}},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
21 changes: 19 additions & 2 deletions scripts/health_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,21 @@
)
from data_designer.interface import DataDesigner

MAX_ATTEMPTS = 3
PROVIDER_API_KEY_ENV_VARS = {
NVIDIA_PROVIDER_NAME: NVIDIA_API_KEY_ENV_VAR_NAME,
OPENAI_PROVIDER_NAME: OPENAI_API_KEY_ENV_VAR_NAME,
OPENROUTER_PROVIDER_NAME: OPENROUTER_API_KEY_ENV_VAR_NAME,
}
RETRYABLE_ERROR_NAMES = {
"ModelAPIConnectionError",
"ModelAPIError",
"ModelInternalServerError",
"ModelRequestAdmissionTimeoutError",
"ModelRateLimitError",
"ModelTimeoutError",
"TimeoutError",
}


def _get_provider(provider_name: str) -> dd.ModelProvider:
Expand Down Expand Up @@ -88,8 +98,15 @@ 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 Exception as exc:
if type(exc).__name__ not in RETRYABLE_ERROR_NAMES or attempt == MAX_ATTEMPTS:
raise
print(f"RETRY {provider_name}/{model_type} (attempt {attempt + 1}/{MAX_ATTEMPTS})")
Comment thread
andreatgretel marked this conversation as resolved.
Outdated


def main() -> int:
Expand Down
Loading