1.1.1.1.1.1. autojax.util.mod_diff module

autojax.util.mod_diff.diff_module(mod1, mod2)[source]

Show the differences between 2 modules.

Given each module, find all functions defined in that functions first, call it funcs1 and funcs2. Note that they have to be functions, filter out non-functions. Then create a list of functions where their names only exists in funcs1 but not in funcs2. This is funcs_diff: list[str]

For the functions that is common between funcs1 and func2, inspect their signature, and create a list of them whenever they are different. This is funcs_sig_diff: dict[str, tuple[list[str], list[str]] where the key is the function name func and the values are the list of args from func in mod1 and mod2 respectively.

autojax.util.mod_diff.get_callable_functions(module)[source]

Extract all callable functions from a module, including decorated functions.

Parameters:

module – The module to extract functions from

Returns:

A dictionary mapping function names to function objects

Return type:

dict

autojax.util.mod_diff.main()[source]
autojax.util.mod_diff.print_diff(mod1, mod2)[source]