-
Notifications
You must be signed in to change notification settings - Fork 17
Description
This is from running https://merlinquantum.ai/notebooks/QLLM_fine_tuning.html as-is. I have made no modifications. I used Google Colab.
Training Quantum Layer heads...
Training Quantum Head: 2 modes, 1 photons
Input state: [1, 0]
Number of parameters in Quantum head: 76914
Epoch 50/200, Train Loss: 0.7964
Epoch 100/200, Train Loss: 0.7366
Epoch 150/200, Train Loss: 0.6766
Epoch 200/200, Train Loss: 0.6186
TypeError Traceback (most recent call last)
/tmp/ipython-input-21-1197100152.py in <cell line: 0>()
31 # Evaluate
32 q_val_predictions = model.model_head.predict(
---> 33 sentence_transformer.encode(eval_dataset["sentence"], convert_to_tensor=True).cpu().numpy()
34 )
35 q_val_accuracy = accuracy_score(eval_dataset["label"], q_val_predictions)
7 frames
/usr/local/lib/python3.11/dist-packages/datasets/formatting/formatting.py in _raise_bad_key_type(key)
42
43 def _raise_bad_key_type(key: Any):
---> 44 raise TypeError(
45 f"Wrong key type: '{key}' of type '{type(key)}'. Expected one of int, slice, range, str or Iterable."
46 )
TypeError: Wrong key type: '79' of type '<class 'numpy.int64'>'. Expected one of int, slice, range, str or Iterable.