superduperdb.ext.sentence_transformers package#

Submodules#

superduperdb.ext.sentence_transformers.model module#

class superduperdb.ext.sentence_transformers.model.SentenceTransformer(identifier: 'str', artifacts: 'dc.InitVar[t.Optional[t.Dict]]' = None, *, datatype: 'EncoderArg' = None, output_schema: 't.Optional[Schema]' = None, flatten: 'bool' = False, preprocess: 't.Optional[t.Callable]' = None, postprocess: 't.Optional[t.Callable]' = None, collate_fn: 't.Optional[t.Callable]' = None, batch_predict: 'bool' = False, takes_context: 'bool' = False, metrics: 't.Sequence[t.Union[str, Metric, None]]' = (), model_update_kwargs: 'dict' = <factory>, validation_sets: 't.Optional[t.Sequence[t.Union[str, Dataset]]]' = None, predict_X: 't.Optional[str]' = None, predict_select: 't.Optional[CompoundSelect]' = None, predict_max_chunk_size: 't.Optional[int]' = None, predict_kwargs: 't.Optional[t.Dict]' = None, object: Optional[Callable] = None, model_to_device_method: 't.Optional[str]' = None, metric_values: 't.Optional[t.Dict]' = <factory>, predict_method: 't.Optional[str]' = None, device: 'str' = 'cpu', preferred_devices: 't.Union[None, t.Sequence[str]]' = ('cuda', 'mps', 'cpu'), training_configuration: 't.Union[str, _TrainingConfiguration, None]' = None, train_X: 't.Optional[str]' = None, train_y: 't.Optional[str]' = None, train_select: 't.Optional[CompoundSelect]' = None, model: Optional[str] = None)[source]#

Bases: Model

model: str | None = None#
object: Callable | None = None#

Module contents#

class superduperdb.ext.sentence_transformers.SentenceTransformer(identifier: 'str', artifacts: 'dc.InitVar[t.Optional[t.Dict]]' = None, *, datatype: 'EncoderArg' = None, output_schema: 't.Optional[Schema]' = None, flatten: 'bool' = False, preprocess: 't.Optional[t.Callable]' = None, postprocess: 't.Optional[t.Callable]' = None, collate_fn: 't.Optional[t.Callable]' = None, batch_predict: 'bool' = False, takes_context: 'bool' = False, metrics: 't.Sequence[t.Union[str, Metric, None]]' = (), model_update_kwargs: 'dict' = <factory>, validation_sets: 't.Optional[t.Sequence[t.Union[str, Dataset]]]' = None, predict_X: 't.Optional[str]' = None, predict_select: 't.Optional[CompoundSelect]' = None, predict_max_chunk_size: 't.Optional[int]' = None, predict_kwargs: 't.Optional[t.Dict]' = None, object: Optional[Callable] = None, model_to_device_method: 't.Optional[str]' = None, metric_values: 't.Optional[t.Dict]' = <factory>, predict_method: 't.Optional[str]' = None, device: 'str' = 'cpu', preferred_devices: 't.Union[None, t.Sequence[str]]' = ('cuda', 'mps', 'cpu'), training_configuration: 't.Union[str, _TrainingConfiguration, None]' = None, train_X: 't.Optional[str]' = None, train_y: 't.Optional[str]' = None, train_select: 't.Optional[CompoundSelect]' = None, model: Optional[str] = None)[source]#

Bases: Model

identifier: str#
metric_values: t.Optional[t.Dict]#
model: str | None = None#
model_update_kwargs: dict#
object: Callable | None = None#