allenact.utils.misc_utils
#
experimental_api
#
experimental_api(to_decorate)
Decorate a function to note that it is part of the experimental API.
deprecated
#
deprecated(to_decorate)
Decorate a function to note that it has been deprecated.
NumpyJSONEncoder
#
class NumpyJSONEncoder(json.JSONEncoder)
JSON encoder for numpy objects.
Based off the stackoverflow answer by Jie Yang here: https://stackoverflow.com/a/57915246. The license for this code is BY-SA 4.0.
HashableDict
#
class HashableDict(dict)
A dictionary which is hashable so long as all of its values are hashable.
A HashableDict object will allow setting / deleting of items until
the first time that __hash__()
is called on it after which
attempts to set or delete items will throw RuntimeError
exceptions.