Skip to content

Lumen refactoring #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open

Lumen refactoring #49

wants to merge 42 commits into from

Conversation

Perro2110
Copy link
Member

For possible registration of SolePostHoc.

@alberto-paparella
Copy link
Member

alberto-paparella commented Mar 28, 2025

Dear @Perro2110, can you update the cirrus.yaml file updating the freebsd version to 14.2, so that we can make sure that all tests are successfull?

@Perro2110
Copy link
Member Author

Good evening everyone!
Even after updating the image family, I'm still getting errors but I noticed that these errors were already present before this pull request. Is there anything else I can do? Once this branch is moved from dev to main, SolePostHoc will have one less dependency on packages not in main, leaving only one more package to fix and then we're done! After that, PostHoc will be ready !

@giopaglia
Copy link
Member

I cant see the error as the log is too long and I'm on my mobile. Can you link to the specific log line?

@giopaglia
Copy link
Member

On another note could the log be made shorter? I think it's full of debug info that can be hidden for clarity

@Perro2110
Copy link
Member Author

On another note could the log be made shorter? I think it's full of debug info that can be hidden for clarity

I'm not sure if you want this but in case I'll forward it to you:
in one of the FreeBSD JULIA_VERSION 1:

TEST: base.jl
TEST: test_tree.jl
Models: Error During Test at /tmp/cirrus-ci-build/test/runtests.jl:33
  Got exception outside of a @test
  LoadError: UndefVarError: `parsebaseformula` not defined in `SoleLogics`
  Stacktrace:
    [1] getproperty(x::Module, f::Symbol)
      @ Base ./Base.jl:42
    [2] top-level scope
      @ ~/tmp/cirrus-ci-build/test/test_tree.jl:16
    [3] include
      @ ./sysimg.jl:38 [inlined]
    [4] run_tests(list::Vector{String})
      @ Main ~/tmp/cirrus-ci-build/test/runtests.jl:11
    [5] macro expansion
      @ ~/tmp/cirrus-ci-build/test/runtests.jl:34 [inlined]
    [6] macro expansion
      @ ~/julia/share/julia/stdlib/v1.11/Test/src/Test.jl:1704 [inlined]
    [7] macro expansion
      @ ~/tmp/cirrus-ci-build/test/runtests.jl:34 [inlined]
    [8] macro expansion
      @ ~/julia/share/julia/stdlib/v1.11/Test/src/Test.jl:1704 [inlined]
    [9] top-level scope
      @ ~/tmp/cirrus-ci-build/test/runtests.jl:29
   [10] include(fname::String)
      @ Main ./sysimg.jl:38
   [11] top-level scope
      @ none:6
   [12] eval
      @ ./boot.jl:430 [inlined]
   [13] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:296
   [14] _start()
      @ Base ./client.jl:531
  in expression starting at /tmp/cirrus-ci-build/test/test_tree.jl:16

and:

##################################################
TEST: /tmp/cirrus-ci-build/pluto-demo.jl

##################################################
[.....]

1.0, lift = 3.75, natoms = 16)
▣ ((sepal_length < 5.55)) ∧ ((petal_width ≥ 1.0)) ∧ ((petal_width < 0.75)) ∧ ((petal_length < 2.7)) ∧ ((petal_width < 1.7000000000000002)) ∧ ((petal_length < 2.5)) ∧ ((petal_width < 0.8)) ∧ ((petal_width ≥ 0.7)) ∧ ((sepal_length ≥ 6.15)) ∧ ((petal_width < 1.7000000000000002)) ∧ ((petal_width ≥ 0.7)) ∧ ((petal_width ≥ 1.65)) ∧ ((sepal_length < 5.45)) ∧ ((sepal_width ≥ 2.65)) ∧ ((petal_length < 2.5)) ∧ ((petal_length < 2.5999999999999996))  ↣  setosa : (ninstances = 30, ncovered = 8, coverage = 0.27, confidence = 1.0, lift = 3.75, natoms = 16)ERROR: Package SoleModels errored during testing (received signal: KILL)
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types ~/julia/share/julia/stdlib/v1.11/Pkg/src/Types.jl:68
 [2] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
   @ Pkg.Operations ~/julia/share/julia/stdlib/v1.11/Pkg/src/Operations.jl:2118
 [3] test
   @ ~/julia/share/julia/stdlib/v1.11/Pkg/src/Operations.jl:2003 [inlined]
 [4] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::@Kwargs{io::IOContext{IO}})
   @ Pkg.API ~/julia/share/julia/stdlib/v1.11/Pkg/src/API.jl:481
 [5] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::IOContext{IO}, kwargs::@Kwargs{coverage::Bool})
   @ Pkg.API ~/julia/share/julia/stdlib/v1.11/Pkg/src/API.jl:159
 [6] test(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::@Kwargs{coverage::Bool})
   @ Pkg.API ~/julia/share/julia/stdlib/v1.11/Pkg/src/API.jl:174
 [7] top-level scope
   @ none:3
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
[....]

in FreeBsd JULIA_VERSION:1.9

[...]
  ✓ MLJTuning
  ✓ SoleModels
  ✓ MLJ
  ✓ SoleModels → DecisionTreeExt
  ✓ SoleModels → XGBoostExt
  244 dependencies successfully precompiled in 230 seconds. 4 already precompiled.
  11 dependencies had output during precompilation:
┌ InverseFunctionsDatesExt [33677a4c-2dac-51eb-93f3-7ff1c38acef2]
│  ┌ Warning: Module InverseFunctionsDatesExt with build ID ffffffff-ffff-ffff-0000-004713b98708 is missing from the cache.
│  │ This may mean InverseFunctionsDatesExt [33677a4c-2dac-51eb-93f3-7ff1c38acef2] does not support precompilation but is imported by a module that does.
│  └ @ Base loading.jl:1793
│  ┌ Error: Error during loading of extension InverseFunctionsDatesExt of InverseFunctions, use `Base.retry_load_extensions()` to retry.
│  │   exception =
│  │    1-element ExceptionStack:
│  │    Declaring __precompile__(false) is not allowed in files that are being precompiled.
│  │    Stacktrace:
│  │      [1] _require(pkg::Base.PkgId, env::Nothing)
│  │    @ Base ./loading.jl:1797
│  │      [2] _require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│  │    @ Base ./loading.jl:1660
│  │      [3] _require_prelocked(uuidkey::Base.PkgId)
│  │    @ Base ./loading.jl:1658
│  │      [4] run_extension_callbacks(extid::Base.ExtensionId)
│  │    @ Base ./loading.jl:1255
│  │      [5] run_extension_callbacks(pkgid::Base.PkgId)
│  │    @ Base ./loading.jl:1290
│  │      [6] run_package_callbacks(modkey::Base.PkgId)
│  │    @ Base ./loading.jl:1124
│  │      [7] _require_prelocked(uuidkey::Base.PkgId, env::String)
│  │    @ Base ./loading.jl:1667
│  │      [8] macro expansion
[...]

various dependencies like:

└  
┌ TimeseriesFeatures [f3112013-b923-4dfa-b867-8806c885f823]
│  WARNING: Wrapping `Vararg` directly in UnionAll is deprecated (wrap the tuple instead).
└  
┌ FilePathsBaseMmapExt [968c5e7e-8fc3-5f0f-93d2-8a5e0e125e4f]
│  ┌ Warning: Module FilePathsBaseMmapExt with build ID ffffffff-ffff-ffff-0000-004bf37d83dc is missing from the cache.
│  │ This may mean FilePathsBaseMmapExt [968c5e7e-8fc3-5f0f-93d2-8a5e0e125e4f] does not support precompilation but is imported by a module that does.
│  └ @ Base loading.jl:1793
│  ┌ Error: Error during loading of extension FilePathsBaseMmapExt of FilePathsBase, use `Base.retry_load_extensions()` to retry.
│  │   exception =
│  │    1-element ExceptionStack:
│  │    Declaring __precompile__(false) is not allowed in files that are being precompiled.
│  │    Stacktrace:
│  │      [1] _require(pkg::Base.PkgId, env::Nothing)
│  │    @ Base ./loading.jl:1797
│  │      [2] _require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│  │    @ Base ./loading.jl:1660
│  │      [3] _require_prelocked(2

and then:

##################################################
TEST: base.jl
TEST: test_tree.jl
Models: Error During Test at /tmp/cirrus-ci-build/test/runtests.jl:33
  Got exception outside of a @test
  LoadError: UndefVarError: `parsebaseformula` not defined
  Stacktrace:
    [1] getproperty(x::Module, f::Symbol)
      @ Base ./Base.jl:31
    [2] top-level scope
      @ ~/tmp/cirrus-ci-build/test/test_tree.jl:16
    [3] include
      @ ./client.jl:478 [inlined]
    [4] run_tests(list::Vector{String})
      @ Main ~/tmp/cirrus-ci-build/test/runtests.jl:11
    [5] macro expansion
      @ ~/tmp/cirrus-ci-build/test/runtests.jl:34 [inlined]
    [6] macro expansion
      @ ~/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1498 [inlined]
    [7] macro expansion
      @ ~/tmp/cirrus-ci-build/test/

@giopaglia
Copy link
Member

parsebaseformula is an obsolete function. Pushed a fix for this error.

@@ -93,7 +93,7 @@ export subtreeheight
include("symbolic-utils.jl")

export PlainRuleExtractor
export extractrules, listrules, joinrules
export modalextractrules, listrules, joinrules
Copy link
Member

Choose a reason for hiding this comment

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

I want to stress the fact that I'm not bothered by the function being called "modalextractrules". But we need to be able to call it "extractrules". So again my suggestion is on of the following:

  • rename the function into "extractrules", and then put a "const modalextractrules = extractrules; export modalextractrules" in a deprecate.jl file
  • keep the name "modalextractrules", but also put a "const extractrules = modalextractrules; export xtractrules" in a deprecate.jl file

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I fully agree, I chose the first option: rename the function into "extractrules", and then put a "const modalextractrules = extractrules; export modalextractrules" in a deprecate.jl file

@mauro-milella
Copy link
Member

Hi guys,

The error regarding FreeBSD, addressed by @Perro2110, is related to InverseFunctionsDatesExt. A similar error is highlighted in this issue. It seems fixed since 1 year ago (ref here), mmm.

Anyway, the error log also says "This may mean InverseFunctionsDatesExt [33677a4c-2dac-51eb-93f3-7ff1c38acef2] does not support precompilation but is imported by a module that does".

Maybe the problem is related to the __precompile__() directive used in ModalDecisionTrees, MultiData and SoleData?

@Perro2110 Perro2110 requested a review from PasoStudio73 April 26, 2025 21:56
@giopaglia giopaglia deleted the branch main April 27, 2025 11:55
@giopaglia giopaglia closed this Apr 27, 2025
@giopaglia
Copy link
Member

I accidentally closed the pr, as I have deleted the dev branch (this was in the plans). Let's see if we can make this merge into main.

@giopaglia giopaglia reopened this Apr 27, 2025
@giopaglia giopaglia changed the base branch from dev to main April 27, 2025 12:26
@giopaglia
Copy link
Member

Okay should be good to remove dev now

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.

5 participants