tbp.monty#

tbp.monty.hydra#

agent_id_resolver(agent_id: str) AgentID[source]#

Returns an AgentID new type from a string.

Return type:

NewType()(AgentID, str)

monty_class_resolver(class_name: str) type[source]#

Returns a class object by fully qualified path.

Return type:

type

TODO: This is an interim solution to retrieve my_class in

the my_class(**my_args) pattern.

ndarray_resolver(list_or_tuple: list | tuple) np.ndarray[source]#

Returns a numpy array from a list or tuple.

Return type:

np.ndarray

numpy_list_eval_resolver(expr_list: list) list[float][source]#
ones_resolver(n: int) numpy.ndarray[source]#

Returns a numpy array of ones.

Return type:

ndarray

path_expanduser_resolver(path: str) str[source]#

Returns a path with ~ expanded to the user’s home directory.

Return type:

str

register_resolvers() None[source]#
Return type:

None