repo_full_name
stringlengths
6
93
repo_url
stringlengths
25
112
repo_api_url
stringclasses
28 values
owner
stringclasses
28 values
repo_name
stringclasses
28 values
description
stringclasses
28 values
stars
int64
617
98.8k
forks
int64
31
355
watchers
int64
990
999
license
stringclasses
2 values
default_branch
stringclasses
2 values
repo_created_at
timestamp[s]date
2012-07-24 23:12:50
2025-06-16 08:07:28
repo_updated_at
timestamp[s]date
2026-02-23 15:23:15
2026-05-03 18:52:12
repo_topics
listlengths
0
13
repo_languages
unknown
is_fork
bool
1 class
open_issues
int64
3
104
file_path
stringlengths
3
208
file_name
stringclasses
509 values
file_extension
stringclasses
1 value
file_size_bytes
int64
101
84k
file_url
stringclasses
627 values
file_raw_url
stringclasses
627 values
file_sha
stringclasses
624 values
language
stringclasses
8 values
parsed_at
stringdate
2026-05-04 01:12:36
2026-05-04 19:41:55
text
stringlengths
100
102k
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/commands/help.py
null
null
null
null
null
null
Python
2026-05-04T02:33:16.541247
""" LLM-Note: Help command for co_ai - Displays comprehensive CLI reference and usage guide This module implements the /help command which shows complete documentation for co_ai commands, tools, skills, and configuration. Key components: - cmd_help(args): Main command handler displaying help panel - HELP_TEXT: Markdo...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/browser_agent/agent.py
null
null
null
null
null
null
Python
2026-05-04T02:33:17.857799
"""Browser Agent CLI - High-level command execution wrapper. This module provides the execute_browser_command function that wraps the BrowserAutomation class with ConnectOnion Agent for natural language command execution. """ import os from pathlib import Path from connectonion import Agent from connectonion.useful_p...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/tools/ask_user.py
null
null
null
null
null
null
Python
2026-05-04T02:33:18.565746
""" Purpose: Ask user a question during agent execution via agent.io LLM-Note: Dependencies: imports from [typing] | imported by [co_ai/tools/__init__.py] Data flow: agent calls ask_user tool → sends ask_user event via agent.io → waits for response → returns answer State/Effects: blocks until user responds via io...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/tools/background.py
null
null
null
null
null
null
Python
2026-05-04T02:33:19.395182
""" LLM-Note: Background task execution system for co_ai - Runs long-running shell commands in background threads Key components: - BackgroundTask: Dataclass tracking task state, process, and output - run_background(): Start command in background with task ID - task_output(): Check output and status of running/complet...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/tools/load_guide.py
null
null
null
null
null
null
Python
2026-05-04T02:33:20.230754
""" LLM-Note: Load Guide tool for co_ai - Loads ConnectOnion framework documentation from embedded markdown guides Key components: - load_guide() function: Main entry point for loading framework documentation - GUIDES_DIR: Points to connectonion/cli/co_ai/prompts/connectonion/ folder - Parameter: path (like "concepts/...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/tools/plan_mode.py
null
null
null
null
null
null
Python
2026-05-04T02:33:21.032479
""" LLM-Note: Plan Mode tools - Planning before implementation workflow Provides plan mode functionality for AI agents to design implementation approaches before writing code. Enables user approval workflow for complex changes. Key functions: - enter_plan_mode(): Start planning phase with template - write_plan(conten...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/tools/task.py
null
null
null
null
null
null
Python
2026-05-04T02:33:21.751465
""" LLM-Note: Task delegation tool for co_ai - Delegates tasks to specialized sub-agents (explore, plan) Key components: - task() function: Main entry point for delegating to sub-agents - Agent types: "explore" (codebase exploration), "plan" (implementation planning) - Uses SDK subagents plugin (connectonion.useful_pl...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/skills/tool.py
null
null
null
null
null
null
Python
2026-05-04T02:33:22.338450
""" LLM-Note: Skill tool for runtime skill invocation by agents. This module provides the skill() tool that allows agents to dynamically load skill instructions at runtime based on task recognition. Key components: - skill(): Tool function that loads and returns full SKILL.md content by name - Auto-loading: Ensures S...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/sessions.py
null
null
null
null
null
null
Python
2026-05-04T02:33:22.340607
""" LLM-Note: SQLite-backed session persistence for co ai conversations. Key classes: - SessionManager: CRUD operations for chat sessions Database schema: - sessions table: id (TEXT PK), title, model, created_at, updated_at, messages (JSON) Database location: - ~/.co-ai/sessions.db Features: - Create/load/update/de...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/main.py
null
null
null
null
null
null
Python
2026-05-04T02:33:22.341959
""" LLM-Note: Entry point for 'co ai' command - starts ConnectOnion AI coding agent web server. This file provides the `start_server()` function that: - Creates a coding agent via agent.create_coding_agent() - Hosts it via connectonion.host() on specified port - Opens web chat at chat.openonion.ai with agent address -...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/skills/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:33:22.343148
""" LLM-Note: Skills system for OO coding assistant with auto-discovery and injection. This module provides a skills system where markdown files teach the agent how to perform specific tasks, with auto-detection based on description matching. Key components: - load_skills(): Discovers and loads all SKILL.md files fro...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/plugins/system_reminder.py
null
null
null
null
null
null
Python
2026-05-04T02:33:22.344925
""" LLM-Note: System reminder plugin with intent detection and contextual guidance. This plugin provides adaptive tool guidance by detecting user intent and injecting relevant reminders at appropriate moments during agent execution. Key components: - IntentAnalysis: Pydantic model for structured intent detection outp...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/plugins/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:33:22.346299
""" LLM-Note: Plugin system for OO coding assistant. This module provides access to specialized plugins that extend the OO agent's capabilities through the event system. Key components: - system_reminder: Plugin for intent detection and contextual guidance injection Architecture: - Plugins are event handler bundles ...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/skills/loader.py
null
null
null
null
null
null
Python
2026-05-04T02:33:22.346845
""" LLM-Note: Skills loader with multi-source discovery and YAML frontmatter parsing. This module discovers and loads skill files from multiple search paths, parsing YAML frontmatter to extract metadata and populating the global registry. Key components: - SkillInfo: Dataclass holding skill metadata (name, descriptio...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/tools/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:33:22.348929
""" LLM-Note: co_ai tools package - Claude Code-style tools for AI coding agents This package provides a comprehensive toolkit for AI agents to interact with code: - File operations (read, edit, write) - Search capabilities (glob, grep) - Task spawning and background process management - Planning mode for complex impl...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/prompts/assembler.py
null
null
null
null
null
null
Python
2026-05-04T02:33:22.349854
""" LLM-Note: Prompt assembler with dynamic composition and variable interpolation. This module provides modular prompt loading with runtime variable injection, tool-based conditional sections, and context-aware prompt assembly. Key components: - PromptContext: Manages variables, tool registry, and interpolation cont...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/co_ai/tools/todo_list.py
null
null
null
null
null
null
Python
2026-05-04T02:33:22.525370
""" Purpose: Web-friendly todo tracking tool LLM-Note: Dependencies: imports from [typing, dataclasses] | imported by [co_ai.tools.__init__] Data flow: Agent calls TodoList methods -> updates internal list -> returns status string State/Effects: maintains in-memory list of TodoItem objects | no console output I...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:33:24.468772
""" Purpose: CLI command modules namespace LLM-Note: Dependencies: none | imported by [cli/main.py] | no direct tests Data flow: no exports (commands imported directly from submodules) State/Effects: no state Integration: namespace package for auth_commands, browser_commands, create, deploy_commands, doctor_com...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/copy_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:24.544114
""" Purpose: CLI command to copy built-in tools, plugins, and prompts to user's project for customization LLM-Note: Dependencies: imports from [shutil, pathlib, typing, rich] | imported by [cli/main.py via handle_copy()] Data flow: user runs `co copy <name>` → looks up name in TOOLS/PLUGINS/PROMPTS registry → finds...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/ai_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:24.578676
""" Purpose: AI coding agent CLI command LLM-Note: Dependencies: imports from [cli/co_ai/main.py, cli/co_ai/agent.py] | imported by [cli/main.py] | no direct tests Data flow: CLI args → start_server() or agent.input() for one-shot Integration: exposes handle_ai() | called from main.py as 'co ai' command """ def...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/browser_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:24.651006
""" Purpose: Execute browser automation commands using Playwright-based browser agent LLM-Note: Dependencies: imports from [rich.console, cli/browser_agent/browser.execute_browser_command] | imported by [cli/main.py via handle_browser()] | requires Playwright installation | tested by [tests/cli/test_cli_browser.py] ...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/eval_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:24.654718
""" Purpose: CLI command for running and managing evals LLM-Note: Dependencies: imports from [pathlib, yaml, json, rich, importlib] | imported by [cli/main.py] Data flow: handle_eval() → reads .co/evals/*.yaml → imports agent → runs with stored input → compares expected vs output Integration: exposes handle_eval(...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/auth_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:24.655877
""" Purpose: Authenticate with OpenOnion backend using Ed25519 signature-based authentication to obtain JWT for managed keys LLM-Note: Dependencies: imports from [sys, time, yaml, requests, pathlib, rich.console, rich.progress, rich.panel, address] | imported by [cli/main.py via handle_auth(), cli/commands/init.py, c...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/deploy_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:24.691178
""" Purpose: Deploy agent projects to ConnectOnion Cloud with git archive packaging and env vars LLM-Note: Dependencies: imports from [os, subprocess, tempfile, time, yaml, requests, pathlib, rich.console, dotenv] | imported by [cli/main.py via handle_deploy()] | calls backend at [https://oo.openonion.ai/api/v1/deplo...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/create.py
null
null
null
null
null
null
Python
2026-05-04T02:33:24.691823
""" Purpose: Create new ConnectOnion project in new directory with template files, authentication, and configuration LLM-Note: Dependencies: imports from [os, signal, sys, shutil, yaml, datetime, pathlib, rich.console, rich.prompt, rich.panel, __version__, address, auth_commands.authenticate, project_cmd_lib] | impor...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/doctor_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:24.762491
""" Purpose: Diagnose ConnectOnion installation and configuration issues LLM-Note: Dependencies: imports from [sys, os, shutil, pathlib, requests, rich.console, rich.panel, rich.table, __version__] | imported by [cli/main.py via handle_doctor()] | checks local files and backend connectivity Data flow: receives no a...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/keys_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:25.058111
""" Purpose: Display and manage agent keys, credentials, and OAuth connections with masked/revealed output LLM-Note: Dependencies: imports from [os, pathlib, rich.console, rich.panel, rich.table, dotenv.load_dotenv, address] | imported by [cli/main.py via handle_keys()] | tested by [tests/cli/test_cli_keys.py] Data...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/project_cmd_lib.py
null
null
null
null
null
null
Python
2026-05-04T02:33:25.115774
""" Purpose: Shared utility functions for CLI project commands including validation, API key detection, template generation, and Rich UI helpers LLM-Note: Dependencies: imports from [os, re, sys, time, shutil, rich.console, rich.prompt, rich.progress, rich.table, rich.panel, datetime, pathlib, __version__, address] |...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/reset_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:25.169741
""" Purpose: Delete global ConnectOnion configuration and create fresh account with new Ed25519 keypair LLM-Note: Dependencies: imports from [sys, shutil, yaml, pathlib, rich.console, rich.prompt, rich.panel, address, auth_commands.authenticate, __version__, datetime] | imported by [cli/main.py via handle_reset()] | ...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/status_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:25.227395
""" Purpose: Display account status including balance, usage, and email configuration without re-authenticating LLM-Note: Dependencies: imports from [os, yaml, requests, pathlib, rich.console, rich.panel, dotenv.load_dotenv, jwt, address] | imported by [cli/main.py via handle_status()] | calls backend at [https://oo....
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/trust_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:33:25.274566
""" Purpose: Manage trust lists (contacts, whitelist, blocklist, admins) with full address display for easy copying LLM-Note: Dependencies: imports from [pathlib, rich.console, rich.table, network.trust.tools] | imported by [cli/main.py via trust subcommands] | tested by [tests/cli/test_cli_trust.py] Data flow: rec...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/main.py
null
null
null
null
null
null
Python
2026-05-04T02:33:25.281812
""" Purpose: Entry point for ConnectOnion CLI application using Typer framework with Rich formatting LLM-Note: Dependencies: imports from [typer, rich.console, typing, __version__] | imported by [setup.py entry_points, __main__.py] | loads commands from [cli/commands/{init, create, deploy, auth, status, reset, doctor...
openonion/connectonion
https://github.com/openonion/connectonion
null
null
null
null
983
null
null
apache-2.0
null
null
null
null
null
null
null
connectonion/cli/commands/init.py
null
null
null
null
null
null
Python
2026-05-04T02:33:28.730751
""" Purpose: Initialize ConnectOnion project in current directory with template files, authentication, and configuration LLM-Note: Dependencies: imports from [os, sys, shutil, subprocess, yaml, datetime, pathlib, rich.console, rich.prompt, __version__, address, auth_commands.authenticate, project_cmd_lib] | imported ...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
model_bakery/exceptions.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.042358
class RecipeNotFound(Exception): pass class RecipeIteratorEmpty(Exception): pass class ModelNotFound(Exception): pass class AmbiguousModelName(Exception): pass class InvalidQuantityException(Exception): pass class CustomBakerNotFound(Exception): pass class InvalidCustomBaker(Exceptio...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
model_bakery/content_types.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.044631
from django.apps import apps BAKER_CONTENTTYPES = apps.is_installed("django.contrib.contenttypes") default_contenttypes_mapping = {} __all__ = ["BAKER_CONTENTTYPES", "default_contenttypes_mapping"] if BAKER_CONTENTTYPES: from django.contrib.contenttypes.models import ContentType from . import random_gen ...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
model_bakery/_types.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.051559
from typing import TypeVar from django.db.models import Model M = TypeVar("M", bound=Model) NewM = TypeVar("NewM", bound=Model)
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
model_bakery/random_gen.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.054276
"""Generators are callables that return a value used to populate a field. If this callable has a `required` attribute (a list, mostly), for each item in the list, if the item is a string, the field attribute with the same name will be fetched from the field and used as argument for the generator. If it is a callable (...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
model_bakery/gis.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.055595
from django.apps import apps BAKER_GIS = apps.is_installed("django.contrib.gis") default_gis_mapping = {} __all__ = ["BAKER_GIS", "default_gis_mapping"] if BAKER_GIS: from django.contrib.gis.db.models import ( GeometryCollectionField, GeometryField, LineStringField, MultiLineStri...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
docs/conf.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.057998
import os import sys from importlib.metadata import version as get_version sys.path.insert(0, os.path.abspath("..")) project = "Model Bakery" copyright = "2023, Rust Saiargaliev" author = "Rust Saiargaliev" version = release = get_version("model-bakery") extensions = [ "myst_parser", ] myst_enable_extensions = ...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
model_bakery/generators.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.059587
from collections.abc import Callable from decimal import Decimal from typing import Any from django.db.models import ( AutoField, BigAutoField, BigIntegerField, BinaryField, BooleanField, CharField, DateField, DateTimeField, DecimalField, DurationField, EmailField, FileF...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
model_bakery/recipe.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.061795
import collections import copy import itertools from typing import ( Any, Generic, TypeVar, overload, ) from . import baker from ._types import M from .exceptions import RecipeNotFound from .utils import ( get_calling_module, seq, # noqa: F401 - Enable seq to be imported from recipes ) finder...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
model_bakery/baker.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.074839
import collections from collections.abc import Callable, Iterable, Iterator from os.path import dirname, join from typing import ( Any, Generic, cast, overload, ) from django.apps import apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist from django.db.models imp...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
model_bakery/timezone.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.619796
"""Utility functions to manage timezone code.""" from datetime import datetime, timezone from django.conf import settings def tz_aware(value: datetime) -> datetime: """Return an UTC-aware datetime in case of USE_TZ=True.""" if settings.USE_TZ: return value.replace(tzinfo=timezone.utc) return va...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/ambiguous/models.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.696685
from django.db import models class Ambiguous(models.Model): name = models.CharField(max_length=20)
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
model_bakery/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.697861
import datetime import decimal import importlib import inspect import itertools import warnings from collections.abc import Callable from types import ModuleType from typing import Any from django.apps import apps from .timezone import tz_aware __all__ = ["import_from_str", "get_calling_module", "seq"] def import_...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/conftest.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.710722
import os import django from django.conf import settings def pytest_configure(): test_db = os.environ.get("TEST_DB", "sqlite") use_contenttypes = os.environ.get("USE_CONTENTTYPES", "").lower() == "true" installed_apps = [ "tests.generic", "tests.ambiguous", "tests.ambiguous2", ...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/generic/fields.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.712114
from django.db import models from django.db.models.fields.mixins import FieldCacheMixin class CustomFieldWithGenerator(models.TextField): pass class CustomFieldWithoutGenerator(models.TextField): pass class CustomFieldViaSettings(models.TextField): pass class FakeListField(models.TextField): def...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/generic/baker_recipes.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.721144
# ATTENTION: Recipes defined for testing purposes only from datetime import timedelta from decimal import Decimal from django.utils.timezone import now from model_bakery.recipe import Recipe, foreign_key, related, seq from tests.generic.models import ( TEST_TIME, Dog, DummyDefaultFieldsModel, DummyUni...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/ambiguous2/models.py
null
null
null
null
null
null
Python
2026-05-04T02:33:31.722089
from django.db import models class Ambiguous(models.Model): name = models.CharField(max_length=20)
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_utils.py
null
null
null
null
null
null
Python
2026-05-04T02:33:32.802768
import datetime from decimal import Decimal from inspect import getmodule import pytest from model_bakery.utils import get_calling_module, import_from_str, seq from tests.generic.models import User def test_import_from_str(): with pytest.raises(AttributeError): import_from_str("tests.generic.UndefinedOb...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/generic/tests/sub_package/baker_recipes.py
null
null
null
null
null
null
Python
2026-05-04T02:33:32.804550
from datetime import date, datetime from model_bakery.recipe import Recipe from tests.generic.models import Person person = Recipe( Person, name="John Deeper", nickname="joe", age=18, bio="Someone in the crowd", blog="https://joe.example.com", days_since_last_login=4, birthday=date.tod...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_recipes.py
null
null
null
null
null
null
Python
2026-05-04T02:33:32.805254
import itertools from datetime import timedelta from decimal import Decimal from random import choice # noqa from unittest.mock import patch from django.db import connection from django.utils.timezone import now import pytest from model_bakery import baker from model_bakery.exceptions import InvalidQuantityExceptio...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_filling_fields.py
null
null
null
null
null
null
Python
2026-05-04T02:33:32.814844
import uuid from datetime import date, datetime, time, timedelta from decimal import Decimal from os.path import abspath from tempfile import gettempdir import django from django.conf import settings from django.core.validators import ( validate_ipv4_address, validate_ipv6_address, validate_ipv46_address, ...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/generic/models.py
null
null
null
null
null
null
Python
2026-05-04T02:33:32.815496
######################################## # TESTING PURPOSE ONLY MODELS!! # # DO NOT ADD THE APP TO INSTALLED_APPS # ######################################## import datetime from decimal import Decimal from tempfile import gettempdir import django from django.conf import settings from django.core.files.storage i...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_extending_bakery.py
null
null
null
null
null
null
Python
2026-05-04T02:33:32.836527
import pytest from model_bakery import baker from model_bakery.exceptions import CustomBakerNotFound, InvalidCustomBaker from model_bakery.random_gen import gen_from_list from tests.generic.models import Person def gen_opposite(default): return not default def gen_age(): # forever young return 18 cla...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_baker.py
null
null
null
null
null
null
Python
2026-05-04T02:33:32.876789
import datetime import itertools from decimal import Decimal from unittest.mock import patch from django.apps import apps from django.conf import settings from django.db.models import Manager, ManyToOneRel from django.db.models.signals import m2m_changed from django.test import TestCase, override_settings import pyte...
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/generic/forms.py
null
null
null
null
null
null
Python
2026-05-04T02:33:34.599300
from django.forms import ModelForm from tests.generic.models import DummyGenericIPAddressFieldModel class DummyGenericIPAddressFieldForm(ModelForm): class Meta: fields = ("ipv4_field", "ipv6_field", "ipv46_field") model = DummyGenericIPAddressFieldModel
model-bakers/model_bakery
https://github.com/model-bakers/model_bakery
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
tests/uninstalled/baker_recipes.py
null
null
null
null
null
null
Python
2026-05-04T02:33:39.229791
from django.utils.timezone import now from model_bakery.recipe import Recipe from tests.generic.models import Person person = Recipe( Person, name="Uninstalled", nickname="uninstalled", age=18, bio="Uninstalled", blog="https://uninstalled.example.com", days_since_last_login=4, birthday...
VILA-Lab/ATLAS
https://github.com/VILA-Lab/ATLAS
null
null
null
null
982
null
null
apache-2.0
null
null
null
null
null
null
null
generate.py
null
null
null
null
null
null
Python
2026-05-04T02:33:45.330531
import os from openai import OpenAI import json client = OpenAI(api_key=os.environ['OPENAI_KEY']) def generate_answers(instructions, gpt_model="gpt-4-1106-preview"): data = [] for prompt in instructions: response = client.chat.completions.create(messages=[{ ...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/conftest.py
null
null
null
null
null
null
Python
2026-05-04T02:33:50.180295
import json import logging import os import pytest import torch import yaml import flag_gems from benchmark.consts import ( ALL_AVAILABLE_METRICS, BOOL_DTYPES, DEFAULT_ITER_COUNT, DEFAULT_WARMUP_COUNT, FLOAT_DTYPES, INT_DTYPES, BenchLevel, BenchMode, OperationAttribute, get_rec...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/models_benchmark/benchmark_dataset.py
null
null
null
null
null
null
Python
2026-05-04T02:33:50.332253
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ This module defines a framework for sampling benchmark requests from various datasets. Each dataset subclass of BenchmarkDataset must implement sample generation. Supported dataset types include: - ShareGPT ...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/base.py
null
null
null
null
null
null
Python
2026-05-04T02:33:50.438863
import gc import math import os import time from typing import Any, Generator, List, Optional, Tuple import pytest import torch import triton import yaml import flag_gems from flag_gems.utils import shape_utils from .conftest import Config, emit_record_logger from .consts import ( BOOL_DTYPES, COMPLEX_DTYPES...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/consts.py
null
null
null
null
null
null
Python
2026-05-04T02:33:50.521325
import itertools from dataclasses import asdict, dataclass, fields from enum import Enum from typing import List, Optional, Tuple import torch FLOAT_DTYPES = [torch.float16, torch.float32, torch.bfloat16] INT_DTYPES = [torch.int16, torch.int32] BOOL_DTYPES = [torch.bool] COMPLEX_DTYPES = [torch.complex64] DEFAULT_WA...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/benchmark_for_models.py
null
null
null
null
null
null
Python
2026-05-04T02:33:50.577268
import argparse import subprocess import yaml def load_shape_file(path): with open(path, "r") as f: return yaml.safe_load(f) def build_markers(shape_data): return list({op_name for op_name, shapes in shape_data.items() if shapes}) def run_benchmark_command(markers_str, shape_file, args): cmd ...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/benchmark_grid_sample.py
null
null
null
null
null
null
Python
2026-05-04T02:33:50.578579
""" Performance benchmark for grid_sample operator. This script benchmarks the grid sample operation using FlagGems benchmark framework. Grid sample is a spatial interpolation operation widely used in computer vision tasks. """ import pytest import torch import flag_gems from benchmark.base import Benchmark from ben...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/models_benchmark/benchmark_utils.py
null
null
null
null
null
null
Python
2026-05-04T02:33:50.632823
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import argparse import json import math import os from typing import Any def convert_to_pytorch_benchmark_format( args: argparse.Namespace, metrics: dict[str, list], extra_info: dict[str, Any] ) -> list: ...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/models_benchmark/backend_request_func.py
null
null
null
null
null
null
Python
2026-05-04T02:33:50.634132
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import io import json import os import sys import time import traceback from dataclasses import dataclass, field from typing import Optional, Union import aiohttp import huggingface_hub.constants from tqdm.async...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/models_benchmark/benchmark_throughput.py
null
null
null
null
null
null
Python
2026-05-04T02:33:50.747066
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Benchmark offline inference throughput.""" import argparse import dataclasses import json import os import random import time import warnings from typing import Any, Optional, Union import torch import uvloop...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/summary_for_plot.py
null
null
null
null
null
null
Python
2026-05-04T02:33:50.764085
""" Script for Generating Operation Benchmark Summary Results This script processes benchmark log files to calculate the average speedup for each operation, categorized by data type. The summary provides an organized view of performance gains, making it easier to analyze benchmark results by each tested data type. Us...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_FLA/test_fused_recurrent_gated_delta_rule_perf.py
null
null
null
null
null
null
Python
2026-05-04T02:33:51.194600
import pytest import torch import flag_gems from benchmark.base import Benchmark try: from vllm.model_executor.layers.fla.ops import ( fused_recurrent_gated_delta_rule as base_fused_recurrent_gated_delta_rule, ) VLLM_AVAILABLE = True except ImportError: # pragma: no cover - optional dependency g...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_absolute.py
null
null
null
null
null
null
Python
2026-05-04T02:33:51.374465
import pytest import torch from . import base, consts @pytest.mark.absolute def test_absolute(): bench = base.UnaryPointwiseBenchmark( op_name="absolute", torch_op=torch.absolute, dtypes=consts.FLOAT_DTYPES ) bench.run()
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_add.py
null
null
null
null
null
null
Python
2026-05-04T02:33:51.426542
import pytest import torch from . import base, consts @pytest.mark.add def test_add(): bench = base.BinaryPointwiseBenchmark( op_name="add", torch_op=torch.add, dtypes=consts.FLOAT_DTYPES + consts.COMPLEX_DTYPES, ) bench.run() @pytest.mark.add_ def test_add_inplace(): bench ...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_abs.py
null
null
null
null
null
null
Python
2026-05-04T02:33:51.490161
import pytest import torch from . import base, consts @pytest.mark.abs def test_abs(): bench = base.UnaryPointwiseBenchmark( op_name="abs", torch_op=torch.abs, dtypes=consts.FLOAT_DTYPES ) bench.run() @pytest.mark.abs_ def test_abs_inplace(): bench = base.UnaryPointwiseBenchmark( op...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_addmv.py
null
null
null
null
null
null
Python
2026-05-04T02:33:51.762641
from typing import Generator import pytest import torch from . import base, consts class AddmvBenchmark(base.GenericBenchmark2DOnly): def set_more_shapes(self): return [] def get_input_iter(self, dtype) -> Generator: for m, n in self.shapes: yield from self.input_fn(m, n, dtype,...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_addr.py
null
null
null
null
null
null
Python
2026-05-04T02:33:51.919653
from typing import Generator import pytest import torch from . import base, consts class AddrBenchmark(base.BlasBenchmark): def set_more_shapes(self): return [] def get_input_iter(self, dtype) -> Generator: for shape in self.shapes: m, n = shape[0], shape[1] yield fr...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_alias_copy.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.031236
import pytest import torch from . import base, consts @pytest.mark.alias_copy def test_alias_copy(): bench = base.UnaryPointwiseBenchmark( op_name="alias_copy", torch_op=torch.ops.aten.alias_copy, dtypes=consts.FLOAT_DTYPES, ) bench.run() @pytest.mark.alias_copy_out def test_ali...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_all.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.074372
import pytest import torch from . import base, consts @pytest.mark.all def test_all(): bench = base.UnaryReductionBenchmark( op_name="all", torch_op=torch.all, dtypes=consts.FLOAT_DTYPES ) bench.run()
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/models_benchmark/benchmark_serving.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.166281
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project r"""Benchmark online serving throughput. On the server side, run one of the following commands: vLLM OpenAI API server vllm serve <your_model> \ --swap-space 16 \ --disable-log-requests O...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_act_quant.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.284201
from typing import Optional, Tuple import pytest import torch import flag_gems from flag_gems.utils.device_info import get_device_capability from . import base M = [1, 40, 164, 512, 3454, 12027, 38594] N = [128, 896, 2048, 8192] # Test parameters SHAPES = [(m, n) for m in M for n in N] BLOCK_SIZES = [64, 128] SCALE...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_acos.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.295705
import pytest import torch from . import base, consts @pytest.mark.acos def test_acos(): bench = base.UnaryPointwiseBenchmark( op_name="acos", torch_op=torch.acos, dtypes=consts.FLOAT_DTYPES ) bench.run()
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_addcdiv.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.342670
import pytest import torch from . import base, consts, utils def _input_fn(shape, dtype, device): inp1 = utils.generate_tensor_input(shape, dtype, device) inp2 = utils.generate_tensor_input(shape, dtype, device) inp3 = utils.generate_tensor_input(shape, dtype, device) yield inp1, inp2, inp3, {"value...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_allclose.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.343350
import pytest import torch from . import base, consts @pytest.mark.allclose def test_allclose(): bench = base.BinaryPointwiseBenchmark( op_name="allclose", torch_op=torch.allclose, dtypes=consts.FLOAT_DTYPES + consts.INT_DTYPES, ) bench.run()
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_amax.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.538619
import pytest import torch from . import base, consts @pytest.mark.amax def test_amax(): bench = base.UnaryReductionBenchmark( op_name="amax", torch_op=torch.amax, dtypes=consts.FLOAT_DTYPES ) bench.run()
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_aminmax.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.616207
import pytest import torch from . import base, consts, utils def aminmax_input_fn(shape, cur_dtype, device): inp = utils.generate_tensor_input(shape, cur_dtype, device) # Test dim=None (whole tensor reduction) yield inp, # Test dim=-1 (last dimension) yield inp, {"dim": -1} # Test dim=0 (firs...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_angle.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.650710
import pytest import torch from . import base, consts @pytest.mark.angle def test_angle(): bench = base.UnaryPointwiseBenchmark( op_name="angle", torch_op=torch.angle, dtypes=consts.COMPLEX_DTYPES + [torch.float32] + consts.INT_DTYPES + consts.BOOL_DTYPES, ) ...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_any.py
null
null
null
null
null
null
Python
2026-05-04T02:33:52.739146
import pytest import torch from . import base, consts @pytest.mark.any def test_any(): bench = base.UnaryReductionBenchmark( op_name="any", torch_op=torch.any, dtypes=consts.FLOAT_DTYPES ) bench.run()
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_arange.py
null
null
null
null
null
null
Python
2026-05-04T02:33:53.107230
import math import pytest import torch from . import base, consts def _input_fn(shape, dtype, device): yield { "end": math.prod(shape), "device": device, "dtype": dtype, }, if base.Config.bench_level == consts.BenchLevel.COMPREHENSIVE: yield { "start": 0, ...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_apply_rotary_pos_emb.py
null
null
null
null
null
null
Python
2026-05-04T02:33:53.107804
from typing import Optional import pytest import torch import flag_gems from . import base, consts class RopeBenchmark(base.GenericBenchmark): def set_more_shapes(self): # self.shapes is a list of tuples, each containing three elements: # (batch, num_heads, seq_len, head_size). return [...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_arcsinh.py
null
null
null
null
null
null
Python
2026-05-04T02:33:53.108901
import pytest import torch from . import base, consts @pytest.mark.arcsinh def test_arcsinh(): bench = base.UnaryPointwiseBenchmark( op_name="arcsinh", torch_op=torch.arcsinh, dtypes=consts.FLOAT_DTYPES ) bench.run() @pytest.mark.arcsinh_ def test_arcsinh_inplace(): bench = base.UnaryPointw...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_apply_repetition_penalties.py
null
null
null
null
null
null
Python
2026-05-04T02:33:53.255301
import pytest import torch import flag_gems from . import base, consts, utils vendor_name = flag_gems.vendor_name class RepetitionPenaltyBenchmark(base.Benchmark): def __init__(self, op_name, torch_op, dtypes): super().__init__(op_name, torch_op, dtypes) self.gems_op = None def set_shapes(...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_arctanh.py
null
null
null
null
null
null
Python
2026-05-04T02:33:53.307209
import pytest from . import base, consts @pytest.mark.arctanh_ def test_arctanh_inplace(): bench = base.UnaryPointwiseBenchmark( op_name="arctanh_", torch_op=lambda a: a.arctanh_(), dtypes=consts.FLOAT_DTYPES, is_inplace=True, ) bench.run()
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_atan.py
null
null
null
null
null
null
Python
2026-05-04T02:33:53.684207
import pytest import torch from . import base, consts @pytest.mark.atan def test_atan(): bench = base.UnaryPointwiseBenchmark( op_name="atan", torch_op=torch.atan, dtypes=consts.FLOAT_DTYPES ) bench.run() @pytest.mark.atan_ def test_atan_inplace(): bench = base.UnaryPointwiseBenchmark( ...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_assert_async.py
null
null
null
null
null
null
Python
2026-05-04T02:33:53.684735
import pytest import torch import flag_gems from . import base def _input_fn(shape, dtype, device): if dtype == torch.bool: tensor = torch.ones(shape, dtype=dtype, device=device) else: tensor = torch.ones(shape, dtype=dtype, device=device) msg = "Benchmark assert_async" yield ( ...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_avg_pool2d.py
null
null
null
null
null
null
Python
2026-05-04T02:33:53.687331
from typing import Generator import pytest import torch import flag_gems from . import base, consts, utils class AvgPool2dBenchmark(base.GenericBenchmark): def get_input_iter(self, dtype) -> Generator: shapes_4d = [ (4, 3, 224, 224), # Typical input image size (16, 64, 56, 56),...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_avg_pool3d_perf.py
null
null
null
null
null
null
Python
2026-05-04T02:33:53.872556
from typing import Generator import pytest import torch from . import base, consts, utils def avg_pool3d_input_fn(shape, dtype, device): inp = utils.generate_tensor_input(shape, dtype, device) # Common case yield inp, { "kernel_size": 3, "stride": 2, "padding": 1, "ceil_m...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_baddbmm.py
null
null
null
null
null
null
Python
2026-05-04T02:33:53.961125
import pytest import torch from . import base, consts class BaddbmmBenchmark(base.BlasBenchmark): def set_more_shapes(self): model_shapes_list = consts.model_shapes() skip_shapes = [ (4, 8192, 128256, 4096), (4, 8192, 152064, 3584), ] filtered = [] ...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_batch_norm.py
null
null
null
null
null
null
Python
2026-05-04T02:33:54.288551
import pytest import torch from . import base, consts class NormBenchmark(base.GenericBenchmark): # TODO: add new metric def set_more_shapes(self): return [ # 3D shapes represented as [batch_size, channels, hidden_size] (16, 16, 64), (16, 16, 1024), (1...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_bernoulli.py
null
null
null
null
null
null
Python
2026-05-04T02:33:54.289881
import pytest import torch from . import base, consts def input_fn(shape, cur_dtype, device): self = torch.randn(shape, dtype=cur_dtype, device=device) p = 0.5 yield self, p @pytest.mark.bernoulli_ def test_bernoulli_inplace(): bench = base.GenericBenchmark( op_name="bernoulli_", in...
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_argmin.py
null
null
null
null
null
null
Python
2026-05-04T02:33:54.310447
import pytest import torch from . import base, consts @pytest.mark.argmin def test_argmin(): bench = base.UnaryReductionBenchmark( op_name="argmin", torch_op=torch.argmin, dtypes=consts.FLOAT_DTYPES ) bench.run()
flagos-ai/FlagGems
https://github.com/flagos-ai/FlagGems
null
null
null
null
981
null
null
apache-2.0
null
null
null
null
null
null
null
benchmark/test_argmax.py
null
null
null
null
null
null
Python
2026-05-04T02:33:54.341400
import pytest import torch from . import base, consts @pytest.mark.argmax def test_argmax(): bench = base.UnaryReductionBenchmark( op_name="argmax", torch_op=torch.argmax, dtypes=consts.FLOAT_DTYPES ) bench.run()