glenn-jocher
commited on
Update ci-testing.yml reflecting sys.path additions (#869)
Browse files* Update ci-testing.yml
* Update yolo.py
* Update ci-testing.yml
* Update export.py
* Update yolo.py
- .github/workflows/ci-testing.yml +4 -4
- models/export.py +3 -3
- models/yolo.py +4 -2
.github/workflows/ci-testing.yml
CHANGED
@@ -53,13 +53,13 @@ jobs:
|
|
53 |
|
54 |
- name: Download data
|
55 |
run: |
|
56 |
-
curl -L -o
|
57 |
-
unzip -q
|
58 |
-
rm
|
59 |
|
60 |
- name: Tests workflow
|
61 |
run: |
|
62 |
-
export PYTHONPATH="$PWD" # to run *.py
|
63 |
di=cpu # inference devices # define device
|
64 |
|
65 |
# train
|
|
|
53 |
|
54 |
- name: Download data
|
55 |
run: |
|
56 |
+
# curl -L -o tmp.zip https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip
|
57 |
+
# unzip -q tmp.zip -d ../
|
58 |
+
# rm tmp.zip
|
59 |
|
60 |
- name: Tests workflow
|
61 |
run: |
|
62 |
+
# export PYTHONPATH="$PWD" # to run '$ python *.py' files in subdirectories
|
63 |
di=cpu # inference devices # define device
|
64 |
|
65 |
# train
|
models/export.py
CHANGED
@@ -5,13 +5,13 @@ Usage:
|
|
5 |
"""
|
6 |
|
7 |
import argparse
|
|
|
|
|
|
|
8 |
|
9 |
import torch
|
10 |
import torch.nn as nn
|
11 |
|
12 |
-
import sys
|
13 |
-
sys.path.append('./')
|
14 |
-
|
15 |
import models
|
16 |
from models.experimental import attempt_load
|
17 |
from utils.activations import Hardswish
|
|
|
5 |
"""
|
6 |
|
7 |
import argparse
|
8 |
+
import sys
|
9 |
+
|
10 |
+
sys.path.append('./') # to run '$ python *.py' files in subdirectories
|
11 |
|
12 |
import torch
|
13 |
import torch.nn as nn
|
14 |
|
|
|
|
|
|
|
15 |
import models
|
16 |
from models.experimental import attempt_load
|
17 |
from utils.activations import Hardswish
|
models/yolo.py
CHANGED
@@ -1,9 +1,13 @@
|
|
1 |
import argparse
|
2 |
import logging
|
3 |
import math
|
|
|
4 |
from copy import deepcopy
|
5 |
from pathlib import Path
|
6 |
|
|
|
|
|
|
|
7 |
import torch
|
8 |
import torch.nn as nn
|
9 |
|
@@ -13,8 +17,6 @@ from utils.general import check_anchor_order, make_divisible, check_file, set_lo
|
|
13 |
from utils.torch_utils import (
|
14 |
time_synchronized, fuse_conv_and_bn, model_info, scale_img, initialize_weights, select_device)
|
15 |
|
16 |
-
logger = logging.getLogger(__name__)
|
17 |
-
|
18 |
|
19 |
class Detect(nn.Module):
|
20 |
stride = None # strides computed during build
|
|
|
1 |
import argparse
|
2 |
import logging
|
3 |
import math
|
4 |
+
import sys
|
5 |
from copy import deepcopy
|
6 |
from pathlib import Path
|
7 |
|
8 |
+
sys.path.append('./') # to run '$ python *.py' files in subdirectories
|
9 |
+
logger = logging.getLogger(__name__)
|
10 |
+
|
11 |
import torch
|
12 |
import torch.nn as nn
|
13 |
|
|
|
17 |
from utils.torch_utils import (
|
18 |
time_synchronized, fuse_conv_and_bn, model_info, scale_img, initialize_weights, select_device)
|
19 |
|
|
|
|
|
20 |
|
21 |
class Detect(nn.Module):
|
22 |
stride = None # strides computed during build
|