-
Notifications
You must be signed in to change notification settings - Fork 125
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
new internal API for sampling #875
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #875 +/- ##
===========================================
- Coverage 85.71% 69.84% -15.88%
===========================================
Files 36 42 +6
Lines 2542 2792 +250
===========================================
- Hits 2179 1950 -229
- Misses 363 842 +479 ☔ View full report in Codecov by Sentry. |
This will actually be solved when I manage to find the time to finish the work in https://github.com/Tortar/IteratorSampling.jl hopefully soon |
Everything works now, so I think it should be good to go I needed to add some more Pkg tricks though because I noticed that if you didn't have internet connection the solution in #955 didn't work (and so you couldn't test the package at all because it tried to fetch it from github), I verified that instead it works like this. This (mess :D) is only temporary, when we release v6 we will rapidly delete all of this. I made our sampling depending from https://github.com/Tortar/IteratorSampling.jl where the sampling process is much more well tested than how it was in our library, so I guess it's okay to depend from it :-) Anyway there we have also fast sampling for multiple items, but here I didn't include it because it requires some more work (issue tracked in #837) |
actually there are some ensemble tests which didn't fail locally, not sure why at the moment |
mmmmh, they seem actually totally unrelated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked for performance regressions? The introduction of Iteartors.Filter
e.g. could add some.
checked briefly with this code using Agents, BenchmarkTools
@agent A GridAgent{2} begin
end
agent_step!(a,m) = nothing
function aperiodic_model(; griddims = (100, 100))
space = GridSpace(griddims, periodic = false)
model = ABM(A, space; agent_step!)
fill_space!(model)
return model
end
function periodic_model(; griddims = (100, 100))
space = GridSpace(griddims, periodic = true)
model = ABM(A, space; agent_step!)
fill_space!(model)
return model
end
@btime random_nearby_id($(1,1), model, 10) setup=(model=periodic_model());
@btime random_nearby_id($(50,50), model, 10) setup=(model=periodic_model());
@btime random_nearby_id($(1,1), model, 1) setup=(model=aperiodic_model());
@btime random_nearby_id($(50,50), model, 1) setup=(model=aperiodic_model()); no perf regression, same perf, in general I expect the same for all the other function apart from a little improvement where I introduced the new So I think this PR should be good to go as it is. Let's see in the future if we want to support optimized multi sampling procedures or maybe give to the users some advice on how to perform them by themselves. Maybe we can discuss that in our call too :-) |
yes, this is good from me as well, but all tests fail! |
If you could try to run tests too locally it would be even more solid to conclude that something is strange just on github |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If tests pass locally I trust you. We would need to figure out how to solve this before v6. (if tests fail on main
after merging this, we should also open an issue to keep track of things.
tests passed when you merged, so I think it alright |
This will solve #837 when finished