Skip to content

Add Azure Foundry fine-tuning skill and cross-agent skill wiring#27

Open
amangupta26 wants to merge 1 commit into
microsoft-foundry:mainfrom
amangupta26:ftskills
Open

Add Azure Foundry fine-tuning skill and cross-agent skill wiring#27
amangupta26 wants to merge 1 commit into
microsoft-foundry:mainfrom
amangupta26:ftskills

Conversation

@amangupta26

Copy link
Copy Markdown

This PR adds a reusable Azure AI Foundry fine-tuning skill and makes it available across supported coding agents.

What changed:

  • Added a new Azure Foundry fine-tuning skill definition
  • Added Python scripts to support the fine-tuning workflow:
    • A shared argument parser helper that prints full help on errors.
    • A script to submit supervised fine-tuning (SFT) jobs.
    • A script to monitor fine-tuning jobs until completion.
  • Added cross-agent wiring so the same skill content is reused by other agents through symlinks.
  • Updated the main README with a new AI Agent Skills section and usage instructions for VS Code Copilot, Copilot CLI, Claude, and Codex-compatible agents.

Why:

  • Keeps skill content agent-agnostic and centralized in one place.
  • Avoids duplication by reusing one skill implementation across agents.
  • Improves discoverability and onboarding with clear usage documentation

AliciaFrame added a commit that referenced this pull request Apr 21, 2026
…gent Skills docs

Adopts three patterns from PR #27:

1. HelpOnErrorParser in common.py — prints full --help on invalid args
2. PEP 723 inline script metadata (# /// script) on all scripts —
   enables 'uv run scripts/submit_training.py' with auto-installed deps
3. DefaultAzureCredential fallback in get_clients() — works without
   API key when az CLI or Managed Identity is available

Also adds AI Agent Skills section to README with usage instructions
for Copilot (VS Code + CLI), Claude Code, and Codex agents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AliciaFrame added a commit that referenced this pull request Apr 21, 2026
…tAzureCredential

* Add agent discovery symlinks for fine-tuning skill

Add symlinks so coding agents (Copilot, Claude, Codex) can auto-discover
the fine-tuning skill from their conventional paths:

- .github/skills/azure-ai-fine-tuning -> ../../Skills
- .claude/skills/azure-ai-fine-tuning -> ../../Skills
- .agents/skills/azure-ai-fine-tuning -> ../../Skills

This reuses the existing comprehensive skill (SFT, DPO, RFT with graders
and tools, 8 scripts, 11 reference docs, 5 workflows) rather than creating
a separate thinner skill.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add HelpOnErrorParser, PEP 723 deps, DefaultAzureCredential, and AI Agent Skills docs

Adopts three patterns from PR #27:

1. HelpOnErrorParser in common.py — prints full --help on invalid args
2. PEP 723 inline script metadata (# /// script) on all scripts —
   enables 'uv run scripts/submit_training.py' with auto-installed deps
3. DefaultAzureCredential fallback in get_clients() — works without
   API key when az CLI or Managed Identity is available

Also adds AI Agent Skills section to README with usage instructions
for Copilot (VS Code + CLI), Claude Code, and Codex agents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix: scripts now use HelpOnErrorParser, fix credential fallback bug

- All 7 scripts now import and use HelpOnErrorParser from common.py
  (previously added the class but scripts still used argparse.ArgumentParser)
- Fix bug in DefaultAzureCredential fallback: when base_url is set but
  api_key is None and credential fails, no longer creates client with
  api_key=None (which would fail silently on first API call)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix: DPO system message bug, cross-dir import path, dedup imports

- convert_dataset.py: Fix DPO generation to include system messages when
  generating non-preferred responses from base model (was generating without
  system prompt but recording it in the DPO input — distributional mismatch)
- All scripts: Add sys.path.insert for common.py import to work when
  scripts are run from outside the scripts/ directory
- Clean up duplicate os/sys imports

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AliciaFrame added a commit that referenced this pull request Jun 1, 2026
…tAzureCredential

* Add agent discovery symlinks for fine-tuning skill

Add symlinks so coding agents (Copilot, Claude, Codex) can auto-discover
the fine-tuning skill from their conventional paths:

- .github/skills/azure-ai-fine-tuning -> ../../Skills
- .claude/skills/azure-ai-fine-tuning -> ../../Skills
- .agents/skills/azure-ai-fine-tuning -> ../../Skills

This reuses the existing comprehensive skill (SFT, DPO, RFT with graders
and tools, 8 scripts, 11 reference docs, 5 workflows) rather than creating
a separate thinner skill.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add HelpOnErrorParser, PEP 723 deps, DefaultAzureCredential, and AI Agent Skills docs

Adopts three patterns from PR #27:

1. HelpOnErrorParser in common.py — prints full --help on invalid args
2. PEP 723 inline script metadata (# /// script) on all scripts —
   enables 'uv run scripts/submit_training.py' with auto-installed deps
3. DefaultAzureCredential fallback in get_clients() — works without
   API key when az CLI or Managed Identity is available

Also adds AI Agent Skills section to README with usage instructions
for Copilot (VS Code + CLI), Claude Code, and Codex agents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix: scripts now use HelpOnErrorParser, fix credential fallback bug

- All 7 scripts now import and use HelpOnErrorParser from common.py
  (previously added the class but scripts still used argparse.ArgumentParser)
- Fix bug in DefaultAzureCredential fallback: when base_url is set but
  api_key is None and credential fails, no longer creates client with
  api_key=None (which would fail silently on first API call)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix: DPO system message bug, cross-dir import path, dedup imports

- convert_dataset.py: Fix DPO generation to include system messages when
  generating non-preferred responses from base model (was generating without
  system prompt but recording it in the DPO input — distributional mismatch)
- All scripts: Add sys.path.insert for common.py import to work when
  scripts are run from outside the scripts/ directory
- Clean up duplicate os/sys imports

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant