docstr: For regression (non-categorical type output), text defaults to embed mode as fine-tuning didn't seem to help. Check to see if the output is in fact the size of an embedding. 
  
  We pretend "embed_mode" is not True, but it should auto-override.
  
  Expected behavior:
  - does not train the transformer
  - flips transformer to 'embed_mode'
  - returns embedding size N_rows x N_embed_dim
docstr_tok: ["For","regression","(","non-categorical","type","output",")",",","text","defaults","to","embed","mode","as","fine-tuning","did","n't","seem","to","help",".","Check","to","see","if","the","output","is","in","fact","the","size","of","an","embedding",".","We","pretend","``","embed_mode","''","is","not","True",",","but","it","should","auto-override",".","Expected","behavior",":","-","does","not","train","the","transformer","-","flips","transformer","to","'embed_mode'","-","returns","embedding","size","N_rows","x","N_embed_dim"]
code: def test_auto_embed_mode(self):
      """
      For regression (non-categorical type output), text defaults to embed mode as fine-tuning didn't seem to help. Check to see if the output is in fact the size of an embedding.
  
      We pretend "embed_mode" is not True, but it should auto-override.
  
      Expected behavior:
      - does not train the transformer
      - flips transformer to 'embed_mode'
      - returns embedding size N_rows x N_embed_dim
      """  # noqa
      seed = 5
  
      np.random.seed(seed)
      torch.manual_seed(seed)
      random.seed(seed)
  
      # Make priming data:
      train, test = create_synthetic_data(2000)
      output_enc = NumericEncoder(is_target=True)
      output_enc.prepare(train["label"])
      encoded_target_values = output_enc.encode(train["label"])
  
      # Prepare the language encoder
      enc = PretrainedLangEncoder(
          stop_after=10, embed_mode=False, output_type=dtype.float
      )
      enc.prepare(
          train["text"],
          pd.DataFrame(),
          encoded_target_values=encoded_target_values,
      )
  
      # Embeddings of size N_vocab x N_embed_dim for most models (assumes distilbert)
      N_embed_dim = (
          enc._model.base_model.embeddings.word_embeddings.weight.shape[
              -1
          ]
      )
      embeddings = enc.encode(test["text"])
      assert enc.embed_mode
      assert embeddings.shape[0] == test.shape[0]
      assert embeddings.shape[1] == N_embed_dim
  
imports: import unittest
  import numpy
  import random
  import torch
  from torch.nn.functional import softmax
  from sklearn.metrics import accuracy_score
  from lightwood.encoder import BinaryEncoder, NumericEncoder
  from lightwood.encoder.text import PretrainedLangEncoder
  from type_infer.dtype import dtype
  import pandas
  import os
  import pathlib
label_desc: Use image node_id 3 for calling the TestPretrainedLangEncoder obj's underlying member method code with example usage: obj.test_auto_embed_mode() without return types