Marc Gris
06/21/2023, 9:31 AMrandom_state: 42
and in conf/model_training.yml
random_state: ${random_state}
kedro run
>>> [...]
TypeError: Cannot cast scalar from dtype('<U15') to dtype('int64') according to the rule 'safe'
If I get this correctly, the consolidation / interpolation process resulted in random_state
being assigned the value "42"
instead of 42
Granted, I could easily circumvent this issue with int(params['random_state'])
, but I’m curious and would like to know if this is an expected behavior, and whether there is a more robust / elegant way of handling it.
Thx in advance
Mdatajoely
06/21/2023, 9:31 AMrandom_state: !!int 42
Marc Gris
06/21/2023, 9:41 AMConfigLoader
Could that be the issue ? Shall I use another loader ?
Thxint(params['random_state']
and got
ValueError: invalid literal for int() with base 10: '${random_state}'
I guess variable interpolation requires another config loader… 😅datajoely
06/21/2023, 9:53 AMMarc Gris
06/21/2023, 10:52 AM