Python error in FortunaGenerator.py (

Retraining throws this error.
“is” with a literal. Did you mean “==”

ie.
Retraining Neural Network (Keras)…
Scheduling job in cluster…
Job started
/usr/local/lib/python3.8/dist-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: “is” with a literal. Did you mean “==”?
if sys.version_info[0] is 2 and sys.version_info[1] is 1:
/usr/local/lib/python3.8/dist-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: “is” with a literal. Did you mean “==”?
if sys.version_info[0] is 2 and sys.version_info[1] is 1:
Splitting data into training and validation sets…
Splitting data into training and validation sets OK

It all continues and throws the same error on testing
However with deployment I get this
Copying features from processing blocks…
Copying features from DSP block…
Copying features from DSP block OK
Copying features from processing blocks OK

Classifying data for float32 model…
Scheduling job in cluster…

Application exited with code 127 (ContainerCannotRun)

Attached to job 1789658…

Thanks.
Greg

Bonjour @greg_dickson,

Did anything changed from the public version of your project (projectID: 44586)?
I cloned your public project and it seems to retrain fine on my side.

Regards,

Louis

Bonjour @louis
that’s strange.
I only just realised that each version needs to be published it’s not a running update so yes quite a bit has changed.

I have run the eon tuner, added more data.
and rerun eon selecting different types
uploaded and retrained several times.
This project is fairly old now so perhaps something snuck in over time.

Ok I’ve published my broken version version 4 see how that goes.
My guess here is that the old code doen’t even call FortunaGenerator,py it was pretty basic.

I’ll clone it as well and see how it goes out of the box.

Also I’d love to here how it goes with your personal tests.
I have a friend who lives near Lille but I haven’t talked to him in over a year.
I haven’t even tested it against a true french accent.

Hi!

I just cloned your newest version called broken and I can retrain it too (using the Retrain model view)
When I try to retrain it from the Neural Network view, I can see warning but it seems to continue the training correctly:

Creating job... OK (ID: 1796746)

Job started
/usr/local/lib/python3.8/dist-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if sys.version_info[0] is 2 and  sys.version_info[1] is 1:
/usr/local/lib/python3.8/dist-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if sys.version_info[0] is 2 and  sys.version_info[1] is 1:
Splitting data into training and validation sets...
Splitting data into training and validation sets OK

Training model...
Training on 2810 inputs, validating on 703 inputs
Epoch 1/100
88/88 - 3s - loss: 0.6786 - accuracy: 0.6826 - val_loss: 0.3659 - val_accuracy: 0.8634
Epoch 2/100
88/88 - 2s - loss: 0.2835 - accuracy: 0.8932 - val_loss: 0.2671 - val_accuracy: 0.9061
Epoch 3/100
...
Epoch 100/100
88/88 - 2s - loss: 0.1275 - accuracy: 0.9751 - val_loss: 0.6970 - val_accuracy: 0.9474
Finished training

Saving best performing model...
Converting TensorFlow Lite float32 model...
Converting TensorFlow Lite int8 quantized model with int8 input and output...
Calculating performance metrics...
Profiling float32 model...
Profiling int8 model...

Model training complete

Job completed

Maybe you want to clone it on your side and work from the cloned version while we look for a solution?

Regards,

Louis

That’s ok my earlier version works fine on my system. As I collect data I just add it and update it to increase the data.
But I have cloned it and will work from that version so your working base can be left as is.
I only add new data about once a month.
So from my end I am happy to wait.
It already works pretty well.

Great, happy to hear that.

Regards,

Louis