https://www.boundaryml.com logo
๐ŸŸก Debugging my BAML format for tests is really pa...
# questions
r
Debugging my BAML format for tests is really painful. There needs to be some kind of validation.
p
I had the same problem until I asked here how to point to the error. If you pass the first parameter as the name of the assertion test, BAML will complain about that particular assertion and you can look into why.
My only issue is that BAML tests use Jinja syntax and I suck at Jinja. LMs seem to suck at Jinja too ๐Ÿคฃ
r
The error I have is in pasting 2K tickers into my job, there was a colon some place up top. It's just hard to find.
p
Odd, the syntax highlighter should have caught that
r
How long can a BAML prompt to Gemini take? It's been more than half an hour... no 1:20 I think it will cost like $20.
Totally worth it if it finishes.
v
yea... jinja does indeed suck
let me give you a preview of whats coming ๐Ÿ™‚
then we can kill jinja and give good errors!
p
@greg (BAML) in beast mode! From AST to HIR ๐Ÿ˜ฎ
Very interesting! I for one will not be the slightest bit sad to see the back of jinja ๐Ÿ˜‚
v
yea wait till you see the VM and how we do parallelism . you'll never want to think in async ever again ๐Ÿ™‚
a
| The error I have is in pasting 2K tickers into my job, there was a colon some place up top. It's just hard to find. do you have a small toy example? I believe the issue wasnt with jinja, but with just BAML in general giving you compilation errors on test arguments, right?
p
I'm already struggling with async @Vaibhav (BAML ๐Ÿ‘) ๐Ÿ˜ญ
I run into rate limits in OpenRouter + Python code because BAML is too efficient at async and I'm throttled out of existence.
Goddamn Rust! lol
So I'm having to add rate limiters and async semaphores in Python (ugh) and the code is just looking worse as a result .
And I can't do sync either because the workflow is too slow in sync mode. So dealing with semaphores and manually rate-limiting is my only bet now
BAML's parser is so quick that for smaller models the latency is a little too low and async actually fails due to rate-limiting.. First world problems ๐Ÿ˜‚
a
our async code needs to include a way to set rate limits or people will run into this issue head-first
baml native async-code*
p
yeah, i hate semaphores in python async, they're the worst
completely destroys the zen of python and code readbility goes for a toss
But still, not having to do this and instead use baml native-async's rate limiting would solve this issue in all languages at once
v
we've got even better ideas than this ๐Ÿ˜‰
I'm cookin
r
So no, BAML and Gemini 2.5 Pro canโ€™t merge 5,000 records with 6,000 records, it produced 50 records overnight. Had to try! ๐Ÿคช
There appears to be no timeout.
It generated 8M tokens in processing.
I do async with semaphores too, but I think itโ€™s great! Claude just did it. Iโ€™ve only used semaphores a few timesโ€ฆ I do MapReduce, not threads ๐Ÿ™‚
@prrao async isnโ€™t everything, if itโ€™s a pain spawn threads or pids and use sync ๐Ÿ™‚
That will control rate limits ๐Ÿ˜„
v
I'd like to know, when VM features are officially released, whether it will be possible to dynamically add types for type xxxx = class A | class B @dynamic
v
we're going to release the first version of the VM w/o type_builder / client registry / collector
but those will come after
for
type xxxx = class A | class B @dynamic
we are actually thinking of introducing a:
Copy code
union XXXX {
   A
   B

   @@dyanmic
}
or something along those lines, cuase we think naming for unions and having them be descriminated unions is Best practice