poprox_recommender.model#

Functions

load_checkpoint([device])

load_model(checkpoint, device)

Classes

ModelConfig([num_epochs, ...])

RecommenderComponents(tokenizer, model, device)

class poprox_recommender.model.ModelConfig(num_epochs: 'float' = 10, num_clicked_news_a_user: 'float' = 50, word_freq_threshold: 'float' = 1, dropout_probability: 'float' = 0.2, word_embedding_dim: 'float' = 300, category_embedding_dim: 'float' = 100, query_vector_dim: 'float' = 200, additive_attn_hidden_dim: 'float' = 200, num_attention_heads: 'float' = 16, hidden_size: 'int' = 768)#

Bases: object

Parameters:
  • num_epochs (float)

  • num_clicked_news_a_user (float)

  • word_freq_threshold (float)

  • dropout_probability (float)

  • word_embedding_dim (float)

  • category_embedding_dim (float)

  • query_vector_dim (float)

  • additive_attn_hidden_dim (float)

  • num_attention_heads (float)

  • hidden_size (int)

class poprox_recommender.model.RecommenderComponents(tokenizer: 'AutoTokenizer', model: 'NRMS', device: 'str | None')#

Bases: object

Parameters:
  • tokenizer (AutoTokenizer)

  • model (NRMS)

  • device (str | None)

Modules