Open fkiraly opened 3 weeks ago
Hey @fkiraly!
I have actually been meaning to contact you about the points you raise, so it's great that you found your way here on your own through my collaborator.
First, I'd be happy to help on the rework of the annotator/anomalies/changepoints/segmentation interface. What is the best way for me to contribute? Is it mainly by following and contributing to the issues you mention? And get started by following the instructions here https://www.sktime.net/en/latest/get_involved/contributing.html?
I've also been thinking about whether skchange
is best suited as a separate library or as a 1st party library down the line (in case you were interested). I currently enjoy the freedom that comes with creating a separate package, especially since it's still at an experimental stage, but I see the advantages of full integreation, definitely. Let me think about it.
Meanwhile, could you elaborate what making skchange a 2nd party library means? What needs to be done in sktime and skchange to make that happen? I know you have adapted several separate packages, e.g. tsfresh, to the sktime framework. Is that an example of a 2nd party integration?
Thanks for the reply, @Tveten!
First, I'd be happy to help on the rework of the annotator/anomalies/changepoints/segmentation interface. What is the best way for me to contribute?
Normally, a looser contribution pattern such as via issues etc would be what I would recommend, but the annotation module is "special" in the sense that it has been in an experimental stage for a while and we are moving it to a maturing stage, consolidating interfaces, so it is earlier stage than other modules.
Given this and your dependencies, I think it might be best if we have regular touch points, with @alex-jg3 and possibly users of skchange
.
Concretely, I suggest:
sktime
discord, these are our primary channels for async developer communication: https://discord.com/invite/54ACzaFsn7. There is a dedicated channel in "workstreams", but "dev-chat" is also frequently used.For synchronous, we have sync meetings on Mondays 12 UTC (workstream tech meetings) and Fridays 13 UTC (meetups, content varies, presentations or tech planning). Serendipitously, there is also the upcoming roadmap planning meeting 2024-2025 on June 21, i.e., very soon! It might make sense for you to join and suggest priority roadmap items based on your use cases and user base.
On the discord, we can send quick messages to schedule if any other timings are needed.
I currently enjoy the freedom that comes with creating a separate package, especially since it's still at an experimental stage, but I see the advantages of full integreation, definitely. Let me think about it.
I would say it's up to you, if you feel you have the capacity to maintain. As you say, the trade-off is between maintenance burden and agility. In any model, we are happy to help. As said, the annotation module is less consolidated than others, so it would be important imo to coordinate, especially when it concerns framework architecture and roadmap.
Meanwhile, could you elaborate what making skchange a 2nd party library means? What needs to be done in sktime and skchange to make that happen? I know you have adapted several separate packages, e.g. tsfresh, to the sktime framework. Is that an example of a 2nd party integration?
Let me be a bit more precise on what I mean with the different models.
The below applies for packages usable via sktime
API by other users, i.e., packages or algorithms that are meant to have their own users as opposed to being consumers/users themselves of sktime
and algorithms therein.
sktime
and packages maintained by the sktime
team. Governance and maintenance framework is the same, that of sktime
. Code-wise, estimators are part of sktime
repository, and subject to sktime
CI.skchange
, under separate governance and maintenance, licenses and owners may differ. There is technical integration and active cooperation both ways, e.g., PR to each others' packages. Communication and development is integrated via interfaces, e.g., following dev announcements on discord. Code-wise, estimators live in a separate repository, and CI runs interface conformance tests. Recent examples are prophetverse
https://github.com/felipeangelimvieira/prophetverse, which follows the sktime
forecaster API, or tsbootstrap
https://github.com/astrogilda/tsbootstrap, which follows the scikit-base
API while introducing its own base class interface that sktime
adapts to transformers.
sktime
interface of the 3rd party package is maintained unilaterally, by sktime
, and the 3rd party package typically does not make efforts to be interface compatible with sktime
unified APIs. Examples of this would be the tsfresh
package your mention, or statsmodels
, because neither projects have a commitment to compatible interfaces, share development processes, or commit resources to the integration.
sktime
compatible interfaces without active collaboration. We know this happens a lot in closed code bases (where IP management is the obstacle to collaboration), but we have not seen this in open code bases. Code-wise this works by using the contract checking utilities.There are also some typical transitions we've seen over years:
sktime
maintained interface is substantially more convenient or accessible (e.g., parameter choice, documentation), the 3rd party may choose to "adopt" the sktime
interface and become its maintainer, while retaining a separate package. The typical case would be research grade software or academic software.sktime
(repo or as small onboard lib), or sktime
devs may choose to fork an abandoned package into sktime
to ensure continued maintenance. An example of this is pykalman
, you can read up on the saga here: https://github.com/sktime/sktime/issues/5414, this is a fork made by sktime
; an example of collaborative transfer is vmdpy
.sktime
as an initial platform to gain notoriety and a user base, then divests its development resources from maintaining the sktime
interface in favour of its own package or software, which may be open or closed. Examples are interfaces to statsforecast
and temporian
, both run by companies who initially helped maintain an integration and no longer do.Thanks for the thorough reply!
I think a 2nd party solution sounds like a good solution for now, then we can see what happens down the line. So a few concrete steps towards this is:
skchange
already runs interface conformance tests, I believe: https://github.com/NorskRegnesentral/skchange/blob/main/skchange/tests/test_all_detectors.py. So maybe not much to do on the skchange
part of the code?skchange
to the new annotator interface.Something like that? I'm very open to additional suggestions!
@Tveten, makes absolute sense.
I would suggest as an additional point, what would be very useful is joining the discussion and/or active development on improvements to the 2nd party developer experience, together with @felipeangelimvieira (prophetverse
).
This PR came out of that: https://github.com/sktime/sktime/pull/6588
so now you can use check_estimator
, and pytest
will run the individual tests separately.
I will open an issue with some of the current improvements around this, and also "indexing", i.e., discoverability via all_estimators
and the estimator search GUI on the web: https://www.sktime.net/en/latest/estimator_overview.html
@fkiraly Fantastic!
Great package!
I was pointed to this by one of your collaborators, and wanted to let you know that we are currently reworking the anomalies/changepoints interface - the API had some inconsistencies for a while and we are planning to move it to a more mature state over the next minor release cycles.
It would be great to pool ideas and perhaps work on this together!
@alex-jg3 (sktime core developer) is currently driving the rework.
Relevant issues:
Input and feedback on the interface designs are much appreciated! Criticism especially, as you are a "consumer" of the interface.
Given the current state of skchange, we could also help:
skchange
from 3rd party to a 2nd party library, with synced API checks, CI, and indexing of the algorithms through thesktime
index, while retaining it as a separate library.sktime
proper with ownership and maintenance assigned to authors.What do you think? FYI @alex-jg3