-
Notifications
You must be signed in to change notification settings - Fork 39
Error in writing tests for dm-launchpad-nightly==0.3.0.dev20210802 #14
Comments
we met the exact same issue cc @mavenlin |
I am having the same issue, this is just running launchpad as normal (not running through pytest). This notebook reproduces the error. |
I can't reproduce this problem. Is it still happening with the new release? Can you extract a stack trace from the UnparsedFlagAccessError? Thanks |
I just reran our CI with
The interesting dependencies are
The stack trace is
|
Parsing of flags should work just fine with absltest.main() (and it works for me).
If so, then doing binary search between this example and your Launchpad program could point at the issue. If it doesn't - I think there is something wrong with the absl you use. |
I can use the repro here to repro this behavior. When running with
but would fail when running
I think the issue is that I am using pytest to run all of the test cases and I am not using I think as a feature request here, we are thinking if it would be possible for LP to function even when absl FLAGS parsing is not called by the user. For many non-Google users, they probably won't be using absl for command line parsing and supporting this use case would make the OSS users happier since they don't have to buy in absl if they want to use LP. |
Ok, will try to make a change for this. |
This is to address #14. PiperOrigin-RevId: 391453193 Change-Id: I659eccef773fa75dbf50693355f8b8181ade1122
Can you check if this change helps? |
@qstanczyk That looks promising. I still get the error ( This is the workaround I was doing to get LP working through a notebook/colab.
I believe your change does something similar. |
Yeah, the change just got in, so it will be in the next nightly (on when building from sources). |
@qstanczyk This worked, thanks for the fix 👐 |
Good ;-) |
Hi,
I was recently running my test cases and encountered the following error.
I didn't have this issue with
dm-launchpad-nightly==0.3.0.dev20210728
so I suspect something was changed in the last few days.Here is a snippet of my test case. I can include the other relevant files if they are helpful for debugging.
I am using pytest and pytest-xdist for running the test cases. I did a check and it appears that running without pytest works fine. I suspect that the issue is that without using absl.app.run() the flags are not parsed hence throwing the error, but this is not desirable as the user may still want to use launchpad without using absl. It would be great if the configuration can be achieved without having to use absl flags.
The text was updated successfully, but these errors were encountered: