diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index efee6205..299dd65e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -82,7 +82,7 @@ jobs: cache: pip - name: Install dependencies - run: pip install . + run: pip install .[dev] - uses: jakebailey/pyright-action@v2 with: diff --git a/luxonis_train/__main__.py b/luxonis_train/__main__.py index 3351f067..7740f1d5 100644 --- a/luxonis_train/__main__.py +++ b/luxonis_train/__main__.py @@ -180,7 +180,7 @@ def archive( def version_callback(value: bool): if value: - typer.echo(f"LuxonisTrain Version: {version(__package__)}") + typer.echo(f"LuxonisTrain Version: {version('luxonis_train')}") raise typer.Exit() diff --git a/luxonis_train/callbacks/metadata_logger.py b/luxonis_train/callbacks/metadata_logger.py index f04cb575..3186a666 100644 --- a/luxonis_train/callbacks/metadata_logger.py +++ b/luxonis_train/callbacks/metadata_logger.py @@ -57,6 +57,8 @@ def _get_editable_package_git_hash( """ try: distribution = pkg_resources.get_distribution(package_name) + if distribution.location is None: + return None package_location = osp.join(distribution.location, package_name) # remove any additional folders in path (e.g. "/src") diff --git a/luxonis_train/nodes/backbones/efficientnet.py b/luxonis_train/nodes/backbones/efficientnet.py index 1c7120eb..f18d883f 100644 --- a/luxonis_train/nodes/backbones/efficientnet.py +++ b/luxonis_train/nodes/backbones/efficientnet.py @@ -1,7 +1,7 @@ from typing import Any import torch -from torch import Tensor +from torch import Tensor, nn from luxonis_train.nodes.base_node import BaseNode @@ -36,7 +36,7 @@ def __init__( """ super().__init__(**kwargs) - self.backbone = torch.hub.load( # type: ignore + self.backbone: nn.Module = torch.hub.load( # type: ignore "rwightman/gen-efficientnet-pytorch", "efficientnet_lite0", pretrained=download_weights,