-
Notifications
You must be signed in to change notification settings - Fork 6
Updated Frontend and Settings #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
On @fpjentzsch suggestion moved our frontend to use Pydantic. There are still some bits that need fixing, but it does start normally. We can simply and read from and assign to settings and it gets saved into the environment directly as well. Also simplifies our main |
|
@fpjentzsch I fixed several issues. The PR is ready for merging. I had the thought of making @LinusJungemann I am unsure, but I think the Builder Config Documentation Check might be broken, atleast it doesn't list the undocumented fields (I didn't add any either), and it fails with a syntax error on the match clause (Python version too old?) Edit: Actually providing a settings singleton (and some nicer output along the way) might be possible. Ill see the next weeks if its doable. |
… run as deprecated
…us into finn_settings_rework
…ling for the first time
Note: Should fix failing test_fpgadataflow_rtl_dynamic_mvau tests
…g as external dependency
…us into finn_settings_rework
During the last weeks when I had some time I worked on updating our frontend. @LinusJungemann had mentioned that we probably shouldn't hardcode the dependencies into the code, and I thought that the settings management was a bit difficult to understand.
With that in mind, and due to the several research topics that we are currently working on (that will need to be merged and configured), I reworked mainly the following things:
Implemented Features and Fixes
(Updated 03.11.25, 14.11.25, 19.11.25, 03-05.12.25)
Settings
FINNSettings) that can be used like any other class and will automatically adjust environment variablesFINNSettings, replacing most uses ofos.environ[...]finn_depsinstead ofdepsdepsinsite-packages. This could potentially cause confusion with other packages and doesn't mark the directory belonging to FINN, thus the changeDependencies
external_dependencies.yaml. This can be configured in settings and environment viaFINN_DEPS_DEFINITIONSfinn_xsiis part of the dependencies now, not requiring an extra setupDependencyManagernow,finn_xsistill needs to be loaded inprepare_finnto make sure it's available when skipping dependency updatesfinn deps updategot two more options:--accept-defaultsto accept missing settings files (explained below again)--forceto delete the dependency directory and freshly install all dependencies againCommands / Click
run_finn.py. Any click function is described by decorators that tell the name of the argument that they add to the function.finn configsubcommands for example)finn deps {edit,show}finn config {create,edit,show}--accept-defaults)finn wizard configorfinn config createfinn wizard flowDataflowOutputTypes, so you never accidentally forget themmodel_path. This way it's possible to runfinn build cfg.yamlfinn autotries to run FINN by automatically finding a flow config and a model. It searches for{cfg,config}.{yaml,yml,json}andmodel.onnxprimarily, but if one isnt found defaults to the first available .yaml/yml/json/onnx fileconfig.yamlandmodel.onnxin the same directory, simply runningfinn autowill find these and start FINN. Note however, that this command does not have any of the other configuration options. If no settings are found this will also automatically start the setup wizard as well.Tests
finn test --variant custom --name <name>, where name can be a test specification in pytest syntax (liketest_dir/complex_tests.py::ComplexTest::test_function, etc.)build_dataflow_directory, since the function itself is removed as wellfinn test, the main functions setsFINN_SETTINGSto the given file so that the tests receive these settings as wellOther
--batchparameter. This disables the wizards, forces default values if no settings were found and disables interactive / live displaysoutput_dir: ~in the flow config, a directory namedNonewould be placed in~. This is fixed nowBackwards Compatibility
No:
finncan now start the wizards when some files are missing (and you have to specifically pass--accept-defaultsto avoid this), some automated scripts might break.finn depsandfinn configcommands were renamedOpen
--skip-dependency-updatescauses XSI to not be loaded when runningfinn test--batchoption implementation for all commands that can use it