Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ default-members = [
resolver = "2"

[workspace.package]
version = "0.1.0"
version = "0.2.0"
edition = "2024"
license = "Apache-2.0"
repository = "https://github.com/NVIDIA/nemo-fabric"

[workspace.dependencies]
nemo-fabric-core = { path = "crates/fabric-core", version = "0.1.0" }
nemo-fabric-core = { path = "crates/fabric-core", version = "0.2.0" }

clap = { version = "4", default-features = false, features = ["derive", "std", "help", "usage", "error-context", "suggestions"] }
schemars = { version = "1", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions adapters/claude/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "nemo-fabric-adapters-claude"
version = "0.1.0"
version = "0.2.0"
description = "Claude adapter for NeMo Fabric"
authors = [
{ name = "NVIDIA Corporation" },
Expand All @@ -25,7 +25,7 @@ license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"nemo-fabric-adapters-common == 0.1.0",
"nemo-fabric-adapters-common == 0.2.0",
"claude-agent-sdk==0.2.120",
"tomli-w~=1.2",
]
Expand Down
4 changes: 2 additions & 2 deletions adapters/claude/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions adapters/codex/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "nemo-fabric-adapters-codex"
version = "0.1.0"
version = "0.2.0"
description = "Codex adapter for NeMo Fabric"
authors = [
{ name = "NVIDIA Corporation" },
Expand All @@ -25,7 +25,7 @@ license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"nemo-fabric-adapters-common == 0.1.0",
"nemo-fabric-adapters-common == 0.2.0",
"openai-codex==0.144.4",
"tomli-w~=1.2",
]
Expand Down
4 changes: 2 additions & 2 deletions adapters/codex/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion adapters/common/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "nemo-fabric-adapters-common"
version = "0.1.0"
version = "0.2.0"
description = "Shared Python helpers for NeMo Fabric adapters"
authors = [
{ name = "NVIDIA Corporation" },
Expand Down
83 changes: 65 additions & 18 deletions adapters/common/src/nemo_fabric_adapters/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,44 @@ def normalize_relay_output_dirs(plugin_config: dict[str, Any], payload: dict[str
atif.setdefault("model_name", relay_model_name(payload))


def _artifact_directory(value: Any) -> Path | None:
Comment thread
bbednarski9 marked this conversation as resolved.
Resolved
if not value:
return None
try:
directory = Path(value).resolve(strict=True)
except (OSError, TypeError, ValueError):
return None
return directory if directory.is_dir() else None


def _artifact_file(value: Any, *, directory: Path) -> Path | None:
try:
path = Path(value).resolve(strict=True)
except (OSError, TypeError, ValueError):
return None
if not path.is_file() or not path.is_relative_to(directory):
return None
return path
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved


def _artifact_name_is_local(value: str) -> bool:
try:
return Path(value).name == value
except (OSError, ValueError):
return False


def _artifact_glob(directory: Path, pattern: str) -> list[Path]:
if not _artifact_name_is_local(pattern):
return []
try:
return sorted(directory.glob(pattern))
except (OSError, ValueError):
return []


def collect_relay_artifacts(plugin_config: dict[str, Any]) -> list[dict[str, str]]:

artifacts: list[dict[str, str]] = []
for component in plugin_config.get("components", []):
if component.get("kind") != "observability":
Expand All @@ -282,26 +319,36 @@ def collect_relay_artifacts(plugin_config: dict[str, Any]) -> list[dict[str, str
for sink in atof.get("sinks") or []:
if not isinstance(sink, dict) or sink.get("type") != "file":
continue
output_directory = sink.get("output_directory")
if not output_directory:
continue
directory = Path(output_directory)
if not directory.exists():
continue
for path in sorted(directory.glob("*.jsonl")):
artifacts.append({"kind": "atof", "path": str(path)})
directory = _artifact_directory(sink.get("output_directory"))
if directory is not None:
filename = sink.get("filename")
if isinstance(filename, str) and filename:
paths = (
[directory / filename]
if _artifact_name_is_local(filename)
else []
)
else:
paths = _artifact_glob(directory, "*.jsonl")
for path in paths:
resolved = _artifact_file(path, directory=directory)
if resolved is not None:
artifacts.append({"kind": "atof", "path": str(resolved)})

atif = config.get("atif")
if not isinstance(atif, dict) or not atif.get("enabled"):
continue
output_directory = atif.get("output_directory")
if not output_directory:
continue
directory = Path(output_directory)
if not directory.exists():
continue
for path in sorted(directory.glob("*.json")):
artifacts.append({"kind": "atif", "path": str(path)})
if isinstance(atif, dict) and atif.get("enabled"):
directory = _artifact_directory(atif.get("output_directory"))
if directory is not None:
template = atif.get("filename_template")
pattern = (
template.replace("{session_id}", "*")
if isinstance(template, str) and template
else "*.json"
)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
for path in _artifact_glob(directory, pattern):
resolved = _artifact_file(path, directory=directory)
if resolved is not None:
artifacts.append({"kind": "atif", "path": str(resolved)})
return artifacts


Expand Down
2 changes: 1 addition & 1 deletion adapters/common/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions adapters/deepagents/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "nemo-fabric-adapters-deepagents"
version = "0.1.0"
version = "0.2.0"
description = "LangChain Deep Agents adapter for NeMo Fabric"
authors = [
{ name = "NVIDIA Corporation" },
Expand All @@ -25,7 +25,7 @@ license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"nemo-fabric-adapters-common == 0.1.0",
"nemo-fabric-adapters-common == 0.2.0",
"deepagents>=0.6.12,<0.7.0",
"langchain>=1.3,<2.0",
"langchain-mcp-adapters>=0.1,<0.3.0",
Expand Down
4 changes: 2 additions & 2 deletions adapters/deepagents/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions adapters/hermes/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "nemo-fabric-adapters-hermes"
version = "0.1.0"
version = "0.2.0"
description = "Hermes Agent adapter for NeMo Fabric"
authors = [
{ name = "NVIDIA Corporation" },
Expand All @@ -26,7 +26,7 @@ readme = "README.md"
# Hermes Agent does not currently support Python 3.14 or later.
requires-python = ">=3.11,<3.14"
dependencies = [
"nemo-fabric-adapters-common == 0.1.0",
"nemo-fabric-adapters-common == 0.2.0",
"pyyaml>=6.0", # needed for writing hermes config files
]

Expand Down
4 changes: 2 additions & 2 deletions adapters/hermes/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "nemo-fabric"
version = "0.1.0"
version = "0.2.0"
description = "Python SDK distribution for NeMo Fabric"
authors = [
{ name = "NVIDIA Corporation" },
Expand All @@ -25,7 +25,7 @@ license-files = ["LICENSE"]
readme = "pypi.md"
requires-python = ">=3.11"
dependencies = [
"nemo-fabric-runtime == 0.1.0",
"nemo-fabric-runtime == 0.2.0",
]

[project.urls]
Expand All @@ -38,15 +38,15 @@ packages = []
[project.optional-dependencies]

codex = [
"nemo-fabric-adapters-codex == 0.1.0",
"nemo-fabric-adapters-codex == 0.2.0",
]

claude = [
"nemo-fabric-adapters-claude == 0.1.0",
"nemo-fabric-adapters-claude == 0.2.0",
]

deepagents = [
"nemo-fabric-adapters-deepagents == 0.1.0",
"nemo-fabric-adapters-deepagents == 0.2.0",
]

harbor = [
Expand All @@ -55,11 +55,11 @@ harbor = [
]

hermes = [
"nemo-fabric-adapters-hermes == 0.1.0; python_version < '3.14'",
"nemo-fabric-adapters-hermes == 0.2.0; python_version < '3.14'",
]

hermes-agent = [
"nemo-fabric-adapters-hermes == 0.1.0; python_version < '3.14'",
"nemo-fabric-adapters-hermes == 0.2.0; python_version < '3.14'",
"hermes-agent>=0.17.0; python_version < '3.14'",
]

Expand All @@ -69,7 +69,7 @@ relay = [
]

runtime = [
"nemo-fabric-runtime == 0.1.0",
"nemo-fabric-runtime == 0.2.0",
]

[dependency-groups]
Expand Down
Loading
Loading