Conversation
cf1c7b5 to
c4e321a
Compare
|
Waiting on requested change. |
datasketches/src/theta/sketch.rs
Outdated
| pub fn lower_bound(&self, num_std_devs: u32) -> Result<f64, Error> { | ||
| if !self.is_estimation_mode() { | ||
| return Ok(self.num_retained() as f64); | ||
| } | ||
| binomial_bounds::lower_bound(self.num_retained() as u64, self.theta(), num_std_devs) | ||
| } |
There was a problem hiding this comment.
We already have a NumStdDev enum:
datasketches-rust/datasketches/src/hll/estimator.rs
Lines 327 to 341 in 9ade42d
You can reuse it by moving the struct to a shared module level and thus we would never error here.
Besides, we may consider where to place these shared structs, including the ResizeFactor. datasketches::{NumStdDev, ResizeFactor} is fair enough now, but perhaps pollute the top-level namespace too much.
datasketches/src/binomial_bounds.rs
Outdated
| // Comment for this larger test like Java | ||
| // for ci in 1..=3 { | ||
| // let arr = run_test_aux(2000, ci, 1e-7); | ||
| // for j in 0..5 { | ||
| // let ratio = arr[j] / STD[i][j]; | ||
| // assert!( | ||
| // (ratio - 1.0).abs() < TOL, | ||
| // "ci={}, j={}: expected {}, got {}, ratio={}", | ||
| // ci, | ||
| // j, | ||
| // STD[i][j], | ||
| // arr[j], | ||
| // ratio | ||
| // ); | ||
| // } | ||
| // i += 1; | ||
| // } |
There was a problem hiding this comment.
How much time it costs? I'd prefer not to comment out tests.
There was a problem hiding this comment.
I can't seem to find the source for this commented out test in either C++ or Java . Could you give me a full link?
There was a problem hiding this comment.
How much time it costs? I'd prefer not to comment out tests.
0.56s(comment out) vs 3.19s in mac m1 pro
There was a problem hiding this comment.
0.56s(comment out) vs 3.19s in mac m1 pro
This can be fair enough to include.
tisonkun
left a comment
There was a problem hiding this comment.
The rest should be OK.
https://github.com/apache/datasketches-rust/pull/59/changes#r2660026906 is significant.
* add binomial_bounds to support calculate lower_bound&&upper_bound * add get_lower_bound&&get_upper_bound in ThetaSketch
c4e321a to
3bfa390
Compare
|
I'll appreciate it if you can, the next time, avoid force push after reviewers claim in. Then reviewers can easily get the changeset from the last review. |
datasketches/src/lib.rs
Outdated
| mod binomial_bounds; | ||
| mod codec; | ||
| mod hash; | ||
| pub mod num_std_dev; |
There was a problem hiding this comment.
| pub mod num_std_dev; | |
| mod num_std_dev; |
Why pub?
I’ll be more careful next time. If I need to rebase, should I use merge in situations like this instead? |
leerho
left a comment
There was a problem hiding this comment.
This Looks OK to me. However, there are 2 unresolved requested changes, and the last CI produced errors.
Looks like ci fail at |
|
Ran the tests again, still failed. |
|
I think it would be a good idea to have the workflow_dispatch: trigger on any workflows. It simplifies troubleshooting. |
Look like some Java side logic changed so that directory has changed as well. I'll take a look after managing the release vote to the next stage. And perhaps #10 should help in this issue.
Good point. |
I included a temporary fix in #62 (Density Sketch) to ensure CI passes. |
|
CI fixed. I'll give another look tomorrow and try to merge it to cut 0.2.0-rc.2/ |
Signed-off-by: tison <wander4096@gmail.com>
tisonkun
left a comment
There was a problem hiding this comment.
Push a new commit for reorg common types.
Now this looks good to me.
PsiACE
left a comment
There was a problem hiding this comment.
LGTM. And looking forward to the new release.
cc @notfilippo @Xuanwo @PsiACE @tisonkun