Skip to content

chore: update Python dependencies - #442

Open
kozlov721 wants to merge 1 commit into
mainfrom
chore/update-python-dependencies
Open

chore: update Python dependencies#442
kozlov721 wants to merge 1 commit into
mainfrom
chore/update-python-dependencies

Conversation

@kozlov721

@kozlov721 kozlov721 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Automated update of uv.lock and the exported requirements*.txt files.

Summary by CodeRabbit

  • Chores
    • Updated project environment metadata and integrity records.
    • Maintained compatibility with the current development and testing toolchain.

@kozlov721
kozlov721 requested a review from a team as a code owner September 1, 2026 01:28
@kozlov721
kozlov721 requested review from klemen1999 and removed request for a team September 1, 2026 01:28
@kozlov721 kozlov721 added the automated Created by a bot label Sep 1, 2026
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 6a910c62-0075-45d5-a78c-9af17cd6c383

📥 Commits

Reviewing files that changed from the base of the PR and between 795f485 and e3c86ff.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • requirements-aimet.txt
  • requirements-config.txt
  • requirements-dev.txt
  • requirements.txt

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The requirements lockfile updates nine pinned dependencies and their SHA-256 hashes. No dependencies are added or removed.

Changes

Dependency lock refresh

Layer / File(s) Summary
Pinned dependency and hash updates
requirements-config.txt
Updates coverage, cyclopts, packaging, pydantic, pydantic-core, pydantic-settings, pygments, python-dotenv, and typing-inspection, with corresponding hash lists.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to e3c86

This updates dependency pins and generated requirements artifacts. No concrete compatibility or installation failure is established in the supplied current-head evidence, so no merge-blocking risk remains.

Suggested reviewers: klemen1999

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: updating Python dependencies. It is consistent with the dependency lockfile and requirements file updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/update-python-dependencies

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@klemen1999

Copy link
Copy Markdown
Collaborator

Oh actually looks like there are some incompatibilities

@kozlov721
kozlov721 force-pushed the chore/update-python-dependencies branch from fdc818a to e3c86ff Compare September 8, 2026 10:14
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
553 1 552 0
View the top 1 failed test(s) by shortest run time
tests/integration/test_predefined_models.py::test_predefined_models[segmentation_light_model]
Stack Traces | 195s run time
config_name = 'segmentation_light_model', extra_opts = {}
opts = {'trainer.epochs': 1, 'trainer.batch_size': 2, 'trainer.validation_interval': 1, 'trainer.callbacks': [{'name': 'TestO... 'active': False}, {'name': 'ConvertOnTrainEnd', 'active': False}, {'name': 'UploadCheckpoint', 'active': False}], ...}
test_datasets = LuxonisTestDatasets(parking_lot_dataset=<luxonis_ml.data.datasets.luxonis_dataset.LuxonisDataset object at 0x76fa292ed...aset object at 0x76f9ae9dacb0>, anomaly_detection_dataset=<tests.conftest.LuxonisTestDataset object at 0x76f9ae9a07f0>)
tmp_path = PosixPath('.../tmp/test_predefined_models_segment0/segmentation_light_model')
subtests = <_pytest.subtests.Subtests object at 0x76fa29fa18a0>

    @pytest.mark.parametrize(
        ("config_name", "extra_opts"), _predefined_model_params()
    )
    def test_predefined_models(
        config_name: str,
        extra_opts: Params | None,
        opts: Params,
        test_datasets: LuxonisTestDatasets,
        tmp_path: Path,
        subtests: SubTests,
    ):
        config_file, opts, dataset = prepare_predefined_model_config(
            config_name, opts, test_datasets
        )
        extra_opts = extra_opts or {}
        tmp_path = tmp_path / config_name
        tmp_path.mkdir()
    
        model = LuxonisModel(config_file, opts | extra_opts)
    
        with subtests.test("train"):
            model.train()
            assert model.run_save_dir.exists()
            assert list(model.run_save_dir.iterdir())
    
        with subtests.test("export"):
            model.export()
            assert (model.run_save_dir / "export" / f"{config_name}.onnx").exists()
    
        with subtests.test("archive"):
            model.archive()
            assert (
                model.run_save_dir / "archive" / f"{config_name}.onnx.tar.xz"
            ).exists()
    
        with subtests.test("quantize"):
            skip_if_no_aimet()
            save_dir = model.quantize()
            assert (save_dir / f"{config_name}.encodings").exists()
            assert (save_dir / f"{config_name}.onnx").exists()
            assert (save_dir / f"{config_name}.onnx.data").exists()
            archive_path = save_dir / f"{config_name}.onnx.tar.xz"
            assert archive_path.exists()
            with tarfile.open(archive_path) as tar:
                archive_entries = set(tar.getnames())
            assert "config.json" in archive_entries
            assert f"{config_name}.onnx" in archive_entries
            assert f"{config_name}.onnx.data" in archive_entries
    
        if config_name != "embeddings_model":
            with subtests.test("infer"):
                loader = LuxonisLoader(dataset)
                img_dir = tmp_path / "images"
                video_path = tmp_path / "video.avi"
                video_writer = cv2.VideoWriter(
                    str(video_path), cv2.VideoWriter.fourcc(*"XVID"), 1, (256, 256)
                )
                img_dir.mkdir()
                for i, (img, _) in enumerate(loader):
                    assert isinstance(img, np.ndarray)
                    img = cv2.resize(img, (256, 256))
                    cv2.imwrite(str(img_dir / f"{i}.png"), img)
                    video_writer.write(img)
                video_writer.release()
    
                for subtest in ["single_image", "image_dir", "video", "loader"]:
                    with subtests.test(f"infer/{subtest}"):
                        save_dir = tmp_path / f"infer_{subtest}"
                        if subtest == "single_image":
                            source = img_dir / "0.png"
                        elif subtest == "image_dir":
                            source = img_dir
                        elif subtest == "video":
                            source = video_path
                        else:
                            source = None
    
                        model.infer(source_path=source, save_dir=save_dir)
    
                        if subtest == "single_image":
                            assert len(list(save_dir.rglob("*.png"))) == 1
                        elif subtest == "image_dir":
                            assert len(list(save_dir.iterdir())) == len(loader)
                        elif subtest == "video":
                            assert len(list(save_dir.rglob("*.mp4"))) == 1
                        if subtest is None:
                            assert len(list(save_dir.iterdir())) == len(loader)
    
        # TODO: Support annotation for all models
        if (
            config_name
            not in {
                "embeddings_model",
                "anomaly_detection_model",
                "fomo_light_model",
            }
            or "heavy" in config_name
        ):
            with subtests.test("annotate"):
                model.annotate(
                    dir_path=dataset.source_path,
                    dataset_name="test_annotated_dataset",
                    bucket_storage="local",
                    delete_local=True,
                )
    
        with subtests.test("test-reload"):
>           model_reload = LuxonisModel(
                str(model.run_save_dir / "training_config.yaml"),
                opts | {"tracker.run_name": f"{config_name}_reload"},
            )

tests/integration/test_predefined_models.py:172: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
luxonis_train/core/core.py:402: in __init__
    self.lightning_module = LuxonisLightningModule(
luxonis_train/lightning/luxonis_lightning.py:171: in __init__
    self.nodes = Nodes(cfg, self.dataset_metadata, input_shapes)
luxonis_train/lightning/utils.py:188: in __init__
    node_module = Node(
luxonis_train/variants.py:89: in __call__
    obj = cls.__handle_variants(*args, variant=variant, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'luxonis_train.nodes.backbones.ddrnet.ddrnet.DDRNet'>
variant = '23-slim', args = ()
kwargs = {'weights': 'download', 'task_name': '', 'remove_on_export': False, 'dataset_metadata': {'classes': {'': {'person': 0}}, 'metadata_types': {}, 'n_keypoints': {'': 17}}, ...}

    def __handle_variants(
        cls: type["VariantBase"],  # type: ignore
        *args,
        variant: str | None = None,
        **kwargs,
    ) -> "VariantBase":
        obj = cls.__new__(cls, *args, **kwargs)
        variant = variant or "none"
    
        if variant == "none":
            cls.__init__(obj, *args, **kwargs)
            return obj
    
        try:
            default, variants = obj.get_variants()
        except NotImplementedError as e:
            if variant != "default":
                raise NotImplementedError(
                    f"'{cls.__name__}' was called with the 'variant' "
                    f"parameter set to '{variant}', but the `get_variants` "
                    "method was not implented."
                ) from e
            logger.warning(
                f"'{cls.__name__}' was called with the 'variant' "
                "parameter set to 'default', but the `get_variants` "
                "method was not implemented. Using default parameters."
            )
            cls.__init__(obj, *args, **kwargs)
            return obj
    
        if variant == "default":
            variant = default
    
        obj._variant = variant  # type: ignore
    
        if variant not in variants:
            raise ValueError(
                f"Variant '{variant}' is not available. "
                f"Available variants: {list(variants.keys())}."
            )
    
        params = variants[variant]
    
        for key in list(params.keys()):
            if key in kwargs:
                logger.info(
                    f"Overriding variant parameter '{key}' with "
                    f"explicitly provided value `{kwargs[key]}`."
                )
                del params[key]
    
>       cls.__init__(obj, *args, **kwargs, **params)
E       TypeError: _ModuleStackTracer.__init__.<locals>.AttrProxy.__init__() got an unexpected keyword argument 'weights'

luxonis_train/variants.py:80: TypeError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Created by a bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants