model is a variable/function and looks like: SentenceTransformer( (0):…
- User
model is a variable/function and looks like:
SentenceTransformer( (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: MPNetModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) )
how do i turn off the progress bar
- Assistant
To turn off the progress bar, you can set the "show_progress_bar" parameter to False. Here's an example of how to do it:
model = SentenceTransformer('model_name', show_progress_bar=False)In this example, replace "model_name" with the specific name or path of the model you are using. By setting "show_progress_bar" to False, the progress bar will be turned off.
- User
TypeError Traceback (most recent call last) /app/TI_Recommendation_Engine/active/Model_Fine_Tuning/GPL/Generative_Pseudo_Labeling copy.ipynb Cell 17 line 1 ----> 1 model = SentenceTransformer(model, show_progress_bar=False) 2 model
TypeError: SentenceTransformer.init() got an unexpected keyword argument 'show_progress_bar'
- Assistant
Apologies for the confusion. It seems that the "show_progress_bar" parameter is not available in the SentenceTransformer initialization. To turn off the progress bar for SentenceTransformer, you can modify the code to remove the progress bar function. Here's an example:
import sys class NoProgress: def update(self, *args): pass def close(self): pass # Disable progress bar sys.modules['tqdm'].tqdm = NoProgress model = SentenceTransformer('model_name')In this example, replace "model_name" with the specific name or path of the model you are using. The code overrides the "tqdm" module used for progress bar updates with a custom class that does nothing. As a result, the progress bar functionality is effectively turned off.