You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Modern Python Package Refactor (pyproject.toml, src layout, versioning) #25
I've been actively using Satclip and recently refactored it into a modern Python package here: Haight3/satclip. I wanted to ask whether you'd be interested in adopting this structure upstream or as an optional branch.
Here’s what was changed:
Key Modernization Features:
PEP 621-compliant pyproject.toml (removes the need for setup.py/setup.cfg)
src/ layout to improve import hygiene and avoid namespace clashes
Explicit versioning support baked into the build process
All imports cleaned and made absolute for clarity
Add Documentation to most of the functions and modules.
Benefits:
Easier integration with tools like pipx, build, tox, pytest, and ruff
Simplifies distribution via PyPI or internal registries
Much easier for downstream users to consume and extend
Plays well with IDEs and type checkers (VSCode, PyCharm, mypy)
Helps modularize and test parts like location_encoder, wrap, etc.
Happy to open a PR or break this into smaller parts if you think it’s of interest!
This is related to #8 and #19 I believe... also hoping to see something like this implemented. I've tried to checkout a pre-trained model as per instructions in the README, on a linux based conda environment, but can't seem to get it working. It's not clear (to me, at least) what the requirements are. Konstantin Klemmer (@konstantinklemmer)
This is related to #8 and #19 I believe... also hoping to see something like this implemented. I've tried to checkout a pre-trained model as per instructions in the README, on a linux based conda environment, but can't seem to get it working. It's not clear (to me, at least) what the requirements are. @konstantinklemmer
You are totally right! I did not update the README properly and I have to put some work in the environment. I will do that this week and make some test to verify its functionality.
Hi Eli (@elijahrockers) and Monodrom (@ibaris) and sorry for the delay. As I unfortunately do not have the time to do a proper refactor / packaging myself, I would definitely be interested in potentially adopting your packaged version Monodrom (@ibaris) in here. Would you be willing to set up a PR and get that process started?
Eli (@elijahrockers) could you let me know what exactly you struggle with in getting the pretrained models to work?
Sorry for the delayed reply, and thank you so much for getting back to me!
I really appreciate the openness. Instead of merging everything at once with a different PR, it would probably make more sense to contribute incrementally. I’d be happy to start by contributing to PR #19 and build from there!
That would be fantastic Monodrom (@ibaris)! Please ping me once you have had a look at #19 and have integrated any potential adaptations you'd propose.
@elijahrockers could you let me know what exactly you struggle with in getting the pretrained models to work?
In the most recent attempt, I created a new conda environment, installed python=3.12, pytorch, and huggingface_hub. When I try to import get_satclip, it complains that I don't have the "lightning" module. So I conda installed the lightning module. Unfortunately, the installation of the "lightning" module breaks my pytorch installation with the following error message when I try to import it:
Python 3.12.9 | packaged by Anaconda, Inc. | (main, Feb 6 2025, 18:56:27) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license"for more information.
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/home/toolbox/.conda/envs/satclip/lib/python3.12/site-packages/torch/__init__.py", line 367, in<module>
from torch._C import *# noqa: F403
^^^^^^^^^^^^^^^^^^^^^^
ImportError: /home/toolbox/.conda/envs/satclip/lib/python3.12/site-packages/torch/../../../libtorch_python.so: undefined symbol: _ZN5torch3jit5fuser6onednn9fuseGraphERSt10shared_ptrINS0_5GraphEE
To fix it, I remove the entire environment, and reinstall pytorch.
I just noticed this thread. I agree with the suggestions Eli (@elijahrockers) and Monodrom (@ibaris)! Definitely feel free to take over #19 and add some commits there directly. Let me know if you need any support or help in this.
Activity
elijahrockers commentedon Apr 7, 2025
This is related to #8 and #19 I believe... also hoping to see something like this implemented. I've tried to checkout a pre-trained model as per instructions in the README, on a linux based conda environment, but can't seem to get it working. It's not clear (to me, at least) what the requirements are. Konstantin Klemmer (@konstantinklemmer)
ibaris commentedon Apr 8, 2025
You are totally right! I did not update the README properly and I have to put some work in the environment. I will do that this week and make some test to verify its functionality.
feat(README): Update README.
ibaris commentedon Apr 10, 2025
The issues have now been addressed here:
Note: I haven’t been able to test the full training pipeline yet and would appreciate help verifying that everything still works smoothly on your end.
The training can be started with the new entry point
Looking forward to your feedback!
konstantinklemmer commentedon Apr 11, 2025
Hi Eli (@elijahrockers) and Monodrom (@ibaris) and sorry for the delay. As I unfortunately do not have the time to do a proper refactor / packaging myself, I would definitely be interested in potentially adopting your packaged version Monodrom (@ibaris) in here. Would you be willing to set up a PR and get that process started?
Eli (@elijahrockers) could you let me know what exactly you struggle with in getting the pretrained models to work?
calebrob6 commentedon Apr 11, 2025
I think this is mostly handled here https://github.com/microsoft/satclip/pull/19/files
konstantinklemmer commentedon Apr 11, 2025
Hmm maybe I should just merge #19 and Monodrom (@ibaris) can add additional changes in a separate PR? There's some extra things in https://github.com/Haight3/satclip as far as I can tell from a quick glance.
fix(satclip.yml): Fix pytorch cuda issue
ibaris commentedon Apr 21, 2025
Sorry for the delayed reply, and thank you so much for getting back to me!
I really appreciate the openness. Instead of merging everything at once with a different PR, it would probably make more sense to contribute incrementally. I’d be happy to start by contributing to PR #19 and build from there!
konstantinklemmer commentedon Apr 30, 2025
That would be fantastic Monodrom (@ibaris)! Please ping me once you have had a look at #19 and have integrated any potential adaptations you'd propose.
elijahrockers commentedon May 15, 2025
Hi Konstantin Klemmer (@konstantinklemmer)
In the most recent attempt, I created a new conda environment, installed python=3.12, pytorch, and huggingface_hub. When I try to import get_satclip, it complains that I don't have the "lightning" module. So I conda installed the lightning module. Unfortunately, the installation of the "lightning" module breaks my pytorch installation with the following error message when I try to import it:
To fix it, I remove the entire environment, and reinstall pytorch.
jeangud commentedon Jun 29, 2025
I just noticed this thread. I agree with the suggestions Eli (@elijahrockers) and Monodrom (@ibaris)! Definitely feel free to take over #19 and add some commits there directly. Let me know if you need any support or help in this.
Setup and Forward (#3)
konstantinklemmer commentedon Oct 8, 2026
Addressed in #19.