I am looking to run the Optimization example in on...
# mlforecast
b
I am looking to run the Optimization example in one notebook and then load in the parameters into another notebook for predictions. I am saving the best_config as a json but I get an error for the target transformation and the lag transformations. When I try to pass them to LightGBMCV, I get a TypeError: '<=' not supported between instances of 'str' and 'int' b/c there are tick marks around each of the transformations. Any suggestions on how to save and load?
Copy code
{'21': ['ExpandingMean()',
  'RollingMean(min_samples=1, window_size=7)',
  'RollingMean(min_samples=1, window_size=14)',
  'RollingMean(min_samples=1, window_size=21)']}
j
Hey. The best config has python objects in it, you can't serialize it as JSON
🙌 1
b
Thank you for the response! Would using the pickle module be appropriate here or should I try saving it as a different format?
j
yes, pickle/cloudpickle should work
b
Thank you!
@José Morales I wanted to let you know that this suggestion works! Thank you so much
🙌 1