Skip to content

Instantly share code, notes, and snippets.

View colonelpanic8's full-sized avatar

Ivan Malison colonelpanic8

  • San Francisco, CA
View GitHub Profile
;; -*- no-byte-compile: t -*-
(let ((bootstrap-file (concat user-emacs-directory "straight/bootstrap.el"))
(bootstrap-version 2))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
/home/imalison/railbird/tests/test_image.py:11:9 - error: Method "to_bgr" overrides class "Image" in an incompatible manner
  Return type mismatch: base method returns type "BGRImage", override returns type "ImageTestClass"
    "ImageTestClass" is incompatible with "BGRImage" (reportIncompatibleMethodOverride)
/home/imalison/railbird/tests/test_image.py:14:9 - error: Method "to_cv2_lab" overrides class "Image" in an incompatible manner
  Return type mismatch: base method returns type "LABCV2Image", override returns type "ImageTestClass"
    "ImageTestClass" is incompatible with "LABCV2Image" (reportIncompatibleMethodOverride)
/home/imalison/railbird/tests/test_image.py:17:9 - error: Method "to_rgb" overrides class "Image" in an incompatible manner
  Return type mismatch: base method returns type "RGBImage", override returns type "ImageTestClass"
    "ImageTestClass" is incompatible with "RGBImage" (reportIncompatibleMethodOverride)
railbird on  ivan/flake-update-and-ml-build [$!?] is 📦 v0.1.0 via 🐍 v3.11.9 via ❄ impure (nix-shell-env) on ☁ ivan@railbird.ai took 18s
➜ just pyright
poetry run $PYRIGHT
/home/imalison/Projects/railbird/railbird/datatypes/labels.py
/home/imalison/Projects/railbird/railbird/datatypes/labels.py:165:9 - error: "polygon" incorrectly overrides property of same name in class "Annotation" (reportIncompatibleMethodOverride)
/home/imalison/Projects/railbird/railbird/datatypes/labels.py:178:9 - error: "max_x" incorrectly overrides property of same name in class "Annotation"
  Property method "fget" is incompatible
    Return type mismatch: base method returns type "int", override returns type "int | float"
      Type "int | float" is incompatible with type "int"
        "float" is incompatible with "int" (reportIncompatibleMethodOverride)
opencv-python = super.opencv-python.overridePythonAttrs (old: {
CMAKE_ARGS = "-DBUILD_LIST=core,dnn,features2d,flann,gapi,imgcodecs,imgproc,python3,videoio -DOPENCV_GAPI_STANDALONE=ON -DOPENCV_ENABLE_NONFREE=ON -DGAPI_STANDALONE=1";
});
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing pip-build-hook
Using pipBuildPhase
@declared_attr
def start_time(cls):
return column_property(cls._frame_number_to_timestamp(cls.start_frame))
@declared_attr
def end_time(cls):
return column_property(cls._frame_number_to_timestamp(cls.end_frame))
@classmethod
def _frame_number_to_timestamp(cls, frame_expression: sa.ColumnElement[int]):
@classmethod
def _cue_object_features_query(
cls, column_property: sa.ColumnElement[sa.Any]
) -> sa.Select:
return (
sa.select(column_property)
.select_from(cls)
.join(CueObjectFeatures, cls.shot_id == CueObjectFeatures.shot_id)
.where(cls.shot_id == cls.shot_id)
.scalar_subquery()
from typing import Any
from sqlalchemy.orm import Session
from railbird import util
from railbird.datatypes import models
util, Session
try:
class ShufflingPaddingTimeseriesCollator:
def __init__(
self,
timeseries_length: int = 500,
timeseries_count: int = 25,
timeseries_dimension: int = 2,
):
self._timeseries_length = timeseries_length
self._timeseries_count = timeseries_count
self._timeseries_dimension = timeseries_dimension
Even on the fastest gpus that we could realistically use, railbird's video
processing pipeline can only run at about 2x real time. If we were to wait for
users to finish recording their tracking sessions to start uploading video to
our backend it could take hours for them to have complete statistics, at which
point they will likely have moved on to thinking about something else. The
obvious solution here is streaming, but unfortunately, pretty much every
streaming protocol in existence is optimzed to minimize latency at all costs.
They achieve this by adjusting the bit rate or dropping frames to synchronize
the stream closely with the recording time, whenever the connection bandwith
becomes spotty or cuts out momentarily. These sacrifices in the name of