@@ -271,4 +271,55 @@ def test_uspantek_quantum1_yes_expose_val(monkeypatch):
271271 except Exception as ex :
272272 print (ex )
273273 assert type (ex ) == KeyError
274-
274+
275+
276+ # quantum2+uspantek
277+ # python classify.py --dataset uspantek --parser BobCatParser --ansatz IQPAnsatz --model14type PennyLaneModel --trainer QuantumTrainer --epochs_train_model1 30 --no_of_training_data_points_to_use 70 --no_of_val_data_points_to_use 30 --max_tokens_per_sent 10
278+ # returns: raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
279+ # AttributeError: 'PennyLaneModel' object has no attribute '_clear_predictions'
280+
281+ def test_uspantek_quantum2_no_expose_val (monkeypatch ):
282+ monkeypatch .setattr (sys , 'argv' ,
283+ ['classify.py' ,
284+ '--dataset' , 'uspantek' ,
285+ '--parser' , 'BobCatParser' ,
286+ '--ansatz' , 'IQPAnsatz' ,
287+ '--model14type' , 'PennyLaneModel' ,
288+ '--trainer' , 'QuantumTrainer' ,
289+ '--epochs_train_model1' , '30' ,
290+ '--no_of_training_data_points_to_use' , '70' ,
291+ '--no_of_val_data_points_to_use' , '30' ,
292+ '--max_tokens_per_sent' , '10' ,
293+ ])
294+ try :
295+ model4_loss , model4_acc = classify .main ()
296+ except Exception as ex :
297+ print (ex )
298+ assert type (ex ) == AttributeError
299+
300+
301+
302+ # quantum2+uspantek+yes expose
303+ # python classify.py --dataset uspantek --parser BobCatParser --ansatz IQPAnsatz --model14type PennyLaneModel --trainer QuantumTrainer --epochs_train_model1 30 --no_of_training_data_points_to_use 70 --no_of_val_data_points_to_use 30 --max_tokens_per_sent 10
304+ # returns: raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
305+ # AttributeError: 'PennyLaneModel' object has no attribute '_clear_predictions'
306+
307+ def test_uspantek_quantum2_yes_expose_val (monkeypatch ):
308+ monkeypatch .setattr (sys , 'argv' ,
309+ ['classify.py' ,
310+ '--dataset' , 'uspantek' ,
311+ '--parser' , 'BobCatParser' ,
312+ '--ansatz' , 'IQPAnsatz' ,
313+ '--model14type' , 'PennyLaneModel' ,
314+ '--trainer' , 'QuantumTrainer' ,
315+ '--epochs_train_model1' , '30' ,
316+ '--no_of_training_data_points_to_use' , '70' ,
317+ '--no_of_val_data_points_to_use' , '30' ,
318+ '--max_tokens_per_sent' , '10' ,
319+ '--expose_model1_val_during_model_initialization'
320+ ])
321+ try :
322+ model4_loss , model4_acc = classify .main ()
323+ except Exception as ex :
324+ print (ex )
325+ assert type (ex ) == AttributeError
0 commit comments