Skip to main content

Core abstractions for PFN Studio — Prior, Model, Eval, Run, and the block registry.

Project description

pfnstudio-core

The Python contract for PFN Studio FM projects.

from pfnstudio_core import Prior, Model, Run, register_block, register_prior, register_scorer
from pfnstudio_core.scorers.base import DatasetScorer, ScorerResult

@register_prior("my_prior")
class MyPrior(Prior):
    def sample(self, seed: int): ...

@register_block("my_attention")
class MyAttention:
    def __init__(self, d_model: int, n_heads: int): ...

# Paper-specific scorer — ships in the template beside evals/<slug>.yaml.
@register_scorer("my_eval")
class MyScorer(DatasetScorer):
    def score(self, *, model, eval_spec, loader, run_spec) -> ScorerResult: ...

The CLI discovers anything registered via these decorators and validates models/*.yaml references against the registry.

Layout

  • prior.pyPrior ABC and built-in prior loader
  • model.pyModel config + block-composition
  • eval.pyEvalSpec — the declarative benchmark spec (dataset + metrics + baselines)
  • scorers/DatasetScorer — the executable scoring pipeline; core ships only generic scorers, paper-specific ones live in templates
  • run.pyRun manifest + executor protocol
  • registry.py@register_prior, @register_block, @register_scorer and discovery
  • loaders.py — load YAML artifacts into typed objects
  • blocks/ — built-in architecture blocks (transformer encoder, causal attention, heads)
  • training/ — minimal in-process training loop for the local compute adapter

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pfnstudio_core-0.9.1.tar.gz (75.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pfnstudio_core-0.9.1-py3-none-any.whl (95.8 kB view details)

Uploaded Python 3

File details

Details for the file pfnstudio_core-0.9.1.tar.gz.

File metadata

  • Download URL: pfnstudio_core-0.9.1.tar.gz
  • Upload date:
  • Size: 75.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pfnstudio_core-0.9.1.tar.gz
Algorithm Hash digest
SHA256 78bc5fac0d7d41f5f48d8d322273002da1a0dcd75f21c8ed12fb5fb9e6a2b109
MD5 6a4f6d9edf173b7154752f8933c0c8d9
BLAKE2b-256 3bb46b89758984133953065f0a0503ad1b51688458361c8962e61f87b1ea1017

See more details on using hashes here.

File details

Details for the file pfnstudio_core-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: pfnstudio_core-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 95.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pfnstudio_core-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a0fe72602803b94791543839c41f07a7c1d419e010381155350214e63f1004be
MD5 8a54011f7b4953a5c0b98b977837e2fc
BLAKE2b-256 67ade0e746d71628cd12843ed313a5ca0bd969a8be9b7f00515c09debcd9b2a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page