oumi.core.registry#
A framework used for registering and accessing objects across Oumi.
- class oumi.core.registry.Registry[source]#
- Bases: - object- __getitem__(args: tuple[str, RegistryType]) Callable[source]#
- Gets a record by name and type. 
 - contains(name: str, type: RegistryType) bool[source]#
- Indicates whether a record exists in the registry. 
 - get(name: str, type: RegistryType) Callable | None[source]#
- Gets a record by name and type. 
 - get_all(type: RegistryType) dict[source]#
- Gets all records of a specific type. 
 - get_dataset(name: str, subset: str | None = None) Callable | None[source]#
- Gets a record that corresponds to a registered dataset. 
 - get_evaluation_function(name: str) Callable | None[source]#
- Gets a record that corresponds to a registered evaluation function. 
 - get_judge_config(name: str) Callable | None[source]#
- Gets a record that corresponds to a registered judge config. 
 - get_metrics_function(name: str) Callable | None[source]#
- Gets a record that corresponds to a registered metrics function. 
 - get_model_config(name: str) Callable | None[source]#
- Gets a record that corresponds to a registered config. 
 - get_reward_function(name: str) Callable | None[source]#
- Gets a record that corresponds to a registered rewards function. 
 - get_sample_analyzer(name: str) Callable | None[source]#
- Gets a record that corresponds to a registered sample analyzer. 
 - register(name: str, type: RegistryType, value: Any) None[source]#
- Registers a new record. 
 
- class oumi.core.registry.RegistryType(value)[source]#
- Bases: - Enum- CLOUD = 1#
 - DATASET = 2#
 - EVALUATION_FUNCTION = 8#
 - JUDGE_CONFIG = 7#
 - METRICS_FUNCTION = 3#
 - MODEL = 6#
 - MODEL_CONFIG = 5#
 - REWARD_FUNCTION = 4#
 - SAMPLE_ANALYZER = 9#
 
- oumi.core.registry.register(registry_name: str, registry_type: RegistryType) Callable[source]#
- Returns function to register decorated obj in the Oumi global registry. - Parameters:
- registry_name – The name that the object should be registered with. 
- registry_type – The type of object we are registering. 
 
- Returns:
- Decorator function to register the target object. 
 
- oumi.core.registry.register_cloud_builder(registry_name: str) Callable[source]#
- Returns a function to register decorated builder in the Oumi global registry. - Use this decorator to register cloud builder functions in the global registry. A cloud builder function is a function that accepts no arguments and returns an instance of a class that implements the BaseCloud interface. - Parameters:
- registry_name – The name that the builder should be registered with. 
- Returns:
- Decorator function to register the target builder. 
 
- oumi.core.registry.register_dataset(registry_name: str, subset: str | None = None) Callable[source]#
- Returns function to register decorated obj in the Oumi global registry. - Parameters:
- registry_name – The name that the object should be registered with. 
- subset – The type of object we are registering. 
 
- Returns:
- Decorator function to register the target object. 
 
- oumi.core.registry.register_evaluation_function(registry_name: str) Callable[source]#
- Returns function to register an evaluation function in the Oumi global registry. - Parameters:
- registry_name – The name that the evaluation function should be registered with. 
- Returns:
- Decorator function to register the target evaluation function. 
 
- oumi.core.registry.register_sample_analyzer(registry_name: str) Callable[source]#
- Returns function to register a sample analyzer in the Oumi global registry. - Parameters:
- registry_name – The name that the sample analyzer should be registered with. 
- Returns:
- Decorator function to register the target sample analyzer. 
 
