[WIP] Check for valid kwargs in default from_dict#67
[WIP] Check for valid kwargs in default from_dict#67mkhorton wants to merge 4 commits intomaterialyzeai:masterfrom
Conversation
|
I am unclear why this is a warning message is needed. Surely if the deserialization fail it is quite clear that the argument is wrong. |
|
The case where this came up:
This came up because one of the Custodian error handlers dropped an argument, but we have thousands of FireWorks that have still that argument hard-coded, so now even some |
Should not make changes directly on GitHub . . .
|
It is a very bad idea to deserialize by ignoring arguments. Code should be updated to handle deprecations. If devs want to ignore arguments, they can by all means write a wrapper function to clean the dict before doing deserialization. But it should not be that Monty just ignores bad arguments. |
|
So there is a pull request in Custodian to handle the deprecation in this specific instance -- but in general, the design of FireWorks is such that it becomes very fragile when these kinds of backwards incompatible changes are made. I think a warning is a fair compromise (imo). For example, currently any historical data that has been serialized via I agree that devs should handle this properly in the first place before making such changes but this does not always happen ... |
Improves robustness of monty when backwards incompatible changes are made. See materialsproject/custodian#130