Don't send your code to any cloud you don't own, and especially don't send it to a service that's explicit about using your submissions in new training sets.
If you work for a company of any significant size, the answer from the legal team / outside counsel is almost certainly going to be "Do not share IP". While this is probably the correct answer, these teams are trained to be risk averse.
However, say you are a small startup or a solo dev. I am not certain there are significant risks beyond your code possibly showing up in future revisions of the model. In that scenario, one would think the risk of that code being possibly be made public could be evaluated on a case by case basis.
But possibly there are other risks?
In most cases, I would imagine that giving company intellectual property to a third-party is not allowed.