`setup()` support any value, not only callable / function
Now we are getting an error that looks like:
datachain.lib.signal_schema.SetupError: cannot setup value 'client': value must be function or callable class
This is confusing and requires a non obvious workaround, e.g.:
client=lambda: anthropic.Anthropic(api_key=API_KEY)
(Note: the lambda above)
We should be able to just do:
client=anthropic.Anthropic(api_key=API_KEY) as well.
- [ ] Don't forget to update docs
For the reference - https://github.com/iterative/dvcx/pull/1712
Closing, won't implement this since it might lead to bad script with very heavy object potentially passed across distributed workers.
@shcheklein it still feels necessary, even if someone could misuse it.
let's reopen it