Closed inferense closed 3 years ago
I finally managed to solve it by adding the attribute to postprocess_latent.py
. It works fine for now, but let me know if there's anything else I should be mindful of :)
Happy to hear you managed to solve that - sorry for not yet supporting you. I planned this afternoon, but now you were quicker!
I'm trying to add a new attribute called
period
to the Time object intypes.py
which will hold a string "am" or "pm" if it's specified in the input ("5am"). This is so I can make some further modifications based on it to the logic of some rules. For this, I've modified the_maybe_apply_am_pm
inrules.py
as below:Initially, this worked but disabled much of the other applicable rules in the pipeline and resulted in latent incomplete outputs (for "5am" I'd get a latent datetime X-X-X with 05:00 instead of a complete datetime for today / tomorrow etc.)
I figured I had to modify Time property
isTOD
tothis enabled the previously latent datetime completion, intervals etc. However, my new attribute got somehow lost in the pipeline of rules and is not propagated to the resulting production. I've spent hours debugging and experimenting with this but I'm really not sure what else to change to make this work?
When testing the simple "5pm", I tried to look into
latentDOM
rule but the attribute is not propagated to it from theHHMM
where its present. When debugging I used the logging as you described in the documentation but it hardly gives me all the rules that are applied, or I'm missing something somewhere else?Thank you