Draft: [Feat](Exports) Minor features for export generation
Context
Needed some features to generate the exports (needed for the cpp export refactor) :
- Now possible to generate a label tensor into the
generate_main_cpp()
function for result verification at runtime. - Add a
copy_folder()
function and add asymlink
argument to create symbolic links instead of simple file copy (help with dev process). - Add a function to remove the optional inputs from the
order_inputs
list so that they are not exported. - The
ExportNode
class now holds astatic_folders
variable acting as the existingstatic_files
variable but for whole folders. - Change the
kernels_to_copy
export node system as the old system had some limitations. Indeed, it was not possible to chose a destination path different from the source path. Also the copied kernel would be automatically included in the fwd file, sometime leading to unused includes. The new system is based on a list of dict holding, for each kernel file, the source and destination paths as well as a boolean to indicate if the kernel needs to be included in the forward file.
Modified files
-
code_generation.py
- Addcopy_folder()
function andsymlink
option. -
export_registry.py
- Addstatic_folder
: list of folders to export. -
scheduler_export.py
- Calls thecopy_folder()
function to export thestatic_folders
. Also changetest_mode
todev_mode
for more clarity. If thedev_mode
is enabled, the copied files will be symbolic links to help with development. -
generate_main.py
- Add label export. -
main.jinja
- Add label export and change default folder for inputs/labels toROOT/data
. -
main_compare.jinja
- Change default folder for inputs/labels toROOT/data
. -
export_utils.py
- Addremove_optional_inputs()
to remove the optional inputs of the graph before export.
Merge request reports
Activity
changed milestone to %aidge v0.6.0
added Enhancement ⭐ Feature 🚀 StatusWork in Progress TopicExport labels
requested review from @cmoineau and @pineapple
assigned to @axelfarr
@axelfarr This MR is still in draft, please ping me when it is review ready