save_to_file() will dump the best configuration to a binary file in JSON format. However, if indicating 'wb', which is hardcoded in save_to_file() function, it will raise the error TypeError: a bytes-like object is required, not 'str'.
I'd like to suggest if we could change 'wb' to 'w' or let programmers pass the file-type parameters.
save_to_file() will dump the best configuration to a binary file in JSON format. However, if indicating 'wb', which is hardcoded in save_to_file() function, it will raise the error
TypeError: a bytes-like object is required, not 'str'
.I'd like to suggest if we could change 'wb' to 'w' or let programmers pass the file-type parameters.