Comments (15)
I've worked on this issue a lot for a couple of days by doing a lot of memory tracing and analysis of my code.
So I've found some memory culprits in two matplotlib graphing functions. So I've done some refactoring of the code and implemented some workarounds for this on my side. This allowed to reduce the total memory consumption by ~75% and speed up the graph generation around 15x on my side for the belt graph!
I just need to clean up a little bit and reproduce the enhancements for the input shaper graphs and vibrations graphs before issuing a new release. Stay tuned it will come soon :)
from klippain-shaketune.
Develop version is working for me
from klippain-shaketune.
Yes, have done many IS and Belt Tests at the Moment
from klippain-shaketune.
Sorry I never got back to your question, I've been out sick for the last week or so. Thanks so much for digging deep into this!
from klippain-shaketune.
After a few tests, I stopped homeassistant and it turned out working... But however, is there anything could be done to reduce the ram usage?
from klippain-shaketune.
After a few tests, I stopped homeassistant and it turned out working... But however, is there anything could be done to reduce the ram usage?
Oh ok... I already optimized the RAM usage a lot in the v2.x release and I don't think I can do much more easily... Total RAM usage is around 150MB on my machine. I'll try to monitor it closely and let you know if I find out something...
from klippain-shaketune.
Total RAM usage on my machine is ~350MB only running OS + klipper.
When running BELTS_SHAPER_CALIBRATION
it eats the remaining 650MB and moonraker restarts:
Could you maybe check again if you can do anything about it?
Belt calibration is pretty handy to tune the 3D printer :)
from klippain-shaketune.
I reinstalled my whole OS and tested it.
It works now and I got this graph:
Is it normal that the table line "Peaks B" is missing or did something fail here?
from klippain-shaketune.
I just ran into this too. is_workflow.py
runs for 10-20s then there's a large memory spike and the kernel OOM killer fires off. I've attached my CSV files in case this is data dependent
belts.zip
.
from klippain-shaketune.
Here's the list of python package version in my venv:
$ ./klippain_shaketune-env/bin/pip list
Package Version
--------------- -------
contourpy 1.2.0
cycler 0.12.1
fonttools 4.45.1
kiwisolver 1.4.5
matplotlib 3.8.2
numpy 1.26.2
packaging 23.2
Pillow 10.1.0
pip 23.3.2
pyparsing 3.1.1
python-dateutil 2.8.2
scipy 1.11.4
setuptools 66.1.1
six 1.16.0
from klippain-shaketune.
Thanks for sharing your data. This issue will be my priority starting from today and I hope to be able to lower the memory usage a bit more...
Is it normal that the table line "Peaks B" is missing or did something fail here?
On your graph you only have one pair of peaks (A1 paired with A2), so that's why there is only one line in the table for the peaks A. On the other hand, the Peak 1 is detected as alone and not paired so I can't compute any stats about it.
from klippain-shaketune.
Thats an amazing result!
Thanks that you took the time to trace it back and to solve this issue - its also nice that the speed also could be increased by this 👍
from klippain-shaketune.
When will you release the new Version?
I can't run any InputShaper on my Zero 2w with ShakeTune :-(
from klippain-shaketune.
You can already try the develop version that was pushed just a minute ago with all the changes. I plan to release it to main very soon but need to test and polish it a little bit to be sure everything is alright.
Also some part of the documentation needs to be updated regarding the vibration graph that was updated with a new element :)
from klippain-shaketune.
Develop version is working for me
Can you confirm that it's working on a PiZero 2W? But thanks for the feedback, that's great news :)
from klippain-shaketune.
Related Issues (20)
- TypeError: find_best_shaper() got an unexpected keyword argument 'shapers' HOT 4
- Error loading template 'gcode_macro AXES_SHAPER_CALIBRATION HOT 5
- After Running AXES_MAP_CALIBRATION i do not get the graphs HOT 7
- None vs none in K-SnT_axis.cfg HOT 1
- Error loading template 'gcode_macro AXES_SHAPER_CALIBRATION HOT 2
- ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. HOT 4
- unexpected keyword argument HOT 5
- Does the Belts graph support four-motor awd? HOT 1
- SET_VELOCITY_LIMIT is deprecated HOT 3
- Shaketune vibration not compiling CSV data into graphs. HOT 1
- BELTS_SHAPER_CALIBRATION: Error running command {shaketune} HOT 4
- Running Command {shaketune}...: Illegal instruction HOT 5
- S&T will not create the graph HOT 3
- S&T new version not generating Graph after running. HOT 5
- AXES_MAP_CALIBRATION not outputing any information HOT 3
- Measure Fan Vibration HOT 4
- AXES_SHAPER_CALIBRATION doesn't generate graph HOT 3
- accel_per_hz support HOT 1
- Добавить в описание по установке пункт: "Обязательно добавить секцию [resonance_tester] в printer.cfg".
- Backup and Uninstall HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from klippain-shaketune.