Hi! I would like to do hyperparameter search for an ABSA model (polarity only to be precise). Since there is no hyperparameter_search method for AbsaTrainer, I do this like in the code below, however, I am not certain if I do this right/optimally.
Are sentence transformer weights re-initialized from scratch at the start of each trial? Should I set force_download=True in AbsaModel?
When I only train polarity and try evaluating results with trainer.evaluate(eval), I get the following error: NotFittedError: This LogisticRegression instance is not fitted yet. Call 'fit' with appropriate arguments before using this estimator. However, the model clearly has a trained LR head and model.predict(eval) works just fine.
Less of a technical question, but would it make sense to try different multi-target strategies for a 3-way classification (positive, neutral, negative)? If so, would I be correct to instantiate classes inside objective like this:
Hi! I would like to do hyperparameter search for an ABSA model (polarity only to be precise). Since there is no
hyperparameter_search
method forAbsaTrainer
, I do this like in the code below, however, I am not certain if I do this right/optimally.Some questions:
force_download=True
in AbsaModel?trainer.evaluate(eval)
, I get the following error:NotFittedError: This LogisticRegression instance is not fitted yet. Call 'fit' with appropriate arguments before using this estimator.
However, the model clearly has a trained LR head and model.predict(eval) works just fine.objective
like this:aspect_extractor = AspectExtractor(spacy_model='en_core_web_sm')
def objective(trial): params = { 'batch_size': trial.suggest_categorical('batch_size', [8, 16, 32]), 'body_learning_rate': trial.suggest_float('learning_rate', 1e-5, 1e-3), 'multi_target_strategy': trial.suggest_categorical('multi_target_strategy', ['one-vs-rest', 'multi-output', 'classifier-chain']) }