raft icon indicating copy to clipboard operation
raft copied to clipboard

Remove 'sample' parameter from stats::mean API

Open mfoerste4 opened this issue 1 year ago • 2 comments

This PR removes the sample-parameter from the raft::stats::mean API to prevent people from using it by accident when for example computing the mean for a sampled variance computation.

This also invalidates some of the testcases. Within raft only test-code is affected by this change as the active usage of the sample parameter was already removed in #2381.

This PR is based on #2381 but was separated for tracking purposes.

Note that this requires adaption of downstream libraries using the API. I am aware of at least one occurrence in cuml.

mfoerste4 avatar Jul 24 '24 12:07 mfoerste4

@tfeher , I have already added the PR for this before #2381 is merged in order to start the pipeline, the only actual commit is this one.

mfoerste4 avatar Jul 24 '24 12:07 mfoerste4

One should still consider that this is a breaking change, so we can consider to postpone this PR for 24.10, and issue a warning in 24.08 if the sample param is used.

This was the primary reason I pointed this out. We need to be careful about updates to public apis specifically, because we can only assume they are being used downstream (and we need to check).

cjnolet avatar Jul 24 '24 23:07 cjnolet

@mfoerste4 do you plan for this PR to be ready for 25.02 or should we push to 25.04? I just want to make sure we're keeping this on the roadmap but being realistic about the timeline.

cjnolet avatar Jan 15 '25 16:01 cjnolet

@mfoerste4 do you plan for this PR to be ready for 25.02 or should we push to 25.04? I just want to make sure we're keeping this on the roadmap but being realistic about the timeline.

Thanks @cjnolet for the reminder, I somehow completely lost track of this one. I believe I never added the warning in the first place, so I will update this PR (aiming for 25.04) and prepare a small PR with a warning in case sample==true.

mfoerste4 avatar Jan 15 '25 16:01 mfoerste4

@cjnolet , in order to have this integrated for 25.02 I have re-added the 'old' API and marked it as deprecated. This way we can decide to remove it later while already allowing people to adjust to the new API. I believe this is the cleaner approach which also allows removal of the 'breaking' tag.

mfoerste4 avatar Jan 16 '25 18:01 mfoerste4

@mfoerste4 that's a great idea. Let's try and get this in 25.02 if we can. Burndown starts on Thursday (Jan 30).

cjnolet avatar Jan 28 '25 20:01 cjnolet

/merge

achirkin avatar Jan 29 '25 19:01 achirkin

@mfoerste4 that's a great idea. Let's try and get this in 25.02 if we can. Burndown starts on Thursday (Jan 30).

@cjnolet , I believe the merge is still blocked by your approval.

mfoerste4 avatar Jan 29 '25 21:01 mfoerste4

/merge

cjnolet avatar Jan 30 '25 03:01 cjnolet