is there any prior art for using llms for generating with malli?
why would you want this
@vale you might instead find malli.provider interesting, when it comes to generating schemas from existing data https://github.com/metosin/malli#inferring-schemas
unless you mean for generating example values, which is the raison detre of generators, which also work for clojure.spec
generating realistic-looking random data like people names, city names, age distribution of organizational members etc that'd take a ton of work to procure and format from online sources
@sludwig.dev i meant to ask if there's some way to plug some llm into a malli generator so i don't need to have people named "xfisdufy oisdfugosfdi"
so, this is something i've actually done at work, there's a few libraries in the ecosystem that do that, you can plug those into generators if you want, or just generate data with them on their own (and check it against your schema) let me find the library we're using
ah, here it is, I know there's a few more that do this if you wanna do some exploring as well https://github.com/jgrodziski/talltale
please do share if you recall any others as well β€οΈ
https://github.com/paraseba/faker is the one i've used in the past but it's not nearly as fancy as talltale
For generating reasonable looking data you should check out Michael Drogalis's Shadow Traffic
Using malli.experimental.time with :time/zoned-date-time it looks like decoding requires an offset and a timezone (ie. 2022-12-18T06:00:25.840823567-06:00[America/Chicago])
Is there any way to allow it to decode just use the timezone (ie 2022-12-18T06:00:25.840823567[America/Chicago])?
(in clojure, not clojurescript)
is it because thatβs ambiguous at exactly DST intervals?
I'm having an odd issue where it appears that a function registered via m/=> is being instrumented in my test suite (run via kaocha).
As far as I know, I am not calling m/-instrument or any other function that should cause instrumentation.
When I look at (-> #'m/-function-schemas* deref (.getWatches)) it's empty (so it doesn't seem like is running)
If I re-evaluate the namespace the instrumentation disappears. I've tried upgrading to 19.1 but that didn't change anything.
Any ideas on how I can debug further?
Can you print the fn you suspect is being instrumented? It's usually obvious from its name whether its instrumented. For example, uninstrumented defn's are named after the munged var, but instrumented ones usually come from another ns.
The stack trace it throws when called with non-conforming inputs shows malli.instrument + its the pretty reporter
I've temporarily worked around it by manually uninstrumenting the var in a fixture, but I have no idea why its instrumented in the first place. The only thing I can think is that some library I am using has a malli/instument! call somewhere in its root namespace
if you're doing no instrumentation at all, you could alter-var-root m/-instrument early in your boot process to print a stack trace and exit the jvm.
or clone malli onto your machine and do a similar thing with :local/root deps.
Yeah it's a good thought
Almost certainly its got to be a library calling it somewhere
more flexible would be to spit the traces to a file
Found it...
I'll open a PR upstream
Thanks for the reply
(Inspecting the function registry led me to see the library that had function definitions registered)