Instructions to use EzioDevio/gemma4-dev-agent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EzioDevio/gemma4-dev-agent with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("EzioDevio/gemma4-dev-agent", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download scripts/run_kaggle_eval.py from EzioDevio/gemma4-dev-agent: direct link, hf CLI and curl.
- Browser
- Download file 2.42 kB
-
https://huggingface.co/EzioDevio/gemma4-dev-agent/resolve/main/scripts/run_kaggle_eval.py
- Command line
-
hf download hf://EzioDevio/gemma4-dev-agent/scripts/run_kaggle_eval.py
-
curl -L -o run_kaggle_eval.py https://huggingface.co/EzioDevio/gemma4-dev-agent/resolve/main/scripts/run_kaggle_eval.py
2.42 kB
| """ | |
| Kaggle Local Evaluation Harness Simulation: | |
| Simulates multi-turn tool calling and bug resolution loops for Gemma 4. | |
| """ | |
| import json | |
| import sys | |
| from pathlib import Path | |
| from typing import Dict, Any, List | |
| # Ensure parent path is in sys.path | |
| sys.path.append(str(Path(__file__).resolve().parent.parent)) | |
| from src.agent.loop import GemmaDevAgent | |
| class KaggleEvalHarness: | |
| def __init__(self, repo_root: str = "."): | |
| self.agent = GemmaDevAgent(repo_root) | |
| self.schemas_path = Path(repo_root) / "src" / "schemas" / "tool_schemas.json" | |
| def load_tool_schemas(self) -> List[Dict[str, Any]]: | |
| """Loads declarative JSON schemas for tool calling.""" | |
| if self.schemas_path.exists(): | |
| return json.loads(self.schemas_path.read_text(encoding="utf-8")) | |
| return [] | |
| def simulate_task_run(self, task_description: str, max_steps: int = 5) -> Dict[str, Any]: | |
| """Simulates an evaluation loop handling tool execution steps.""" | |
| print(f"\n[Kaggle Eval Harness] Starting Task: '{task_description}'") | |
| # Load system prompt & configurations | |
| schemas = self.load_tool_schemas() | |
| print(f"[Kaggle Eval Harness] Loaded {len(schemas)} tool schemas successfully.") | |
| messages = [ | |
| {"role": "system", "content": "You are a software engineering agent fixing repository bugs."}, | |
| {"role": "user", "content": task_description} | |
| ] | |
| # Simulated initial step: searching the symbol table for task context | |
| simulated_tool_call = { | |
| "name": "code_graph_search", | |
| "arguments": {"symbol_name": "FileOperations"} | |
| } | |
| print(f"[Kaggle Eval Harness] Step 1: Agent called '{simulated_tool_call['name']}'") | |
| messages = self.agent.process_step(messages, simulated_tool_call) | |
| # Print latest tool response summary | |
| latest_response = json.loads(messages[-1]["content"]) | |
| print(f"[Kaggle Eval Harness] Step 1 Response Status: {latest_response.get('status')}") | |
| return { | |
| "task": task_description, | |
| "total_messages": len(messages), | |
| "final_status": "evaluated" | |
| } | |
| if __name__ == "__main__": | |
| harness = KaggleEvalHarness() | |
| result = harness.simulate_task_run("Locate the FileOperations class and verify scope reading functionality.") | |
| print(f"\n[Kaggle Eval Harness] Run Complete: {result}") | |