diff --git a/README.md b/README.md index f382db93a..8a5e34975 100644 --- a/README.md +++ b/README.md @@ -171,51 +171,31 @@ Our high-level project roadmap outlines the key milestones and focus areas for t For a more granular view of our progress and ongoing tasks, check out our [project board](https://github.com/orgs/reactivebayes/projects/2/views/4) or join our 4-weekly [public meetings](https://dynalist.io/d/F4aA-Z2c8X-M1iWTn9hY_ndN). -# External Contributors -RxInfer has benefited from the contributions and development efforts of external collaborators and organizations. We're grateful for their involvement in advancing the project. +# Join Our Community and Contribute to RxInfer -## Active Inference Institute +RxInfer is a community-driven project and we welcome all contributions! To get started: +- Check out our [contributing guide](https://reactivebayes.github.io/RxInfer.jl/stable/contributing/guide) +- Review the [contributing guidelines](https://reactivebayes.github.io/RxInfer.jl/stable/contributing/guidelines) +- Browse [beginner-friendly issues](https://github.com/ReactiveBayes/RxInfer.jl/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) to find something that interests you -Members of the [Active Inference Institute](https://www.activeinference.org/) have been working on improving the visualization capabilities of RxInfer/GraphPPL. Their efforts focus on developing better model visualization capabilities, creating various summary/subgraph visualization modalities, implementing different graph layout algorithms, and improving the ability to inspect and understand models. +## Active Inference Institute Collaboration -For more details on their ongoing work, see the [RxInfer development project board](https://coda.io/d/RxInfer-2024-Active-Inference-Institute_ddtS-XZ4BJb/Developing-RxInfer-jl_sufeCeIa#_lutfq_7F). +The [Active Inference Institute](https://www.activeinference.org/) community members are enhancing RxInfer/GraphPPL's visualization capabilities. Their work includes: +- Developing advanced model visualization features +- Creating summary and subgraph visualization modalities +- Implementing various graph layout algorithms +- Improving model inspection and understanding tools -## Educational Content +For more details on ongoing work, see the [RxInfer development project board](https://coda.io/d/RxInfer-2024-Active-Inference-Institute_ddtS-XZ4BJb/Developing-RxInfer-jl_sufeCeIa#_lutfq_7F). -Educational content and tutorials related to RxInfer are being developed and can be found on [Learnable Loop](https://learnableloop.com/#category=RxInfer). These resources cover a range of topics including visualizing Forney Factor Graphs, sales forecasting with time-varying autoregressive models, hidden Markov models with control, and various applications of Active Inference across different domains. +## Learning Resources -# Contributing - -We welcome contributions from the community. If you are interested in contributing to the development of `RxInfer.jl`, please check out our [contributing guide](https://reactivebayes.github.io/RxInfer.jl/stable/contributing/guide), the [contributing guidelines](https://reactivebayes.github.io/RxInfer.jl/stable/contributing/guidelines), or look at the [issues linked with the `good first issue` label](https://github.com/ReactiveBayes/RxInfer.jl/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) to get started. - -# Where to go next? - -There are a set of [examples](https://reactivebayes.github.io/RxInfer.jl/stable/examples/overview/) available in `RxInfer` repository that demonstrate the more advanced features of the package. Alternatively, you can head to the [documentation](https://reactivebayes.github.io/RxInfer.jl/stable/) that provides more detailed information of how to use `RxInfer` to specify more complex probabilistic models. - -## Ecosystem - -The `RxInfer` framework consists of three *core* packages developed by [ReactiveBayes](https://github.com/reactivebayes/): - -- [`ReactiveMP.jl`](https://github.com/reactivebayes/ReactiveMP.jl) - the underlying message passing-based inference engine -- [`GraphPPL.jl`](https://github.com/reactivebayes/GraphPPL.jl) - model and constraints specification package -- [`Rocket.jl`](https://github.com/reactivebayes/Rocket.jl) - reactive extensions package for Julia - -## JuliaCon 2023 presentation - -Additionally, checkout our [video from JuliaCon 2023](https://www.youtube.com/watch?v=qXrvDVm_fnE) for a high-level overview of the package - -
- -## Our presentation at the Julia User Group Munich meetup - -Also check out the recorded presentation at the Julia User Group Munich meetup for a more detailed overview of the package - - +The community maintains educational content and tutorials on [Learnable Loop](https://learnableloop.com/#category=RxInfer), covering topics such as: +- Visualizing Forney Factor Graphs +- Sales forecasting with time-varying autoregressive models +- Hidden Markov models with control +- Applications of Active Inference across different domains # License diff --git a/docs/make.jl b/docs/make.jl index b7334acde..9c2c3e7db 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -69,10 +69,13 @@ foreach(vcat(ExamplesOverviewPath, ExamplesCategoriesOverviewPaths)) do path @warn "`$(path)` does not exist. Generating an empty overview. Use the `make examples` command to generate the overview and all examples." mkpath(dirname(path)) open(path, "w") do f - write(f, """ - $(isequal(path, ExamplesOverviewPath) ? "# [Examples overview](@id examples-overview)" : "") - The overview is missing. Use the `make examples` command to generate the overview and all examples. - """) + write( + f, + """ + $(isequal(path, ExamplesOverviewPath) ? "# [Examples overview](@id examples-overview)" : "") + The overview is missing. Use the `make examples` command to generate the overview and all examples. + """ + ) end end end @@ -105,22 +108,10 @@ makedocs(; "Model specification" => "manuals/model-specification.md", "Constraints specification" => "manuals/constraints-specification.md", "Meta specification" => "manuals/meta-specification.md", - "Inference specification" => [ - "Overview" => "manuals/inference/overview.md", - "Static inference" => "manuals/inference/static.md", - "Streamline inference" => "manuals/inference/streamlined.md", - "Initialization" => "manuals/inference/initialization.md", - "Auto-updates" => "manuals/inference/autoupdates.md", - "Deterministic nodes" => "manuals/inference/delta-node.md", - "Non-conjugate inference" => "manuals/inference/nonconjugate.md", - "Undefined message update rules" => "manuals/inference/undefinedrules.md" - ], - "Inference customization" => [ - "Defining a custom node and rules" => "manuals/customization/custom-node.md", - "Inference results postprocessing" => "manuals/customization/postprocess.md", - ], - "Debugging" => "manuals/debugging.md", - "Migration from v2 to v3" => "manuals/migration-guide-v2-v3.md" + "Inference specification" => ["Overview" => "manuals/inference/overview.md", "Static inference" => "manuals/inference/static.md", "Streamline inference" => "manuals/inference/streamlined.md", "Initialization" => "manuals/inference/initialization.md", "Auto-updates" => "manuals/inference/autoupdates.md", "Deterministic nodes" => "manuals/inference/delta-node.md", "Non-conjugate inference" => "manuals/inference/nonconjugate.md", "Undefined message update rules" => "manuals/inference/undefinedrules.md"], + "Inference customization" => ["Defining a custom node and rules" => "manuals/customization/custom-node.md", "Inference results postprocessing" => "manuals/customization/postprocess.md"], + "Debugging" => "manuals/debugging.md", + "Migration from v2 to v3" => "manuals/migration-guide-v2-v3.md" ], "Library" => [ "Model construction" => "library/model-construction.md", @@ -131,11 +122,11 @@ makedocs(; "Examples" => [ "Overview" => "examples/overview.md", # This must be auto-generated with `make examples` ExamplesPages..., - "External examples" => "contributing/external-examples.md" + "Contribute by examples" => "contributing/examples.md" ], "Contributing" => [ "Contribution guide" => "contributing/guide.md", - "Contribution guidelines"=> "contributing/guidelines.md", + "Contribution guidelines" => "contributing/guidelines.md", "Contributing to the documentation" => "contributing/new-documentation.md", "Contributing to the examples" => "contributing/new-example.md", "Publishing a new release" => "contributing/new-release.md" diff --git a/docs/src/contributing/examples.md b/docs/src/contributing/examples.md new file mode 100644 index 000000000..0a09016a8 --- /dev/null +++ b/docs/src/contributing/examples.md @@ -0,0 +1,11 @@ +# [Contributing by examples](@id examples) + +We welcome examples from the community that showcase RxInfer.jl in action! Whether you're working in machine learning, signal processing, robotics, computational biology, or any other domain - your contributions help others learn and explore probabilistic modeling with RxInfer.jl. + +## Featured Examples + +- **Active Inference with RxInfer.jl** - Dive into the realm of Active Inference guided by [Kobus Esterhuysen](https://www.linkedin.com/in/kobusesterhuysen/) at [Learnable Loop](https://learnableloop.com/#category=RxInfer). +- **Tutorial Series on RxInfer.jl** - Explore a series of engaging tutorial videos on RxInfer.jl's functionalities, presented by [@doggotodjl](https://www.youtube.com/@doggodotjl/search?query=RxInfer). + +!!! note + If you're interested in contributing an example, we'd love to hear from you! Please initiate an issue or start a new discussion on our [GitHub repository](https://github.com/reactivebayes/RxInfer.jl) to get involved. diff --git a/docs/src/contributing/external-examples.md b/docs/src/contributing/external-examples.md deleted file mode 100644 index d0e888f06..000000000 --- a/docs/src/contributing/external-examples.md +++ /dev/null @@ -1,11 +0,0 @@ -# [External Examples](@id external-examples) - -RxInfer.jl welcomes contributions of external examples that demonstrate the use of the package across a variety of probabilistic models. - -## Featured Examples - -- **Active Inference with RxInfer.jl** - Dive into the realm of Active Inference guided by [Kobus Esterhuysen](https://www.linkedin.com/in/kobusesterhuysen/) at [Learnable Loop](https://learnableloop.com/#category=RxInfer). -- **Tutorial Series on RxInfer.jl** - Explore a series of engaging tutorial videos on RxInfer.jl's functionalities, presented by [@doggotodjl](https://www.youtube.com/@doggodotjl/search?query=RxInfer). - -!!! note - If you're interested in contributing an external example, we'd love to hear from you! Please initiate an issue or start a new discussion on our [GitHub repository](https://github.com/reactivebayes/RxInfer.jl) to get involved. diff --git a/examples/.meta.jl b/examples/.meta.jl index 499b06bef..676418994 100644 --- a/examples/.meta.jl +++ b/examples/.meta.jl @@ -3,22 +3,10 @@ # Please carefully read the documentation section `Contributing: new example` for more information return ( categories = ( - basic_examples = ( - title = "Basic examples", - description = "Basic examples contain \"Hello World!\" of Bayesian inference in RxInfer.", - ), - advanced_examples = ( - title = "Advanced examples", - description = "Advanced examples contain more complex inference problems.", - ), - problem_specific = ( - title = "Problem specific", - description = "Problem specific examples contain specialized models and inference for various domains.", - ), - hidden_examples = ( - title = "", - description = "" - ) + basic_examples = (title = "Basic examples", description = "Basic examples contain \"Hello World!\" of Bayesian inference in RxInfer."), + advanced_examples = (title = "Advanced examples", description = "Advanced examples contain more complex inference problems."), + problem_specific = (title = "Problem specific", description = "Problem specific examples contain specialized models and inference for various domains."), + hidden_examples = (title = "", description = "") ), examples = [ ( @@ -39,16 +27,14 @@ return ( description = "In this demo, we are interested in Bayesian state estimation in different types of State-Space Models, including linear, nonlinear, and cases with missing observations", category = :basic_examples ), - ( filename = "Predicting Bike Rental Demand.ipynb", title = "Predicting Bike Rental Demand", description = "An illustrative guide to implementing prediction mechanisms within RxInfer.jl, using bike rental demand forecasting as a contextual example.", category = :basic_examples ), - ( - filename = "Hidden Markov Model.ipynb", + filename = "Hidden Markov Model.ipynb", title = "How to train your Hidden Markov Model", description = "An example of structured variational Bayesian inference in Hidden Markov Model with unknown transition and observational matrices.", category = :basic_examples @@ -108,8 +94,8 @@ return ( category = :advanced_examples ), ( - filename = "Autoregressive Models.ipynb", - title = "Autoregressive Models", + filename = "Autoregressive Models.ipynb", + title = "Autoregressive Models", description = "An example of Bayesian treatment of latent AR and ARMA models. Reference: [Albert Podusenko, Message Passing-Based Inference for Time-Varying Autoregressive Models](https://www.mdpi.com/1099-4300/23/6/683).", category = :problem_specific ), @@ -135,7 +121,7 @@ return ( filename = "Invertible Neural Network Tutorial.ipynb", title = "Invertible neural networks: a tutorial", description = "An example of variational Bayesian Inference with invertible neural networks. Reference: Bart van Erp, Hybrid Inference with Invertible Neural Networks in Factor Graphs.", - category = :problem_specific + category = :problem_specific ), ( filename = "Probit Model (EP).ipynb", @@ -155,18 +141,7 @@ return ( description = "In this example we create a non-conjugate model and use a nonlinear link function between variables. We show how to extend the functionality of `RxInfer` and to create a custom factor node with arbitrary message passing update rules.", category = :problem_specific ), - ( - filename = "Universal Mixtures.ipynb", - title = "Universal Mixtures", - description = "Universal mixture modeling.", - category = :problem_specific - ), - - ( - filename = "Tiny Benchmark.ipynb", - title = "Tiny Benchmark", - description = "Tiny Benchmark for Internal testing.", - category = :hidden_examples - ), + (filename = "Universal Mixtures.ipynb", title = "Universal Mixtures", description = "Universal mixture modeling.", category = :problem_specific), + (filename = "Tiny Benchmark.ipynb", title = "Tiny Benchmark", description = "Tiny Benchmark for Internal testing.", category = :hidden_examples) ] ) diff --git a/ext/ProjectionExt/ProjectionExt.jl b/ext/ProjectionExt/ProjectionExt.jl index f7e455da1..807a93e81 100644 --- a/ext/ProjectionExt/ProjectionExt.jl +++ b/ext/ProjectionExt/ProjectionExt.jl @@ -42,4 +42,4 @@ function ReactiveMP.constrain_form(constraint::ProjectedTo, context::ProjectionC return result end -end \ No newline at end of file +end diff --git a/paper/example.jl b/paper/example.jl index 0f68391fa..ae34e2d47 100644 --- a/paper/example.jl +++ b/paper/example.jl @@ -143,11 +143,11 @@ savefig(p, "inference.pdf") using BenchmarkTools # See the optimization flags in the `compile.sh` file -benchmark = @benchmark experiment(data[3]) setup=(data = dataset(T = 1000; precision = 1.0)) seconds = 15 +benchmark = @benchmark experiment(data[3]) setup = (data = dataset(T = 1000; precision = 1.0)) seconds = 15 @info "Writing the benchmark results..." -open("benchmark.txt", "w") do file +open("benchmark.txt", "w") do file show(file, "text/plain", benchmark) versioninfo(file, verbose = false) end diff --git a/paper/paper.md b/paper/paper.md index 00f766139..37caa0c22 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -133,7 +133,7 @@ We present **RxInfer.jl**, a package for processing infinite data streams by rea inference solutions for linear Gaussian dynamical systems, autoregressive models, hierarchical models, discrete-valued models, mixture models, invertible neural networks [@van_erp_hybrid_2022], arbitrary nonlinear state transition functions, and conjugate pair primitives. -- The inference procedure is auto-differentiable with external packages, such as **ForwardDiff.jl** [@revels_forward-mode_2016] +- The inference procedure is auto-differentiable with automatic differentiation packages of Julia community, such as **ForwardDiff.jl** [@revels_forward-mode_2016] or **ReverseDiff.jl**. - The inference engine supports different types of floating-point numbers, such as `Float32`, `Float64`, and `BigFloat`. diff --git a/scripts/examples.jl b/scripts/examples.jl index 07df34dbb..551b61f9d 100644 --- a/scripts/examples.jl +++ b/scripts/examples.jl @@ -223,7 +223,7 @@ function Base.run(examplesrunner::ExamplesRunner) end end - write(io_main_overview, "- [External examples](@ref external-examples): Featured examples from the community.\n") + write(io_main_overview, "- [Contribute by examples](@ref examples): Featured examples from the community.\n") foreach(examples) do example mdname = replace(example[:filename], ".ipynb" => ".md")