Currently, weight loading requires running from the specific directory so the relative paths match. In addition, predict() expects all backbends to have a format of <output_dir>/firmware which may not be the case forever in the future (one API in particular will have a different hierarchy). With this PR we ensure the created .so file is has the weights for in absolute path, so loading it from any directory will work, and predict no longer has to change folders.
Type of change
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Tests
No need for new tests, all tests will fail if it doesn't work.
Description
Currently, weight loading requires running from the specific directory so the relative paths match. In addition,
predict()
expects all backbends to have a format of<output_dir>/firmware
which may not be the case forever in the future (one API in particular will have a different hierarchy). With this PR we ensure the created .so file is has the weights for in absolute path, so loading it from any directory will work, and predict no longer has to change folders.Type of change
Tests
No need for new tests, all tests will fail if it doesn't work.
Checklist
pre-commit
on the files I edited or added.