PyLabFEA does have an example of machine learning of material yield functions.
Isotropic and anisotropic examples are shown in a science article.
See
Abaqus example with umat.
So calculix should be also possible. I made an issue.
The developer will make an umat for calculix. It is a new point of his development list.