Skip to content

Changing log level affects output #419

Description

@ThomasGreenhill

Description:
When changing the log level, i.e. symforce.set_log_level("error") from the default ("info"), the codegen output changes.
We do a number of operations that require conversion to/from sympy, and with the "info" log level, produces a lot of warnings such as:

symbolic.integrate():607 WARNING -- Converting to sympy to use .integrate
symbolic.simplify():563 WARNING -- Converting to sympy to use .simplify

Which is known and accepted, so we wanted to suppress those warnings. However, after adding symforce.set_log_level("error") to the code that produces those warnings, the generated C++ code is also changed, which I did not expect. We have some minor customizations on top of CppCodePrinter but nothing that would affect this.

I would expect the functionality to be identical regardless of the log level, but maybe I'm missing something?

Happy to put together minimum steps to reproduce/minimum example as needed, but I think doing an integrate/simplify and then codegen should do the trick.

Environment (please complete the following information):

  • OS and version: Reproduced on Ubuntu 20.04 and 22.04
  • Python version 3.10.15
  • SymForce version 0.9.0
  • Symengine version 0.11.0
  • sympy version 1.13.3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions