[Python+Backtrader+matplotlib] Fast alle Versionen von backtrader+matpolib wollen hunderte Gigabytes an Arbeitsspeicher allokieren.

in #python3 years ago (edited)

Backtrader funktioniert ab und zu nicht, denn es werden hunderte Gigabytes an Arbeitsspeicher allokiert, auch wenn man weniger als 21 Stunde an Daten berechnen möchte.

Locator attempting to generate 9504000003 ticks ([81647999999.0, ..., 91152000001.0]), which exceeds Locator.MAXTICKS (1000).

Der Fehler liegt in Matplotlib und ich habe den Fehler gelöst, in dem ich MAXTICKS auf 1000 setze, wenn der Wert 1000 überschritten wird.

Ich nehme an, daß der Fehler in Backtrader sitzt, denn sämmtliche Versionen von matplotlib weisen diesen Fehler aus:
matplotlib==1.3.1
matplotlib==3.3.4

Bei 22 Stunden werden nur 5GB Arbeitsspeicher allokiert und angezeigt:

image.png

Bei 21 Stunden werden nur 5GB allokiert:
image.png

image.png

Bei 20 Stunden, funktioniert es nicht mehr, weil zu viel Arbeitspeicher versucht zu reservieren wird.

Sort:  

Congratulations @fehlerbeheber! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 50 upvotes.
Your next target is to reach 100 upvotes.
You received more than 10 HP as payout for your posts and comments.
Your next payout target is 50 HP.
The unit is Hive Power equivalent because your rewards can be split into HP and HBD

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Hive Tour Update - Account creation and Account Recovery steps
Support the HiveBuzz project. Vote for our proposal!