Hi <@U0412452UJW>, welcome to Flyte. The error abo...
# ask-the-community
s
Hi @yousef ahmed, welcome to Flyte. The error above suggests that you have a different data type passed to your code, i.e a numpy float value, but it instead expected a float value. Today, we don't support for numpy float values, hence an easy but not-so-efficient way would be to convert your numpy float values to floats. But remember this isn't the recommended way of doing things. We have numpy float support coming up soon!
y
fine, I'm new with Flyte. So, I followed the tutorial and this issue comes up!
s
Happy to help. Feel free to jump in for clarifications.
s
Which tutorial is it, @yousef ahmed?
c
@yousef ahmed could you please change the notebook at the end
Copy code
from flytekitplugins.papermill import record_outputs
record_outputs(mae_score=mae_score)
Copy code
from flytekitplugins.papermill import record_outputs
record_outputs(mae_score=float(mae_score)ç)
Just to try
y
I tried this but didn't work, worked with me in other place "I think was notebook.py" but here not worked, in the end solved by help @Samhita Alla replace 'return mean(score) in cross_validate function to float(np.mean(score)).
c
Yeah this is ok
s
@yousef ahmed Exactly. You have converted the return type of mean(score) from being a numpy.float to a floating point type. I'm glad it worked!
y
yeah that worked for two notebooks also (supermarket_regression, supermarket_regression_2)
156 Views