mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-30 10:52:15 +00:00
Major changes across parallel sessions: - Add orchestrator SFT & GRPO training subpackage (learning/orchestrator/) with episode types, multi-objective reward, prompt registry, policy model, RL environment, and registered learning policies - Add structured THOUGHT/TOOL/INPUT/FINAL_ANSWER mode to OrchestratorAgent - Add 15 channel backends (Discord, Slack, Telegram, Email, Webhook, IRC, Matrix, Teams, WhatsApp, Signal, Mattermost, BlueBubbles, Feishu, Google Chat, Webchat) with channel tools and config - Add LiteLLM engine backend for unified LLM provider access - Add RLM agent and REPL tool - Remove ToolLearningPolicy — learning taxonomy now only targets Intelligence (LM weights/routing) and Agents (logic/ICL/tool strategies) - Rename SFTPolicy to SFTRouterPolicy (backward-compat alias kept) - Remove OpenClaw agent infrastructure (openclaw*.py, openclaw_bridge.py) - Fix async streaming tests (asyncio.run vs deprecated get_event_loop) - Fix server channel route tests (pytest.importorskip for optional fastapi) - Track uv.lock for reproducibility - Update CLAUDE.md and docs to reflect all changes 1676 tests pass, 37 skipped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
64 lines
1.5 KiB
Python
64 lines
1.5 KiB
Python
"""Learning pillar — router policy and reward functions."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from openjarvis.learning._stubs import RewardFunction, RouterPolicy, RoutingContext
|
|
from openjarvis.learning.heuristic_reward import HeuristicRewardFunction
|
|
|
|
|
|
def ensure_registered() -> None:
|
|
"""Ensure all learning policies are registered in RouterPolicyRegistry.
|
|
|
|
Imported lazily to avoid circular imports with the intelligence pillar.
|
|
"""
|
|
from openjarvis.learning.heuristic_policy import (
|
|
ensure_registered as _reg_heuristic,
|
|
)
|
|
|
|
_reg_heuristic()
|
|
|
|
try:
|
|
from openjarvis.learning.grpo_policy import (
|
|
ensure_registered as _reg_grpo,
|
|
)
|
|
|
|
_reg_grpo()
|
|
except ImportError:
|
|
pass
|
|
|
|
from openjarvis.learning.trace_policy import (
|
|
ensure_registered as _reg_trace,
|
|
)
|
|
|
|
_reg_trace()
|
|
|
|
try:
|
|
import openjarvis.learning.sft_policy # noqa: F401
|
|
except ImportError:
|
|
pass
|
|
|
|
try:
|
|
import openjarvis.learning.agent_advisor # noqa: F401
|
|
except ImportError:
|
|
pass
|
|
|
|
try:
|
|
import openjarvis.learning.icl_updater # noqa: F401
|
|
except ImportError:
|
|
pass
|
|
|
|
# Orchestrator-native SFT & GRPO training
|
|
try:
|
|
import openjarvis.learning.orchestrator # noqa: F401
|
|
except ImportError:
|
|
pass
|
|
|
|
|
|
__all__ = [
|
|
"HeuristicRewardFunction",
|
|
"RewardFunction",
|
|
"RouterPolicy",
|
|
"RoutingContext",
|
|
"ensure_registered",
|
|
]
|