File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 1- __version__ = "0.4.0 "
1+ __version__ = "0.4.1 "
Original file line number Diff line number Diff line change 66
77from .model import Model
88
9- CONFIG_VERSION = Literal ["1.0" , "1.1" ]
9+ # NOTE: Change in CONFIG_VERSION is a breaking change and should be communicated
10+ # to all other packages that relly on it before pushed to release
11+ CONFIG_VERSION = Literal ["1.0" ]
1012
1113
1214class Config (BaseModelExtraForbid ):
Original file line number Diff line number Diff line change 2020from pydantic import ValidationError
2121
2222from luxonis_ml .nn_archive import ArchiveGenerator , is_nn_archive
23- from luxonis_ml .nn_archive .model import Input , Output
23+ from luxonis_ml .nn_archive .model import HeadType , Input , Output
2424
2525DATA_DIR = Path ("tests/data/test_nn_archive" )
2626
@@ -91,7 +91,7 @@ def test_archive_generator(
9191 archive_name = archive_name ,
9292 save_path = "tests/data/test_nn_archive" ,
9393 cfg_dict = {
94- "config_version" : "1.1 " ,
94+ "config_version" : "1.0 " ,
9595 "model" : {
9696 "metadata" : {
9797 "name" : "test_model" ,
@@ -132,6 +132,22 @@ def test_archive_generator(
132132 assert "config.json" in tar .getnames ()
133133
134134
135+ def test_optional_head_name ():
136+ from luxonis_ml .nn_archive .config_building_blocks .base_models .head_metadata import (
137+ HeadMetadata ,
138+ )
139+
140+ # without head name
141+ HeadType (parser = "Parser" , metadata = HeadMetadata (), outputs = ["output" ]) # type: ignore
142+ # with head name
143+ HeadType (
144+ parser = "Parser" ,
145+ name = "HeadName" ,
146+ metadata = HeadMetadata (), # type: ignore
147+ outputs = ["output" ],
148+ )
149+
150+
135151def test_layout ():
136152 default = {
137153 "name" : "input" ,
You can’t perform that action at this time.
0 commit comments