autoware.universe icon indicating copy to clipboard operation
autoware.universe copied to clipboard

feat(tvm_utility): port tvm_utility

Open LucaFos opened this issue 2 years ago • 18 comments

Description

This package adds tvm utility, used for ML inference. It has been ported from Autoware.Auto. It depends on https://github.com/autowarefoundation/autoware.universe/pull/892

Related links

https://github.com/autowarefoundation/autoware.universe/issues/628 https://github.com/autowarefoundation/autoware/discussions/226

Tests performed

Notes for reviewers

It's probably easier to wait for https://github.com/autowarefoundation/autoware.universe/pull/892 to be merged before reviewing this.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • [ ] The PR follows the pull request guidelines.
  • [ ] The PR has been properly tested.
  • [ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • [ ] There are no open discussions or they are tracked via tickets.
  • [ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

LucaFos avatar May 12 '22 09:05 LucaFos

Awesome

yukkysaito avatar May 31 '22 02:05 yukkysaito

@LucaFos Pls fix some CI errors :pray:

yukkysaito avatar May 31 '22 02:05 yukkysaito

@yukkysaito I have a problem with fixing the CI on that patch: the linting from colcon test disagrees with the linting from pre-commit.

pre-commit chooses style like this: ci(pre-commit): autofix but colcon test doesn't: feat(tvm_utility): port tvm_utility build-and-test-differential. What should I do?

ambroise-arm avatar May 31 '22 10:05 ambroise-arm

I see. CI is updated recently, so I closed and reopen this PR to re-run CI

yukkysaito avatar May 31 '22 11:05 yukkysaito

@kenji-miyake can you help about CI erros? :pray:

yukkysaito avatar May 31 '22 12:05 yukkysaito

@yukkysaito I've fixed the linting/formatting issues.

The tvm_vendor package has been updated last week with a humble release, but it hasn't had time to make it in the ros repos, so the humble CI build is failing. Does it need to pass for this patch to be merged?

Note: I can't close Kenji's comment as I am not the PR author.

ambroise-arm avatar May 31 '22 14:05 ambroise-arm

@ambroise-arm I cannot merge on the system if all required CI tasks are passed. :pray: But it is blocked by build-and-test-differential / build-and-test-differential (humble) for humble migration. @kenji-miyake pls advise something :pray:

yukkysaito avatar May 31 '22 14:05 yukkysaito

It seems we have to release tvm_vendor to ROS buildfarm. https://github.com/autowarefoundation/autoware.universe/runs/6671634960?check_suite_focus=true

updated cache in /github/home/.ros/rosdep/sources.cache
E: Unable to locate package ros-humble-tvm-vendor
ERROR: the following rosdeps failed to install
  apt: command [apt-get install -y -qq ros-humble-tvm-vendor] failed
executing command [apt-get install -y -qq ros-humble-tvm-vendor]

Or, please add the source dependency to both of the following files:

  • https://github.com/autowarefoundation/autoware/blob/humble/autoware.repos
  • https://github.com/autowarefoundation/autoware.universe/blob/main/build_depends.humble.repos

kenji-miyake avatar May 31 '22 14:05 kenji-miyake

Probably @wep21 -san is working on the release now? :thinking: https://github.com/autowarefoundation/tvm_vendor/pull/10

kenji-miyake avatar May 31 '22 14:05 kenji-miyake

Yes, I faced the issue which caused only in the ros2 ci environment. I am trying to reproduce the issue in the local environment by Steven's advice.

wep21 avatar May 31 '22 16:05 wep21

Now it's released? I'll re-run the CI. https://discourse.ros.org/t/new-packages-for-ros-2-humble-hawksbill-2022-06-10/25995

-> Fixed! Thank you @wep21 for your great work!

kenji-miyake avatar Jun 11 '22 00:06 kenji-miyake

Codecov Report

Merging #893 (6cf2e58) into main (15f5b57) will decrease coverage by 1.29%. The diff coverage is n/a.

:exclamation: Current head 6cf2e58 differs from pull request most recent head 842b99a. Consider uploading reports for the commit 842b99a to get more accurate results

@@            Coverage Diff            @@
##             main    #893      +/-   ##
=========================================
- Coverage   10.37%   9.08%   -1.30%     
=========================================
  Files        1135    1031     -104     
  Lines       79579   70063    -9516     
  Branches    18548   14640    -3908     
=========================================
- Hits         8258    6366    -1892     
+ Misses      63224   58242    -4982     
+ Partials     8097    5455    -2642     
Flag Coverage Δ
total 9.06% <0.00%> (-1.30%) :arrow_down:
Impacted Files Coverage Δ
...ator/nodes/costmap_generator/points_to_costmap.cpp 0.00% <0.00%> (-82.36%) :arrow_down:
...wer/include/trajectory_follower/mpc_trajectory.hpp 0.00% <0.00%> (-50.00%) :arrow_down:
...tor/nodes/costmap_generator/objects_to_costmap.cpp 0.00% <0.00%> (-33.34%) :arrow_down:
...odel/vehicle_model_bicycle_kinematics_no_delay.cpp 73.91% <0.00%> (-17.40%) :arrow_down:
...vehicle_model/sim_model_ideal_steer_acc_geared.cpp 71.69% <0.00%> (-11.33%) :arrow_down:
...vehicle_model/sim_model_delay_steer_acc_geared.cpp 71.26% <0.00%> (-6.90%) :arrow_down:
...ory_follower/src/longitudinal_controller_utils.cpp 76.56% <0.00%> (-4.69%) :arrow_down:
...ehicle/vehicle_info_util/src/vehicle_info_util.cpp 27.27% <0.00%> (-4.55%) :arrow_down:
...ulator/vehicle_model/sim_model_ideal_steer_acc.cpp 91.66% <0.00%> (-4.17%) :arrow_down:
...ulator/vehicle_model/sim_model_ideal_steer_vel.cpp 92.30% <0.00%> (-3.85%) :arrow_down:
... and 405 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 05f6a6b...842b99a. Read the comment docs.

codecov[bot] avatar Jun 13 '22 16:06 codecov[bot]

I've rebased this branch onto the new main since https://github.com/autowarefoundation/autoware.universe/pull/892 is now merged.

xmfcx avatar Jun 20 '22 10:06 xmfcx

We should resolve this so the blocked issue can be resolved: https://github.com/autowarefoundation/autoware.universe/issues/628

xmfcx avatar Jul 19 '22 07:07 xmfcx

This is a port of an Autoware.Auto package with only minor modifications to pass the linting of .universe. I don't expect there will be a problem to having it merged. If none of the assigned reviewers have time to review it, can someone else be assigned?

ambroise-arm avatar Jul 25 '22 08:07 ambroise-arm

@xmfcx Since you seems to be busy with the bus integration, I will do take over this review task.

mitsudome-r avatar Aug 02 '22 08:08 mitsudome-r

I have approved the PR.

The code was ported from Autoware.Auto, and I'm not worried about the functionality.

One remaining concern that I have is having artifacts as a part of tvm_utility. In the readme, it says place any test artifacts, but are we expecting more artifacts to be added in the future as more models are added? If yolo_v2_tiny is good enough for test purpose, then we might want to clarify that in the README. This is just a suggestion and I'm okay with merging with current code.

mitsudome-r avatar Aug 03 '22 09:08 mitsudome-r

We definitely don't want to have one test-case/artifact per supported model. And yolo_v2_tiny is good enough for now. But we may want to add some in the future, and the test procedure has been written to support multiple test cases. So I would suggest keeping it as it is.

ambroise-arm avatar Aug 03 '22 09:08 ambroise-arm