otx.engine#
API for OTX Entry-Point User.
Functions
|
Create an engine. |
Classes
|
Engine base class. |
- class otx.engine.Engine[source]#
Bases:
ABC
Engine base class.
- abstract static is_supported(model: MODEL, data: DATA) bool [source]#
Check if the engine is supported for the given model and data.
- abstract property datamodule: DATA#
Returns the datamodule object associated with the engine.
- Returns:
datamodule object.
- Return type:
DATA
- abstract property model: MODEL#
Returns the model object associated with the engine.
- Returns:
model object.
- Return type:
MODEL
- abstract property work_dir: PathLike#
Get the working directory for the engine.
- otx.engine.create_engine(model: MODEL, data: DATA, **kwargs) Engine [source]#
Create an engine.
- Parameters:
model – The model to use
data – The data/datamodule to use
kwargs – Additional keyword arguments for engine initialization
- Returns:
An instance of an Engine subclass that supports the model and data
- Raises:
ValueError – If no compatible engine is found