Skip to content

Commit

Permalink
Merge pull request #310 from ReactiveBayes/graphppl-lazylabels
Browse files Browse the repository at this point in the history
Minor changes for GraphPPL 4.2.0
  • Loading branch information
bvdmitri authored May 23, 2024
2 parents 0613ea1 + 3215f33 commit 736e74b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "RxInfer"
uuid = "86711068-29c9-4ff7-b620-ae75d7495b3d"
authors = ["Bagaev Dmitry <[email protected]> and contributors"]
version = "3.2.0"
version = "3.3.0"

[deps]
BayesBase = "b4ee3484-f114-42fe-b91c-797d54a0c67e"
Expand All @@ -28,7 +28,7 @@ Distributions = "0.25"
DomainSets = "0.5.2, 0.6, 0.7"
ExponentialFamily = "1.2"
FastCholesky = "1.3.0"
GraphPPL = "~4.1.0"
GraphPPL = "~4.2.0"
LinearAlgebra = "1.9"
MacroTools = "0.5.6"
Optim = "1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"downloadUrl": "https://github.com/reactivebayes/RxInfer.jl/releases",
"issueTracker": "https://github.com/reactivebayes/RxInfer.jl/issues",
"name": "RxInfer.jl",
"version": "3.2.0",
"version": "3.3.0",
"description": "Julia package for automated, scalable and efficient Bayesian inference on factor graphs with reactive message passing. ",
"applicationCategory": "Statistics",
"developmentStatus": "active",
"readme": "https://reactivebayes.github.io/RxInfer.jl/stable/",
"softwareVersion": "3.2.0",
"softwareVersion": "3.3.0",
"keywords": [
"Bayesian inference",
"message passing",
Expand Down
8 changes: 4 additions & 4 deletions src/model/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ function Base.show(io::IO, ::DeferredDataHandler)
print(io, "[ deffered data ]")
end

# We use the `LazyIndex` to instantiate the data interface for the model, in case of `DeferredDataHandler`
# We use the `datalabel` to instantiate the data interface for the model, in case of `DeferredDataHandler`
# the data is not known at the time of the model creation
function __infer_create_data_interface(model, context, key::Symbol, ::DeferredDataHandler)
return GraphPPL.getorcreate!(model, context, GraphPPL.NodeCreationOptions(kind = :data, factorized = true), key, GraphPPL.LazyIndex())
return GraphPPL.datalabel(model, context, GraphPPL.NodeCreationOptions(kind = :data, factorized = true), key, GraphPPL.MissingCollection())
end

# In all other cases we use the `LazyIndex` to instantiate the data interface for the model and the data is known at the time of the model creation
# In all other cases we use the `datalabel` to instantiate the data interface for the model and the data is known at the time of the model creation
function __infer_create_data_interface(model, context, key::Symbol, data)
return GraphPPL.getorcreate!(model, context, GraphPPL.NodeCreationOptions(kind = :data, factorized = true), key, GraphPPL.LazyIndex(data))
return GraphPPL.datalabel(model, context, GraphPPL.NodeCreationOptions(kind = :data, factorized = true), key, data)
end

merge_data_handlers(data::Dict, newdata::Dict) = merge(data, newdata)
Expand Down

2 comments on commit 736e74b

@bvdmitri
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/107514

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v3.3.0 -m "<description of version>" 736e74b6f996356ea9f9e9202bcf4417a4f500a8
git push origin v3.3.0

Please sign in to comment.