tables#

Classes

Base(**kwargs)

BaselineTime(**kwargs)

Job(**kwargs)

JobLog(**kwargs)

Kernel(**kwargs)

Rag(**kwargs)

ReferencePerformance(**kwargs)

Cached reference benchmark result, keyed by a content hash of the task's reference-relevant files (everything except config.yaml/.yml and any file containing an EVOLVE block) plus the gpu_arch it was benchmarked on.

Task(**kwargs)

class kernelfoundry.eval_pipeline.database.tables.Base(**kwargs: Any)[source]#
type_annotation_map = {dict[str, typing.Any]: <class 'sqlalchemy.sql.sqltypes.JSON'>}#
__init__(**kwargs: Any) → None#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

metadata: ClassVar[MetaData] = MetaData()#

Refers to the _schema.MetaData collection that will be used for new _schema.Table objects.

See also

orm_declarative_metadata

registry: ClassVar[_RegistryType] = <sqlalchemy.orm.decl_api.registry object>#

Refers to the _orm.registry in use where new _orm.Mapper objects will be associated.

class kernelfoundry.eval_pipeline.database.tables.Kernel(**kwargs)[source]#
id: Mapped[int]#
timestamp: Mapped[datetime]#
uuid: Mapped[str | None]#
parent_uuid: Mapped[str | None]#
task_name: Mapped[str | None]#
Level_ID: Mapped[int | None]#
input_code: Mapped[str | None]#
input_language: Mapped[str | None]#
output_code: Mapped[str | None]#
output_language: Mapped[str | None]#
Op_ID: Mapped[str | None]#
job_name: Mapped[str | None]#
prompt: Mapped[str | None]#
answer: Mapped[str | None]#
status: Mapped[str | None]#
trial: Mapped[int | None]#
runtime: Mapped[float | None]#
runtime_stats: Mapped[dict[str, Any] | None]#
roofline_pct_min: Mapped[float | None]#
improve_over_native: Mapped[float | None]#
improve_over_compile: Mapped[float | None]#
score: Mapped[int | None]#
eval_log: Mapped[str | None]#
version: Mapped[int | None]#
index_level_0: Mapped[int | None]#
language_model: Mapped[str | None]#
profiler_data: Mapped[dict[str, Any] | None]#
profiler_data_reference: Mapped[dict[str, Any] | None]#
profiler_data_detail: Mapped[dict[str, Any] | None]#
profiler_data_detail_reference: Mapped[dict[str, Any] | None]#
template_results: Mapped[dict[str, Any] | None]#
optimization_profile: Mapped[dict[str, Any] | None]#
gpu_arch: Mapped[str | None]#
eval_worker_info: Mapped[dict[str, Any] | None]#
compile_worker_info: Mapped[dict[str, Any] | None]#
config: Mapped[dict[str, Any] | None]#
task_id: Mapped[str]#
job_id: Mapped[int | None]#
agent_session_id: Mapped[str | None]#
db_user: Mapped[str]#
__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class kernelfoundry.eval_pipeline.database.tables.BaselineTime(**kwargs)[source]#
id: Mapped[int]#
level: Mapped[str]#
task_name: Mapped[str]#
mean: Mapped[float | None]#
std: Mapped[float | None]#
min: Mapped[float | None]#
max: Mapped[float | None]#
num_trials: Mapped[int | None]#
hardware: Mapped[str | None]#
device: Mapped[str | None]#
platform: Mapped[str | None]#
backend: Mapped[str | None]#
__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class kernelfoundry.eval_pipeline.database.tables.ReferencePerformance(**kwargs)[source]#

Cached reference benchmark result, keyed by a content hash of the task’s reference-relevant files (everything except config.yaml/.yml and any file containing an EVOLVE block) plus the gpu_arch it was benchmarked on. Lets repeated build_and_test/submit_task calls reuse a reference result instead of rebuilding and rebenchmarking it every time.

A job’s gpu_arch may list multiple architectures (e.g. “lnl,ptl”); each individual architecture is stored as its own row here rather than the comma-joined string, so a cached single-arch result can be reused by a job that only needs that one arch, and so multi-arch requests are order-independent.

id: Mapped[int]#
timestamp: Mapped[datetime]#
task_name: Mapped[str | None]#
task_hash: Mapped[str]#
gpu_arch: Mapped[str]#
build_result_reference: Mapped[dict[str, Any] | None]#
test_result_reference: Mapped[dict[str, Any] | None]#
runtime_stats: Mapped[dict[str, Any] | None]#
job_id: Mapped[int | None]#
db_user: Mapped[str]#
__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class kernelfoundry.eval_pipeline.database.tables.Task(**kwargs)[source]#
id: Mapped[str]#
task_name: Mapped[str]#
Op_ID: Mapped[str | None]#
task_origin: Mapped[str]#
config: Mapped[dict | None]#
Level_ID: Mapped[int | None]#
task_data: Mapped[dict | None]#
has_build_step: Mapped[bool]#
correctness_tests: Mapped[list[str] | None]#
profile_tests: Mapped[list[str] | None]#
evolve_block: Mapped[str | None]#
reference_block: Mapped[str | None]#
user_instructions_block: Mapped[str | None]#
hyperparameters_buildtime: Mapped[dict | None]#
hyperparameters_runtime: Mapped[dict | None]#
generate_hash_id(data: str | dict) → None[source]#
__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class kernelfoundry.eval_pipeline.database.tables.Job(**kwargs)[source]#
id: Mapped[int]#
task_id: Mapped[str | None]#
task_origin: Mapped[str]#
status: Mapped[str]#
progress: Mapped[float]#
created_at: Mapped[datetime]#
started_at: Mapped[datetime | None]#
finished_at: Mapped[datetime | None]#
archived_at: Mapped[datetime | None]#
input_tokens: Mapped[int | None]#
output_tokens: Mapped[int | None]#
cached_input_tokens: Mapped[int | None]#
config: Mapped[dict[str, Any] | None]#
__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class kernelfoundry.eval_pipeline.database.tables.JobLog(**kwargs)[source]#
id: Mapped[int]#
job_id: Mapped[int]#
hostname: Mapped[str | None]#
kernel_uuid: Mapped[str | None]#
agent_session_id: Mapped[str | None]#
level: Mapped[str]#
timestamp: Mapped[datetime]#
message: Mapped[str]#
extra: Mapped[dict[str, Any] | None]#
__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class kernelfoundry.eval_pipeline.database.tables.Rag(**kwargs)[source]#
id: Mapped[int]#
task_name: Mapped[str | None]#
language: Mapped[str]#
descriptor: Mapped[str | None]#
kernel_code: Mapped[str | None]#
file_path: Mapped[str | None]#
category: Mapped[str]#
keywords: Mapped[str | None]#
optimization_profile: Mapped[dict[str, float] | list[float] | None]#
embedded_text: Mapped[str]#
embedding: Mapped[list[float] | None]#
origin: Mapped[str | None]#
__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.