MCPcopy
hub / github.com/QData/TextAttack / get_output

Method get_output

textattack/goal_functions/goal_function.py:72–75  ·  view source on GitHub ↗

Returns output for display based on the result of calling the model.

(self, attacked_text)

Source from the content-addressed store, hash-verified

70 return result, _
71
72 def get_output(self, attacked_text):
73 """Returns output for display based on the result of calling the
74 model."""
75 return self._get_displayed_output(self._call_model([attacked_text])[0])
76
77 def get_result(self, attacked_text, **kwargs):
78 """A helper method that queries ``self.get_results`` with a single

Callers 1

attack_interactiveMethod · 0.80

Calls 2

_get_displayed_outputMethod · 0.95
_call_modelMethod · 0.95

Tested by

no test coverage detected