Pypi packaging and use new DASCore namespaces? #22
Replies: 1 comment
|
Hey @d-chambers, Thanks for working on this. Great ideas! Pypi installation support has been in my to do list for quite a while… It would be nice to add namespaces capability for this package. Currently, we 1) generate PSD images from a spool, 2) train the autoencoder on some of them, and 3) detect anomalies within them. The first step can certainly be supported by a spool namespace. Eventually, I think we can tweak the workflow to 1) generate PSDs only for training (data with background noise only), 2) train the model on them, and 3) for each patch in the chucked spool, use a namespace to i) generate PSD (in memory) and ii) apply the detect function to flag anomaly (and save the PSD and/or raster plot on disk if flagged as anomaly). This will help to better handle storage needa and improve i/o and potentially make the workflow faster as we’ll avoid saving many many PSD images on disk (if not the user is not interested in saving the ones detected as background noise). In that case, namespace can be used in the detection phase as well. But let’s start with the first phase, PSD generation. Please feel free to start a PR and ping me wherever I can help! |
Uh oh!
There was an error while loading. Please reload this page.
Hey @ahmadtourei,
I have been thinking a lot about the DASDAE ecosystem recently, particularly making non-DAScore DASDAE packages easier to use and better integrated together. Recently, I added the concept of namespaces for exactly this reason.
I think das-anomaly is an excellent package that is well positioned to take advantage of this new integration mode. Also, many more people would probably use if it was available on PyPI/conda-forge.
Would you be open to making some modifications to facilitate these two goals? I quickly brainstormed with codex and claude about how best to do this, and it came up with these suggestions. They certainly require a bit more discussion, but are a good starting point. I am happy to open a few PRs over the next couple weeks to make it happen. What do you think?
Integrate with PyPI
Prepare das-anomaly for a conservative first PyPI release by hardening packaging, reducing install friction, adding release automation, and validating the wheel before publishing.
Key Changes
Release Workflow
before the first production upload.
Use new DASCore namespaces
The API might become a bit more ergonomic with the namespaces. We can also keep the old namespace for existing users. The goal is to make das-anomaly feel like a natural extension of DASCore. Users would keep using DASCore for loading, selecting, and chunking DAS data, then call anomaly-specific methods through a patch.anomaly or spool.anomaly namespace.
Generate images from a spool:
Work with single Patch.
Generate Training Images from a Clean Time Range
Run Detection on Generated PSD Images
For Python users, common settings should be passed directly as function arguments or as typed config objects.
These objects would just be Pydantic objects that can be serialized for command line use.
For CLI/script users, the same config could live in a YAML, TOML, or JSON file:
All reactions