Skip to content

Commit e34965d

Browse files
authored
[Hotfix] Config version set to 1.0 (#190)
1 parent 6bcbb11 commit e34965d

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

luxonis_ml/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.4.0"
1+
__version__ = "0.4.1"

luxonis_ml/nn_archive/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
from .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

1214
class Config(BaseModelExtraForbid):

tests/test_nn_archive/test_nn_archive.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from pydantic import ValidationError
2121

2222
from 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

2525
DATA_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+
135151
def test_layout():
136152
default = {
137153
"name": "input",

0 commit comments

Comments
 (0)