-
-
Notifications
You must be signed in to change notification settings - Fork 92
propagate rand 0.9 xoshiro 0.7 deps #580
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
base: main
Are you sure you want to change the base?
Conversation
@@ -55,4 +55,4 @@ maintenance = { status = "actively-developed" } | |||
|
|||
[package.metadata.docs.rs] | |||
targets = ["x86_64-unknown-linux-gnu"] | |||
features = ["serde1"] |
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.
Why is serde1
removed?
@@ -146,7 +146,7 @@ impl<P, F, R> ParticleSwarm<P, F, R> | |||
where | |||
P: Clone + SyncAlias + ArgminSub<P, P> + ArgminMul<F, P> + ArgminRandom + ArgminZeroLike, | |||
F: ArgminFloat, | |||
R: Rng, | |||
R: Rng + RngCore, |
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.
Could you explain why this is necessary, please?
@@ -511,7 +511,7 @@ where | |||
// `1 / (1 + exp((next_cost - prev_cost) / current_temperature))`, | |||
// | |||
// which will always be between 0 and 0.5. | |||
let prob: f64 = self.rng.gen(); | |||
let prob: f64 = self.rng.random(); |
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.
Could you point me to the documentation where this change is described, please?
Thanks for the contribution! I have a few minor questions. |
first i got rid of the feature, then i saw it was changed to serde , forgot
to re-establish it
Le sam. 22 mars 2025 à 15:07, Stefan Kroboth ***@***.***> a
écrit :
… ***@***.**** commented on this pull request.
------------------------------
In crates/argmin/Cargo.toml
<#580 (comment)>:
> @@ -43,7 +43,7 @@ argmin-checkpointing-file = { path = "../argmin-checkpointing-file" }
[features]
default = []
wasm-bindgen = ["getrandom/js"]
-serde1 = ["serde", "rand_xoshiro/serde1"]
Why is this feature removed instead of changed to rand_xoshiro/serde as
mentioned in the changelog
<https://github.com/rust-random/rngs/blob/master/rand_xoshiro/CHANGELOG.md>
?
—
Reply to this email directly, view it on GitHub
<#580 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEXM7NJ4VWVGOOEQAVKVOMD2VVVBLAVCNFSM6AAAAABZQFQ5IWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDOMBYGA2DGMRTGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
fn gen <https://docs.rs/rand/latest/rand/trait.Rng.html#method.gen><T>(&mut
self) -> T
where StandardUniform
<https://docs.rs/rand/latest/rand/distr/struct.StandardUniform.html>:
Distribution
<https://docs.rs/rand/latest/rand/distr/trait.Distribution.html><T>,
👎Deprecated since 0.9.0: Renamed to random to avoid conflict with the new
gen keyword in Rust 2024.
Alias for Rng::random
<https://docs.rs/rand/latest/rand/trait.Rng.html#method.random>.
Le sam. 22 mars 2025 à 15:12, Stefan Kroboth ***@***.***> a
écrit :
… ***@***.**** commented on this pull request.
------------------------------
In crates/argmin/src/solver/simulatedannealing/mod.rs
<#580 (comment)>:
> @@ -511,7 +511,7 @@ where
// `1 / (1 + exp((next_cost - prev_cost) / current_temperature))`,
//
// which will always be between 0 and 0.5.
- let prob: f64 = self.rng.gen();
+ let prob: f64 = self.rng.random();
Could you point me to the documentation where this change is described,
please?
—
Reply to this email directly, view it on GitHub
<#580 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEXM7NIYLUF3GXNY3WXVSTL2VVVT5AVCNFSM6AAAAABZQFQ5IWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDOMBYGA2DKOBZGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
coompiler asked it during modifs but in fact uncessary. Rng : RngCore
Le sam. 22 mars 2025 à 15:11, Stefan Kroboth ***@***.***> a
écrit :
… ***@***.**** commented on this pull request.
------------------------------
In crates/argmin/src/solver/particleswarm/mod.rs
<#580 (comment)>:
> @@ -146,7 +146,7 @@ impl<P, F, R> ParticleSwarm<P, F, R>
where
P: Clone + SyncAlias + ArgminSub<P, P> + ArgminMul<F, P> + ArgminRandom + ArgminZeroLike,
F: ArgminFloat,
- R: Rng,
+ R: Rng + RngCore,
Could you explain why this is necessary, please?
—
Reply to this email directly, view it on GitHub
<#580 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEXM7NIKGAWASYFK6NAI2O32VVVQJAVCNFSM6AAAAABZQFQ5IWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDOMBYGA2DKNRSGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #580 +/- ##
==========================================
- Coverage 92.13% 92.12% -0.01%
==========================================
Files 177 177
Lines 23672 23672
==========================================
- Hits 21810 21808 -2
- Misses 1862 1864 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Last pb is wasm. |
updates deps.
from_entropy replaces by from_os_rng (rand docs recommans chacha for portability...)
The rest should be ok. all tests passed.