@chewxy this is for the same problem described at Request option to write multiple versions in a single batch - #3 by songmelted
I have generators which produce numeric values. I have different classes of generators. Each generator has a series of input parameters.
I am producing large volumes of generator+input vs output pairs.
Outputs from a single generator are not guaranteed to be unique.
I am interested in matching outputs from one generator to another. Then analyzing which inputs lead to identical outputs from another generator.
The output values are the keys (unfortunate nomenclature). The input parameters are the values.
I then search for matching outputs (keys) and record the inputs which generated them.
Frequently, a single generator will produce the same output for different inputs within a single write batch. I need to capture each of these as they are unique and meaningful to me.
The issue at hand this time is that sometimes different generator-input combinations produce the same output value not because they are truly unique, but they are actually identical in every way.
As I am producing generator-input combinations, I can reduce them to a “standard” form so that identical combinations look identical. I would like to not write those to the database as they are not meaningful - they are literally identical - no new information. OTOH, I do want to keep any truly unique generator-input combinations even if they have the same output (key).
So, I want to be able to write and keep unique key-value pairs even when the key is the same, but I want to reject any key-value pair where both the key and the value are identical.
I can hack something together, but it won’t be anything efficient. Perhaps there is an efficient way with the existing framework?