You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #1128, we are deprecating the old max_hash parameter in favor of the new scaled parameter. They can be interconverted easily with no additional information (see functions _get_max_hash_for_scaled and _get_scaled_for_max_hash).
However, it is hard to fully remove max_hash from the Python API because it is used in the Rust API as well!
See the call to lib.kmerminhash_new in sourmash/minhash.py:MinHash.__init__ (currently in #1128 only).
So the goal of this issue is to swap out the max_hash parameter with the scaled parameter in the Rust API.
There are two places to do this in Rust - one is in the kmerminhash_new function, and the other is in the KmerMinHash::new code. I would suggest starting with the former and doing the conversion there, so that
we can get the API bridge between Python and Rust working first, but YMMV :)
Some suggestions for getting started -
get a full Python and Rust development environment up and running per the docs
dig into the implementation of kmerminhash_newin src/core/src/ffi/minhash.rs
add the scaled_to_max_hash and max_hash_to_scaled conversion functions into Rust
swizzle the mx parameter over to scaled in kmerminhash_new and then convert it to max_hash before passing it into the ::new method.
The text was updated successfully, but these errors were encountered:
(please indicate if you are planning to work on this but don't yet have a PR up - thanks! we suggest creating a PR early on in the process, but if you don't want to, please "claim" this issue so that others don't work on it in tandem!)
Note that we want to keep max_hash internally (in Rust), because it's easier to use in .add_hash. scaled_for_max_hash and max_hash_for_scaled are already implemented
In #1128, we are deprecating the old
max_hash
parameter in favor of the newscaled
parameter. They can be interconverted easily with no additional information (see functions_get_max_hash_for_scaled
and_get_scaled_for_max_hash
).However, it is hard to fully remove
max_hash
from the Python API because it is used in the Rust API as well!See the call to
lib.kmerminhash_new
insourmash/minhash.py:MinHash.__init__
(currently in #1128 only).So the goal of this issue is to swap out the
max_hash
parameter with thescaled
parameter in the Rust API.There are two places to do this in Rust - one is in the
kmerminhash_new
function, and the other is in theKmerMinHash::new
code. I would suggest starting with the former and doing the conversion there, so thatwe can get the API bridge between Python and Rust working first, but YMMV :)
Some suggestions for getting started -
kmerminhash_new
insrc/core/src/ffi/minhash.rs
mx
parameter over toscaled
inkmerminhash_new
and then convert it tomax_hash
before passing it into the::new
method.The text was updated successfully, but these errors were encountered: