Skip to content

Conversation

@vipulpandey12345
Copy link
Collaborator

@vipulpandey12345 vipulpandey12345 commented Apr 15, 2024

updated loss implementation -> this function relies on getting labels from the data generator

Copy link
Owner

@Sharwin24 Sharwin24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just reading over, looks like the loss function depends on GPTDataGenerator so we should add some logging or checks to make sure that module has done whatever it needs to before running this function

train.py Outdated
super(CustomLossFunction, self).__init__()
# Initialize your loss components here, if any
self.margin = margin
self.model = SentenceTransformer('distilbert-base-uncased')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this parameter is ever something else but this string should probably be passed into the init function as a parameter with a default value

train.py Outdated
# Initialize your loss components here, if any
self.margin = margin
self.model = SentenceTransformer('distilbert-base-uncased')
self.training_examples = gptdatagenerator.generate_qa() # Assuming gptdatagenerator generates input examples
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to create a function here or in gptdatagenerator to determine if it has generated examples or not, log appropriately, and then either continue or not if the obtained examples exist or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants