hatchet.util package

Submodules

hatchet.util.config module

hatchet.util.deprecated module

hatchet.util.deprecated.deprecated_params(**old_to_new)[source]
hatchet.util.deprecated.rename_kwargs(fname, old_to_new, kwargs)[source]

hatchet.util.dot module

hatchet.util.dot.to_dot(hnode, dataframe, metric, name, rank, thread, threshold, visited)[source]

Write to graphviz dot format.

hatchet.util.dot.trees_to_dot(roots, dataframe, metric, name, rank, thread, threshold)[source]

Calls to_dot in turn for each tree in the graph/forest.

hatchet.util.executable module

hatchet.util.executable.which(executable)[source]

Finds an executable in the user’s PATH like command-line which.

Parameters:executable (str) – executable to search for

hatchet.util.profiler module

class hatchet.util.profiler.Profiler[source]

Bases: object

Wrapper class around cProfile. Exports a pstats file to be read by the pstats reader.

reset()[source]

Description: Resets the profilier.

start()[source]

Description: Place before the block of code to be profiled.

stop()[source]

Description: Place at the end of the block of code being profiled.

write_to_file(filename='', add_pstats_files=[])[source]

Description: Write the pstats object to a binary file to be read in by an appropriate source.

hatchet.util.profiler.print_incomptable_msg(stats_file)[source]

Function which makes the syntax cleaner in Profiler.write_to_file().

hatchet.util.timer module

class hatchet.util.timer.Timer[source]

Bases: object

Simple phase timer with a context manager.

end_phase()[source]
phase(name)[source]
start_phase(phase)[source]

Module contents