Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track losses with tensorboard #11568

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Commits on Mar 2, 2024

  1. Add files via upload

    This .py file has a class "TBSentenceTransformer" that is inherited from SentenceTransformer. This class is to be used instead of SentenceTransformer if we want to log our training progress using TensorBoard. 
    I have been waiting for the SentenceTransformer team to integrate tensorboard into their repo but it seems like they are taking some time doing it since it is ground up. This is an alternative to that. Code has been written to minimize the impact on any of the repos using SentenceTransformers i.e. if at any time, SentenceTransformers do come up with a reporting framework, it will be easy to revert to that if required with minimal changes to the code
    SwamiKannan authored Mar 2, 2024
    Configuration menu
    Copy the full SHA
    6ca6652 View commit details
    Browse the repository at this point in the history
  2. Add files via upload

    A couple of lines added to the creation of the SentenceTransformersFinetuneEngine class:
    1. Add a parameter log_path that specifies where the tensorboard logs should be stored
    2. Update the constructor: self.model = = TBSentenceTransformer() if the log_path is specified else self.model = SentenceTransformer()
    SwamiKannan authored Mar 2, 2024
    Configuration menu
    Copy the full SHA
    afa4ab7 View commit details
    Browse the repository at this point in the history
  3. Add files via upload

    Updated class inherited from SentenceTransformers to include tensorboard reporting
    SwamiKannan authored Mar 2, 2024
    Configuration menu
    Copy the full SHA
    73f1435 View commit details
    Browse the repository at this point in the history
  4. Add files via upload

    Contains an inherited class from SentenceTransformer called TBSentenceTransformer that allows llamaindex's SentenceTransformersFinetuneEngine to track and record loss while finetuning using tensorboard.
    Credit to this PR: UKPLab/sentence-transformers#1532 , by Ahmed Magdy https://github.com/Mogady
    SwamiKannan authored Mar 2, 2024
    Configuration menu
    Copy the full SHA
    5bc5f1f View commit details
    Browse the repository at this point in the history
  5. Updated self.model

    Updated SentenceTransformersFinetuneEngine's self.model to accept a TBSentenceTransformer object if a log_path is specified or revert to accepting a SentenceTransformer object. Initial commits had some mistakes..
    SwamiKannan authored Mar 2, 2024
    Configuration menu
    Copy the full SHA
    d006816 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2024

  1. Configuration menu
    Copy the full SHA
    114f580 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    28e62dc View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2024

  1. Configuration menu
    Copy the full SHA
    37129b3 View commit details
    Browse the repository at this point in the history