jacinle.utils.enum#

Classes

JacEnum

A customized enumeration class, adding helper functions for string-based argument parsing.

Class JacEnum

class JacEnum[source]#

Bases: Enum

A customized enumeration class, adding helper functions for string-based argument parsing.

classmethod assert_valid(value)[source]#

Assert if the value is a valid choice.

classmethod choice_names()[source]#

Returns the list of the name of all possible choices.

classmethod choice_objs()[source]#

Returns the list of the object of all possible choices.

classmethod choice_values()[source]#

Returns the list of the value of all possible choices.

classmethod from_string(value)[source]#
Parameters:

value (str | JacEnum)

Return type:

JacEnum

classmethod is_valid(value)[source]#

Check if the value is a valid choice.

classmethod type_name()[source]#

Return the type name of the enum.