Skip to content

Conversation

@jakelorocco
Copy link
Contributor

@jakelorocco jakelorocco commented Jan 13, 2026

Closes: #285

Main changes:

  • code reorganization as mentioned in the issue
  • changed internal import structure
  • explicitly removed prm backend / requirements (will need to revisit better way to integrate this)
  • fixed imports so that backends don't import other backends; and don't rely on libraries specifically intended for other backends (ie OpenAI message parsing and Ollama tool formatting)

As a part of this, I had to remap a lot of imports in tests and docs. Most common remappings are here:

Details
from mellea.backends.adapters.adapter import GraniteCommonAdapter -> from mellea.backends.adapters import GraniteCommonAdapter
from mellea.backends.formatter import TemplateFormatter -> from mellea.formatters import TemplateFormatter
from mellea.backends.types import ModelOption -> from mellea.backends import ModelOption
from mellea.stdlib.base import ... -> (multiple things..., mostly mellea.core, )
from mellea.stdlib.requirement -> (with a few changes in the objects) mellea.stdlib.requirements
from mellea.stdlib.chat import Message -> from mellea.stdlib.components import Message
from mellea.stdlib.intrinsic.intrinsic import Intrinsic -> from mellea.stdlib.components import Intrinsic
from mellea.stdlib.requirement import req -> from mellea.stdlib.requirements import req
from mellea.stdlib.requirement import check, req, simple_validate -> from mellea.stdlib.requirements import check, req, simple_validate

Testing: All passed.

Note: when we cut the release that includes this change, we should force a 0.x.0 version change.

@jakelorocco jakelorocco marked this pull request as ready for review January 13, 2026 17:21
@mergify
Copy link

mergify bot commented Jan 13, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|release)(?:\(.+\))?:

@avinash2692
Copy link
Contributor

avinash2692 commented Jan 14, 2026

The current PR only addresses a repo reorg, a few things that are pending for the future is:

  • Rewrite SamplingStratergy and it's interface i.e.
    • what is the straight forward relation between SamplingResult and MoT
    • Should we have a super type Result that captures both SamplingResult and MoT
  • SamplingResult shouldn't inherit from CBlock and maybe should be using the "super" Result type.

Related issues: #281
cc: @jakelorocco , @nrfulton , @HendrikStrobelt

Copy link
Contributor

@avinash2692 avinash2692 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM based on the offline code review.

Copy link
Contributor

@nrfulton nrfulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (extensive discussion during offline code review).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reorganize stdlib

4 participants