uaarg / shepard

A collection of scripts running on the drone or for determining drone flight plans. These preform both imaging and autopilot tasks.
0 stars 2 forks source link

Benchmarks #1

Closed fadilm777 closed 1 year ago

PossiblyAShrub commented 1 year ago

Ah, the error here is a bit cryptic...

The issue is, we include yolov5 as a git submodule. Because of this, you need to clone with git clone --recursive .... Git submodules are basically a repository inside of a repository. Leaving out the --recursive would make git not clone the inner repository (called a submodule).

When the yolov5 submodule is missing, we will get import errors like this one.

So, when we run the project in CI, github actions isn't cloning that submodule. The fix is to set the submodules option on the actions/checkout@v3 task:

--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -16,6 +16,8 @@ jobs:

     steps:
     - uses: actions/checkout@v3
+      with:
+        submodules: true
     - name: Set up Python 3.10
       uses: actions/setup-python@v3
       with:

Adding those two lines is basically the equivalent of adding the --recursive flag to git clone.

fadilm777 commented 1 year ago

Ah, the error here is a bit cryptic...

The issue is, we include yolov5 as a git submodule. Because of this, you need to clone with git clone --recursive .... Git submodules are basically a repository inside of a repository. Leaving out the --recursive would make git not clone the inner repository (called a submodule).

When the yolov5 submodule is missing, we will get import errors like this one.

So, when we run the project in CI, github actions isn't cloning that submodule. The fix is to set the submodules option on the actions/checkout@v3 task:

--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -16,6 +16,8 @@ jobs:

     steps:
     - uses: actions/checkout@v3
+      with:
+        submodules: true
     - name: Set up Python 3.10
       uses: actions/setup-python@v3
       with:

Adding those two lines is basically the equivalent of adding the --recursive flag to git clone.

So, Github actions clones the entire repository in order to run the checks?

PossiblyAShrub commented 1 year ago

Yes. CI runs on essentially a fresh machine (think about the first time you had multipass setup.) One of the first steps is then to clone the repository onto that new machine.

I know it's confusing that even though Github hosts our code, the CI machines don't start with our code on it. So we need to tell the machine to git clone the repository. This is abstracted away in the actions/checkout task.


Thanks for the updates! I think it's ready to be merged.