yoyololicon / kamui

MIT License
16 stars 4 forks source link

Prepare weights for ilp unwrapping #8

Closed the-mysh closed 1 month ago

the-mysh commented 2 months ago

Hi @yoyololicon, I think I have figured out a way of passing the weights to the ILP unwrapping.

Please review it; in particular, I was wondering if the rescaling approach and calculating the mean to go from weight-per-phase to weight-per edge is correct.

If it's all right, I think it should resolve #6 which I opened earlier.

the-mysh commented 2 months ago

I've now added a choice of methods to compute an edge weight from a pair of phase weights: choose from mean, max, and min.

the-mysh commented 2 months ago

Hi @yoyololicon , thanks for your review. I made changes according to your suggestions. I saw though that in case you use puma, the weights argument should not be present - so I opted for extracting it from kwargs and adding the prepared weights only if any were originally defined. Please let me know what you think!

yoyololicon commented 2 months ago

@the-mysh please format the code using black. See the failing workflow for details.

the-mysh commented 1 month ago

Hi @yoyololicon , sorry for the radio silence, got distracted by other work projects. I've implemented your change requests, please have a look when you get the chance.

yoyololicon commented 1 month ago

Thank @the-mysh, for the contribution! This will be included in the next release v0.1.2.