insight-platform / Similari

A framework for building high-performance real-time multiple object trackers
Apache License 2.0
207 stars 14 forks source link

EpochDB trait not public #106

Closed rfechtner closed 10 months ago

rfechtner commented 10 months ago

Hi,

I would like to implement a custom Tracker using the TrackerAPI, whose signature is

pub trait TrackerAPI<TA, M, OA, E, N>
where
    TA: TrackAttributes<TA, OA>,
    M: ObservationMetric<TA, OA>,
    OA: ObservationAttributes,
    N: ChangeNotifier,
    E: EpochDb,
{ .. }

while the trait is public, the module containing the definition is not trackers.rs:

/// Trait that implements epoch db management
mod epoch_db;

Using the pre-implemented SortAttributesOptions is also not possible as the trait's functions are also private, ie. epoch_db() or next_epoch(), therefor I can't use them in my custom implementation without bringing EpochDb into scope.

Is the EpochDB mod deliberately private or I missing something in the API design? Or could we just:

- mod epoch_db;
+ pub mod epoch_db;

Cheers

bwsw commented 10 months ago

Hello. Sure, send a PR.

bwsw commented 10 months ago

I suppose you should take a look at the benches first. Because they are external to the crate and I never had limitations related to privacy.

rfechtner commented 10 months ago

Hi @bwsw, I have checked but non of the benchmarking examples use the TrackerAPI as they use the pre-implemented versions of Trackers (Using it only to bring the trait into scope, but not to implement a custom tracker as a extension).

I have seen that you already created an PR #107 making the EpochDB trait public, thanks for that! I will continue making some tests, maybe I can add a usage example to it.

bwsw commented 10 months ago

@rfechtner yes, I will fix the CI/CD and craft a new release soon.

bwsw commented 10 months ago

Published: https://crates.io/crates/similari-trackers-rs