Skip to content

Fix bellatrex on non-ensemble models (fixes #95) - #97

Open
eduardstan wants to merge 2 commits into
mainfrom
fm/sole-bellatrex-fix
Open

Fix bellatrex on non-ensemble models (fixes #95)#97
eduardstan wants to merge 2 commits into
mainfrom
fm/sole-bellatrex-fix

Conversation

@eduardstan

@eduardstan eduardstan commented Aug 17, 2026

Copy link
Copy Markdown
Member

Fixes #95.

Reachability Note

On main, src/bellatrex.jl is not included by SolePostHoc.jl or rule-extraction.jl, and test/bellatrex.jl was not listed in test/runtests.jl. The defects fixed here are real issues in the source code of src/bellatrex.jl, but are currently unreachable through the published package interface.

Making the fix testable within the package test suite requires including src/bellatrex.jl and registering the extractor in src/rule-extraction.jl. To keep product decisions under maintainer control, this PR is structured into two independent commits:

Commit Structure

  1. Commit 1 (1bb79bd): Fix bellatrex on non-ensemble models (fixes #95)Standalone Bug Fix

    • Placed isensemble(m) || error(...) at the top of bellatrex in src/bellatrex.jl, before trees(m) is called. This ensures non-ensemble models produce an immediate, clear refusal error rather than triggering a MethodError on trees(m).
    • Replaced the broken else block (listrules(model)) with direct rule extraction from trees(m), resolving the UndefVarError on unbound model.
    • Modifies only src/bellatrex.jl.
  2. Commit 2 (58daa1b): Activate BELLATREX module and register BellatrexRuleExtractorOptional Module Activation

@eduardstan
eduardstan force-pushed the fm/sole-bellatrex-fix branch from 4034a75 to 58daa1b Compare August 17, 2026 15:25
@eduardstan

Copy link
Copy Markdown
Member Author

The red check on this branch is not caused by this change.

The failing job errors in test/runtests.jl:28 ("Generic rule Extraction test"), before reaching
anything this PR touches — src/bellatrex.jl is still not included by the package and
test/bellatrex.jl is still not registered in runtests.jl, as the reachability note above records.
The suite result is 36 passed, 0 failed, 1 errored.

The error is an artifact resolution failure in a dependency:

Failed to setup espresso binary: Unable to automatically download/install artifact 'mitespresso'
from sources listed in '.../SoleData/92QnD/src/artifacts/Artifacts.toml'

- https://pkg.julialang.org/artifact/dbe79220f8352a25e5a79cdc3ede3c58abf9038f
    Error: RequestError: HTTP/2 404
- https://github.com/aclai-lab/Artifacts/raw/main/sole/binaries/minimizers/mitespresso.tar.gz
    Error: Tree Hash Mismatch!
  Expected git-tree-sha1:   dbe79220f8352a25e5a79cdc3ede3c58abf9038f
  Calculated git-tree-sha1: 7244d986f2e330dd6a51a41d410f36c94211af24

Both sources for the same artifact fail: the Julia package server has no copy under that tree hash,
and the tarball in aclai-lab/Artifacts no longer hashes to the value SoleData's Artifacts.toml
pins. That is consistent with the tarball having been rebuilt or replaced without the pinned hash
being updated alongside it.

If that reading is right, this affects every CI run that resolves mitespresso through SoleData,
not just this branch, and it is not fixable from here. Happy to open an issue on SoleData.jl with
this evidence if that is useful — say the word and I will.

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.

bellatrex raises UndefVarError on a non-ensemble model (listrules(model) should be listrules(m))

1 participant