Giter Club home page Giter Club logo

Comments (15)

Frix-x avatar Frix-x commented on May 29, 2024 2

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.

MagicBugsBunny avatar MagicBugsBunny commented on May 29, 2024 1

Develop version is working for me

from klippain-shaketune.

MagicBugsBunny avatar MagicBugsBunny commented on May 29, 2024 1

Yes, have done many IS and Belt Tests at the Moment

from klippain-shaketune.

konkers avatar konkers commented on May 29, 2024 1

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.

SHKinsem avatar SHKinsem commented on May 29, 2024

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.

Frix-x avatar Frix-x commented on May 29, 2024

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.

Phil1988 avatar Phil1988 commented on May 29, 2024

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:
image

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.

Phil1988 avatar Phil1988 commented on May 29, 2024

I reinstalled my whole OS and tested it.

It works now and I got this graph:
image

Is it normal that the table line "Peaks B" is missing or did something fail here?

from klippain-shaketune.

konkers avatar konkers commented on May 29, 2024

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.

konkers avatar konkers commented on May 29, 2024

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.

Frix-x avatar Frix-x commented on May 29, 2024

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.

Phil1988 avatar Phil1988 commented on May 29, 2024

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.

MagicBugsBunny avatar MagicBugsBunny commented on May 29, 2024

When will you release the new Version?
I can't run any InputShaper on my Zero 2w with ShakeTune :-(

from klippain-shaketune.

Frix-x avatar Frix-x commented on May 29, 2024

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 :)

vibrations_new

from klippain-shaketune.

Frix-x avatar Frix-x commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.