Skip to content
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

39 refactor mljflux interface #92

Merged
merged 35 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8664cf9
split LaplaceApproximation. Removed Duplicated MMI.clean! function. U…
pasq-cat May 30, 2024
039f172
updated metadata and changelog. uploaded Project.toml
pasq-cat May 30, 2024
e0d7aab
removed link_approx as parameter in LaplaceRegression since it is not…
pasq-cat May 31, 2024
5d19437
removed link_approx as parameter in LaplaceRegression since it is not…
pasq-cat May 31, 2024
099de43
Merge branch '39-refactor-mljflux-interface' of https://github.com/Ju…
pasq-cat May 31, 2024
9f4edbd
fixed fit! function for regression. classification not complete yet.
pasq-cat Jun 3, 2024
437405b
updated with the new MLJ @mlj_model macro
pasq-cat Jun 8, 2024
93140f8
add constraints on parameters
pasq-cat Jun 8, 2024
352c961
added the project.toml of laplaceredux
pasq-cat Jun 8, 2024
45f9fb7
updated struct and test.
pasq-cat Jun 12, 2024
19e9b7f
ops forgot changelog
pasq-cat Jun 12, 2024
9275277
partial fixes. fit! function gives trouble
pasq-cat Jun 13, 2024
651a9bb
fixed the version of Distribution used in project.toml (compat). thi…
pasq-cat Jun 14, 2024
56bd1de
last attempt.
pasq-cat Jun 15, 2024
a5a327d
formatting
pat-alt Jun 15, 2024
66b09a9
formatter; explicit imports; fixed error (was passing on one-hot enco…
pat-alt Jun 15, 2024
f95a484
fix error related to mean/var
pat-alt Jun 15, 2024
5d47558
small changes to CI
pat-alt Jun 15, 2024
48d647f
added docstrings, removed prints and comments. there is still the pre…
pasq-cat Jun 16, 2024
1b05992
partial (the update method is missing)
pasq-cat Jun 23, 2024
0bf4ea8
[internet-not working]: changed fitresult and the position of report
pasq-cat Jun 24, 2024
7b8f6ab
Revert "[internet-not working]: changed fitresult and the position of…
pasq-cat Jun 24, 2024
506883b
trying to modify mljflux.update. Added Optimisers package to project,…
pasq-cat Jun 25, 2024
0886ce8
passed to new api. update still missing and it seems there is an iss…
pasq-cat Jun 27, 2024
63cef62
attempted mljflux.update for regression
pasq-cat Jun 29, 2024
af6c210
boh i don't know why it doesn't work.
pasq-cat Jun 29, 2024
8389660
not sure we actually need to overload the update function
pat-alt Jul 1, 2024
e61af35
issues seem to be largely related to logging
pat-alt Jul 1, 2024
a52b545
few things
pat-alt Jul 1, 2024
65f8237
attempt to add equality functions
pat-alt Jul 1, 2024
1d4036d
all tests passing, but some more cleaning to do
pat-alt Jul 1, 2024
cdd1328
compat issues
pat-alt Jul 1, 2024
b7e040d
bumped version because zero major versions cause compat headaches wit…
pat-alt Jul 1, 2024
c97422f
changelog
pat-alt Jul 1, 2024
8523eed
small stuff: fixed docstrings and fitresult(regression) function. com…
pasq-cat Jul 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
matrix:
version:
- '1.7'
- '1.8'
- '1.9'
- '1.10'
os:
- ubuntu-latest
Expand All @@ -33,9 +31,6 @@ jobs:
- os: windows-latest
version: '1.7'
arch: x64
- os: windows-latest
version: '1.8'
arch: x64
- os: windows-latest
version: '1'
arch: x64
Expand All @@ -45,9 +40,6 @@ jobs:
- os: macOS-latest
version: '1.7'
arch: x64
- os: macOS-latest
version: '1.8'
arch: x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
Expand All @@ -60,9 +52,10 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
files: lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
docs:
name: Documentation
runs-on: ubuntu-latest
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,4 @@ jobs:
run: |
using JuliaFormatter
format("."; verbose=true)
shell: julia --color=yes {0}
- name: Suggest formatting changes
uses: reviewdog/action-suggester@v1
if: github.event_name == 'pull_request'
with:
tool_name: JuliaFormatter
fail_on_error: true
shell: julia --color=yes {0}
40 changes: 40 additions & 0 deletions CHANGELOG.md
Copy link
Member

Choose a reason for hiding this comment

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

please add in square brackets the corresponding PR/branch number

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,46 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

*Note*: We try to adhere to these practices as of version [v0.2.1].

## Version [0.3.0] - 2024-06-8

### Changed

- Updated codecov workflow in CI.yml. [#39]
- fixed test functions [#39]
- adapted the LaplaceClassification and the LaplaceRegression struct to use the new @mlj_model macro from MLJBase.[#39]
- Changed the fit! method arguments. [#39]
- Changed the predict functions for both LaplaceClassification and LaplaceRegression.[#39]

### Removed

- Removed the shape, build and clean! functions.[#39]
- Removed Review dog for code format suggestions. [#39]

## Version [0.2.3] - 2024-05-31

### Changed

- Removed the link_approx parameter in LaplaceRegression since it is not required.
- Changed MMI.clean! to check the value of link_approx only in the case likelihood is set to `:classification`
- Now the likelihood type in LaplaceClassification and LaplaceRegression is automatically set by the inner constructor. The user is not required to provide it as a parameter anymore.




## Version [0.2.2] - 2024-05-30

### Changed

- Unified duplicated function MMI.clean!: previously MMI.clean! consisted of two separate functions for handling :classification and :regression types respectively. Now, a single MMI.clean! function handles both cases efficiently.[#39]
- Split LaplaceApproximation struct in two different structs:LaplaceClassification and LaplaceRegression [#39]
- Unified the MLJFlux.shape and the MLJFlux.build functions to handle both :classification and :regression tasks. In particular, shape now handles multi-output regression cases too [[#39](https://github.com/JuliaTrustworthyAI/LaplaceRedux.jl/issues/39)]
- Changed model metadata for LaplaceClassification and LaplaceRegression

### Added
Added Distributions to LaplaceRedux dependency ( needed for MMI.predict(model::LaplaceRegression, fitresult, Xnew) )



## Version [0.2.1] - 2024-05-29

### Changed
Expand Down
16 changes: 11 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ version = "0.2.1"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
ComputationalResources = "ed09eef8-17a6-5b46-8889-db040fac31e3"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
MLJFlux = "094fc8d1-fd35-5302-93ea-dabda2abf845"
MLJModelInterface = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand All @@ -24,19 +27,22 @@ Aqua = "0.8"
ChainRulesCore = "1.23.0"
Compat = "4.7.0"
ComputationalResources = "0.3.2"
Distributions = "0.25.109"
Flux = "0.12, 0.13, 0.14"
LinearAlgebra = "1.6, 1.7, 1.8, 1.9, 1.10"
MLJFlux = "0.2.10, 0.3, 0.4"
LinearAlgebra = "1.7, 1.10"
MLJBase = "0, 1.4.0"
MLJFlux = "0.2.10, 0.3, 0.4, 0.5.1"
MLJModelInterface = "1.8.0"
MLUtils = "0.4.3"
Optimisers = "0.3.3"
ProgressMeter = "1.7.2"
Random = "1.6, 1.7, 1.8, 1.9, 1.10"
Random = "1.7, 1.10"
Statistics = "1"
Tables = "1.10.1"
Test = "1.6, 1.7, 1.8, 1.9, 1.10"
Test = "1.7, 1.10"
Tullio = "0.3.5"
Zygote = "0.6"
julia = "1.6, 1.7, 1.8, 1.9, 1.10"
julia = "1.7, 1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
8 changes: 4 additions & 4 deletions dev/notebooks/mlj-interfacing/mlj.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"│ \n",
"│ In general, data in `machine(model, data...)` is expected to satisfy\n",
"│ \n",
"│ scitype(data) <: MLJ.fit_data_scitype(model)\n",
"│ scitype(data) <: MLJBase.fit_data_scitype(model)\n",
"│ \n",
"│ In the present case:\n",
"│ \n",
Expand Down Expand Up @@ -194,7 +194,7 @@
}
],
"source": [
"MLJ.fit!(mach)"
"MLJBase.fit!(mach)"
]
},
{
Expand All @@ -214,7 +214,7 @@
}
],
"source": [
"MLJ.predict(mach, MLJBase.table(rand(Float32, 1, 4)))"
"MLJBase.predict(mach, MLJBase.table(rand(Float32, 1, 4)))"
]
},
{
Expand Down Expand Up @@ -323,7 +323,7 @@
}
],
"source": [
"MLJ.predict(mach, X)"
"MLJBase.predict(mach, X)"
]
},
{
Expand Down
Loading
Loading