-
Notifications
You must be signed in to change notification settings - Fork 80
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
AssertionError: Bad argument number for Name: 3, expecting 4 #399
Comments
Are you trying to run finetune on tensorflow 2.0 by any chance? |
No, I'm running it on tensorflow 1.14 only. Also I'm getting the following error at evaluation time: (Sequences longer than 512 tokens seem to be not taken care of automatically like in previous version -- just guessing)ValueError Traceback (most recent call last) ~/.local/lib/python3.5/site-packages/sklearn/metrics/classification.py in classification_report(y_true, y_pred, labels, target_names, sample_weight, digits, output_dict) ~/.local/lib/python3.5/site-packages/sklearn/metrics/classification.py in _check_targets(y_true, y_pred) ~/.local/lib/python3.5/site-packages/sklearn/utils/validation.py in check_consistent_length(*arrays) ValueError: Found input variables with inconsistent numbers of samples: [1148, 1154] |
Thanks for the bug report, I can reproduce the second issue. For now you can set the kwarg chunk_long_sequences=False and this should reinstate the previous behaviour. |
Can you provide a minimum reproducible example for the first issue? |
Here it is: model = MultiLabelClassifier(base_model=DistilBERT, batch_size=2, chunk_long_sequences=False, multi_label_sequences=True, n_epochs=3) mlb = MultiLabelBinarizer() I get the same error during training and inference time. |
Can you run |
finetune==0.8.3 |
Hi @emtropyml -- were you able to make any progress on resolving this issue on your end? Were you calling anything like |
I was actually just able to reproduce this on another machine! Not sure what's causing it yet though -- seems like it may be something deep in tensorflow. Since it's strictly a warning it seems harmless if the code otherwise works, but we'll see if we can track it down! |
When are you guys planning on releasing Finetune 0.8.4 on PyPI ? |
Thanks for the reminder -- 0.8.4 is now live. |
I get this when running in a CPU environment on a laptop. |
I'm getting this even in a GPU environment on GCP. |
Hrmmm -- curious. From what I can tell your model should still train fine but the logs are certainly frustrating. |
@madisonmay I am also getting assertion error, when I install finetune directly from source as instructed in the README inside a TF container. This is my finetune syntax:
I get the assertion error below right after I run the command above. It does not start to train.
I can use finetune docker container without any issue, but I need to install finetune inside TF container, and run the code that way. the tf-gpu version is 1.14.0. What'd be the reason behind that? How can I fix that? Thanks. |
--> model = MultiLabelClassifier(base_model=DistilBERT, batch_size=2, multi_label_sequences=True, n_epochs=3)
--> model.fit(trainX, trainY)
WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f4ab843b3c8>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux,
export AUTOGRAPH_VERBOSITY=10
) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f4ab843b3c8>>: AssertionError: Bad argument number for Name: 3, expecting 4The text was updated successfully, but these errors were encountered: