Skip to content

Conversation

@geraldmjhuff
Copy link
Collaborator

No description provided.

Added the following functions to api/model.py:
- train_model_bert
- train_model_xlnet
- train_model_roberta
- train_model_albert
- predict_bert
- predict_xlnet
- predict_roberta
- predict_albert

Also added exec/train_or_predict.py for external syscall use.
@carlosparadis
Copy link
Member

@geraldmjhuff I just noticed this new PR. Why was this not added to #2 ?

print(classification_report(val_labels, val_predictions, digits=4))
return model_save_path

def train_model(train_df, model_save_path, model_select=0):
Copy link
Collaborator Author

@geraldmjhuff geraldmjhuff Dec 8, 2025

Choose a reason for hiding this comment

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

@carlosparadis
On top of dropping the 4 predict functions, then creating
def predict_model(predict_df, model_saved_path, model_task, model_tokenizer, model_name)
I will drop the 4 train functions, and create a function called:
train_model(train_df, model_save_path, model_task, model_tokenizer, model_name)

train_model() currently exists as this is Haotian's train model. What should our train_model() name be?

I will also commit the changes to Haotians PR, and in that model.py, Haotians original functions are preserved (or did you want to delete those functions?)
train_model()
test_model()

It will include my functions
train_model() (Again we can change this name if necessary)
predict_model()

Copy link
Member

Choose a reason for hiding this comment

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

I recommend you comment out his train and other functions (unless it is used somewhere on the code that will break, then let me know).

In a subsequent commit I will remove the commented code so it at least stays versioned on master if we need to refer back.

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