modlee.recommender.recommender module
Recommender for models.
- class modlee.recommender.recommender.Recommender(dataloader=None, origin='https://server.modlee.ai:7070', *args, **kwargs)[source]
Bases:
object
Recommender for models conditioned on datasets.
- analyze(dataloader=None, *args, **kwargs)[source]
Analyze a dataloader and calculate data metafeatures.
- Parameters:
dataloader – The dataloader to analyze. If not given, tries to use the class dataloader.
- calculate_metafeatures(dataloader, data_metafeature_cls=<class 'modlee.data_metafeatures.DataMetafeatures'>)[source]
Calculate metafeatures.
- Parameters:
dataloader – The dataloader on which to calculate metafeatures.
- Returns:
The metafeatures of the data as a dictionary.
- fit(dataloader=None, *args, **kwargs)
Analyze a dataloader and calculate data metafeatures.
- Parameters:
dataloader – The dataloader to analyze. If not given, tries to use the class dataloader.
- get_code_text()[source]
Get the code for a model as text (deprecated?).
- Returns:
The model code as text.
- get_input_torch()[source]
Get an input from the dataloader.
- Returns:
A tuple of the inputs (tensors) and their sizes.
- property model
The cached model.