MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / get_max_depth

Method get_max_depth

toolbench/inference/Tree/Tree.py:57–64  ·  view source on GitHub ↗

maximum depth of subtrees including self

(self)

Source from the content-addressed store, hash-verified

55 return 0.0
56
57 def get_max_depth(self):
58 '''
59 maximum depth of subtrees including self
60 '''
61 max_depth = 0
62 for child in self.children:
63 max_depth = max(max_depth,child.get_max_depth())
64 return max_depth + 1
65
66 def get_depth(self):
67 if self.father == None:

Callers 1

to_json_recursiveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected