HI
when I try to evaluate model during training( df_train is an dataframe):
model = MultiModalClassificationModel(model_type, model_name, num_labels=2, args=model_args)
model.train_model(df_train[start0:end0, :], image_path=image_path, eval_data=df_train[start1:end1, :], **eval_metrics)
it raises :
"""ValueError: data is not a str and image_path is not given. image_path must be specified when input is a DF"""
but I have specified correctly image_path, and dataset is the same with different slices..; if I turn off 'evaluate_during_training', then everything go fine;
sorry, but I am unable to find the problem...
thanks
bugs found:
-load_and_cache_examples- method in MultiModalClassificationModel class, when called inside -eval_model-, doesn't receive 'image_path' as argument; then when testing for it, statment return None, then raises Valueerror exception;
another wrong testing is for "data" object (still in "load_and_cache_examples" method:
--> 'if not isinstance(data, str)',
because when pass a dataframe to 'model_train' method, "data" isn't string ;
another issue is in 'compute_metrics'method, that returns tuple but must return a dict when --> num_labels == 2 , for binary task
I'll check this. Would be awesome if you could submit a PR to fix it though!
HI and thanks for support;
sorry but I'm not an expert programmer ...what you mean with PR??馃榿
PR stands for Pull Request. Essentially, you fork a repo (such as this one), make the necessary changes, and submit a pull request for your changes to be added to the original repo.
But, I fixed (I believe) this one myself as it needed changes in several places. Thank you for pointing out the bug and the _cause_ of the bug. It really helps!
@all-contributors add @caprone for bugs
@ThilinaRajapakse
I've put up a pull request to add @caprone! :tada:
@ThilinaRajapakse
Glad to be of help for your Powerful and Great library!! thanks!!馃槂馃槂