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
ChoiceParameter with list of ints: TypeError: Object of type int32 is not JSON serializable #170
Comments
Hi @BCJuan ! Thanks for reporting this issue. I'm having trouble reproducing though. This is what I ran:
However, that completed successfully. Am I missing something? |
Hi, I still havethe problem if I use your code. It is my fault, I have checked the datatype and mine are The function I suppose is mandatory to use 64 bit data types. Apologies for the time spent. Best |
Oh interesting! We can fix it to work with np.int32 and np.float32. Thanks for catching this! |
Actually I believe this was already fixed! What version of Ax are you using? |
My fault I am using 0.1.3. Closing the issue. Thanks! |
Great! |
Hi,
First of all thank you for this awesome project.
Regarding the error: when trying to input a set of integers to a
ChoiceParameter
withparameter_type=ParameterType.INT
the following error appears:The problem seems to occur at file
arm.py
and at functionmd5hash
where the parameters are dumped to a JSONparameters_str = json.dumps(parameters, sort_keys=True)
To reproduce:
I have tried to make the list a set, but the problem seems to be in the parameter type definition. When changing to
ParameterType.STRING
and casting values to strings the problem does not exist.I know this is not an important error, but I state it here just so it is somewhere defined.
Thank you .
UPDATE: indeed this is strange since there is already a conversion from numpy to python in function
md5hash
:But it does not seem to work.
The text was updated successfully, but these errors were encountered: