This message was deleted.
# hamilton-help
s
This message was deleted.
s
Not yet. Where are you looking to use this? As documentation? or?
m
yes, basically for documentation
to visualize the entire process. validators make it quite cluttered for someone who is not necessarily very familiar with the code or hamilton
s
yep makes sense — this change might require a bit of surgery on the viz side to be able to “group nodes” since it takes the Hamilton graph verbatim…
m
I see
and there isn't a way to hack by disabling the actual checks globally?
s
🤔 actually yeah that might be the easier way about it.
@Elijah Ben Izzy thoughts?
e
So yes, what @Stefan Krawczyk said. Some thoguhts I had typed out then ended up in a call. There are a few workarounds, and its a good idea (open an issue)? Basically you have a few approaches: 1. removing check_output conditionally (assign check_output in fucntion_modifiers to be a lambda/pass-through when importing — its a hack but it could get you the graph) 2. mess with the function graph itself — this is an internal API but you could remove nodes — downside is the internal state might not be the best 3. edit the
.dot
file to remove any edges/dependencies you want The trick here is to know that the tags on the variables will indicate whether its a data quality node — you should be able to use these to handle it: https://github.com/DAGWorks-Inc/hamilton/blob/6dd192854b082d7f697f2bb9607250e64e181ae3/data_quality.md?plain=1#L142
All this said, I think it makes sense to turn them off globally, and we should be able to add in a layer above that does this. This has been on our roadmap, and we just haven’t gotten around to it yet (I had a prototype at one point but wasn’t thrilled with it, left it up though https://github.com/DAGWorks-Inc/hamilton/pull/62)
s
yeah I think we just need to short-circuit here https://github.com/DAGWorks-Inc/hamilton/blob/main/hamilton/function_modifiers/validation.py#L25-L29 based on some configuration that is passed in somehow — @Michal Siedlaczek you could at least locally just make this return the input node, and I think it should create things without the validator nodes.
e
If you wanted a quick hack and you’re running it all in a script you could do something like:
Copy code
from hamilton import function_modifiers
function_modifiers.check_output = lambda x: x
If you do that before any imports it might just disable them, and do that conditionally
m
interesting, I'll try that
e
(no guarentees, and definitely not the right long-term solution, but could unblock you 🙂 )
m
ok, the simplest one-off solution was to go to module and run
:g/@check_output/d
in vim 😂
run and then undo
e
Love it
m
I'm sorted for now
👍 1