ModelDataSource¶
- class oci.generative_ai.models.ModelDataSource(**kwargs)¶
Bases:
objectDefines the source location and method used to import the model. Supports importing from Hugging Face, an Object Storage location, or by referencing an already imported model.
Attributes:
A constant which can be used with the source_type property of a ModelDataSource.
A constant which can be used with the source_type property of a ModelDataSource.
Gets the source_type of this ModelDataSource.
Methods:
__init__(**kwargs)Initializes a new ModelDataSource object with values from keyword arguments.
get_subtype(object_dictionary)Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- SOURCE_TYPE_HUGGING_FACE_MODEL = 'HUGGING_FACE_MODEL'¶
A constant which can be used with the source_type property of a ModelDataSource. This constant has a value of “HUGGING_FACE_MODEL”
- SOURCE_TYPE_OBJECT_STORAGE_OBJECT = 'OBJECT_STORAGE_OBJECT'¶
A constant which can be used with the source_type property of a ModelDataSource. This constant has a value of “OBJECT_STORAGE_OBJECT”
- __init__(**kwargs)¶
Initializes a new ModelDataSource object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class:
The following keyword arguments are supported (corresponding to the getters/setters of this class):
- Parameters
source_type (str) – The value to assign to the source_type property of this ModelDataSource. Allowed values for this property are: “HUGGING_FACE_MODEL”, “OBJECT_STORAGE_OBJECT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- static get_subtype(object_dictionary)¶
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- property source_type¶
Gets the source_type of this ModelDataSource. Specifies the source type for model import.
Allowed values for this property are: “HUGGING_FACE_MODEL”, “OBJECT_STORAGE_OBJECT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The source_type of this ModelDataSource.
- Return type
str