https://www.boundaryml.com logo
Any thoughts from the team about why I'm
# troubleshooting-will-be-archived-use-help-instead
a
Any thoughts from the team about why I'm not able to set BAML_LOG via the
BamlOptions
TypedDict? Here's the code I'm using. The
client_registry
option is working but not the
env
option:
baml_options={'client_registry': cr, 'env': {'BAML_LOG': 'OFF'}}
v
You can just set it via python!
In the line before
os.environ
That said this should work as well
a
The env vars are set in our application via Pydantic's settings Class. So we don't load env vars via python-dotenv. That said, is the BamlOptions not supported?
I am currently using the
set_log_level
method, but it's my understanding that it's being deprecated.
v
set_log_level
is just being replaced with:
Copy code
os.environ['BAML_LOG'] = 'OFF'
f
What's the TS equivalent of this?
Copy code
typescript
process.env.BAML_LOG = isDev ? 'DEBUG' : 'OFF';
didn't work
v
Oh?! Thatโ€™s surprising. We did bind to process.env
Iโ€™ll double check!
b
@footballa do you mind sharing a snippet of your code right after you set
BAML_LOG
?
a
Try 0.203! We patched an issue here
b
@americanthinker_02199 Can you also try the latest release 0.203, apparently there was a bug in how we were setting
BAML_LOG
internally.
a
@ba11b0y Confirming on my end that after upgrading to .203 that dynamically setting env vars through BamlOptions is now working. โค๏ธ Relevant code snippet:
baml_options={'client_registry': cr, 'env': {'BAML_LOG': 'ERROR'}}
b
Awesome! Thanks a ton for confirming!