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

Expose API for Turing integration #90

Merged
merged 4 commits into from
Nov 3, 2023
Merged

Expose API for Turing integration #90

merged 4 commits into from
Nov 3, 2023

Conversation

FredericWantiez
Copy link
Member

No description provided.

@FredericWantiez FredericWantiez changed the title Move things around Expose API for Turing integration Nov 2, 2023
Copy link

codecov bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b157064) 95.86% compared to head (20aab8b) 96.09%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
+ Coverage   95.86%   96.09%   +0.23%     
==========================================
  Files           8        8              
  Lines         411      410       -1     
==========================================
  Hits          394      394              
+ Misses         17       16       -1     
Files Coverage Δ
ext/AdvancedPSLibtaskExt.jl 93.75% <100.00%> (+0.97%) ⬆️
src/model.jl 90.00% <100.00%> (+2.50%) ⬆️
src/rng.jl 90.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@yebai yebai left a comment

Choose a reason for hiding this comment

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

Thanks @FredericWantiez -- it looks nice overall. I left a few minor comments below.

@@ -134,10 +131,10 @@ function AbstractMCMC.step(
# Create reference trajectory.
AdvancedPS.forkr(copy(state.trajectory))
else
println(model)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
println(model)

trace = AdvancedPS.Trace(LibtaskModel(deepcopy(model), trng), trng)
addreference!(gen_model.ctask.task, trace) # Do we need it here ?
trace = AdvancedPS.Trace(deepcopy(model), trng)
AdvancedPS.addreference!(trace.model.ctask.task, trace) # Do we need it here ?
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
AdvancedPS.addreference!(trace.model.ctask.task, trace) # Do we need it here ?
AdvancedPS.addreference!(trace.model.ctask.task, trace) # TODO: Do we need it here ?

gen_model = LibtaskModel(deepcopy(model), trng)
trace = AdvancedPS.Trace(LibtaskModel(deepcopy(model), trng), trng)
addreference!(gen_model.ctask.task, trace) # Do we need it here ?
trace = AdvancedPS.Trace(deepcopy(model), trng)
Copy link
Member

@yebai yebai Nov 3, 2023

Choose a reason for hiding this comment

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

Did we define deepcopy(::LibtaskModel)? I can't find it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think model here is still the original model type: AbstractGenericModel of some sort. We wrap it inside a LibtaskModel in the Trace constructor

@yebai yebai marked this pull request as ready for review November 3, 2023 19:47
Copy link
Contributor

github-actions bot commented Nov 3, 2023

Pull Request Test Coverage Report for Build 6750233421

  • 19 of 19 (100.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 96.098%

Files with Coverage Reduction New Missed Lines %
src/model.jl 1 90.0%
Totals Coverage Status
Change from base Build 6659274402: 0.2%
Covered Lines: 394
Relevant Lines: 410

💛 - Coveralls

@yebai yebai merged commit 8518ef4 into master Nov 3, 2023
15 of 20 checks passed
@yebai yebai deleted the fred/turing branch November 3, 2023 21:38
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.

None yet

2 participants