MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / argmin

Function argmin

AgentBench.old/src/tasks/knowledgegraph/api.py:194–206  ·  view source on GitHub ↗

Get the argmin of a variable :param variable: a variable :param relation: a relation :return: the argmin of a variable

(variable: str, attribute: str, sparql_executor)

Source from the content-addressed store, hash-verified

192
193
194def argmin(variable: str, attribute: str, sparql_executor):
195 """
196 Get the argmin of a variable
197 :param variable: a variable
198 :param relation: a relation
199 :return: the argmin of a variable
200 """
201 if attribute not in variable_attributes_cache[variable]:
202 raise ValueError("argmin: attribute must be an attribute of the variable")
203
204 rtn_str = f"Observation: variable ##, which are instances of {variable.type}"
205 new_variable = Variable(variable.type, f"(ARGMIN {variable.program} {attribute})")
206 return new_variable, rtn_str
207

Callers

nothing calls this directly

Calls 1

VariableClass · 0.85

Tested by

no test coverage detected