Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reaching matplotlib limit? #24

Closed
drvinceknight opened this issue Feb 25, 2016 · 10 comments
Closed

Reaching matplotlib limit? #24

drvinceknight opened this issue Feb 25, 2016 · 10 comments

Comments

@drvinceknight
Copy link
Member

Looks like not all images got drawn (this is after adding the sequence strategies).

Just dumping this here (need to get to class):

Starting basic_strategies tournament with 100 round robins of 200 turns per pair.
Finished all basic_strategies tasks in 8.6s
Starting strategies tournament with 100 round robins of 200 turns per pair.
Finished all strategies tasks in 5797.4s
Starting all_strategies tournament with 100 round robins of 200 turns per pair.
Finished all all_strategies tasks in 6377.6s
Finished all tournaments in 12183.6s
-- Running Axelrod, regenerating cache, results, and figures
Starting basic_strategies tournament with 100 round robins of 200 turns per pair.
Finished all basic_strategies tasks in 7.9s
Starting strategies tournament with 100 round robins of 200 turns per pair.
Finished all strategies tasks in 3421.3s
Starting all_strategies tournament with 100 round robins of 200 turns per pair.
Traceback (most recent call last):
  File "./run_axelrod", line 116, in <module>
    run_tournaments(**kwargs)
  File "/home/vince/Axelrod/axelrod/utils.py", line 71, in run_tournaments
    manager.run_tournaments()
  File "/home/vince/Axelrod/axelrod/tournament_manager.py", line 53, in run_tournaments
    self._run_single_tournament(tournament)
  File "/home/vince/Axelrod/axelrod/tournament_manager.py", line 84, in _run_single_tournament
    self._generate_output_files(tournament, ecosystem)
  File "/home/vince/Axelrod/axelrod/tournament_manager.py", line 115, in _generate_output_files
    image_format=self._image_format)
  File "/home/vince/Axelrod/axelrod/tournament_manager.py", line 135, in _save_plots
    self._save_plot(figure, file_name)
  File "/home/vince/Axelrod/axelrod/tournament_manager.py", line 149, in _save_plot
    figure.savefig(file_name, bbox_inches='tight', dpi=dpi)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py", line 1539, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5agg.py", line 197, in print_figure
    self.draw()
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5agg.py", line 158, in draw
    FigureCanvasAgg.draw(self)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py", line 474, in draw
    self.figure.draw(self.renderer)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py", line 1133, in draw
    func(*args)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 2304, in draw
    a.draw(renderer)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/collections.py", line 815, in draw
    Collection.draw(self, renderer)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/collections.py", line 316, in draw
    mpath.Path(offsets), transOffset, tuple(facecolors[0]))
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py", line 123, in draw_markers
    return self._renderer.draw_markers(*kl, **kw)
OverflowError: In draw_markers: Exceeded cell block limit

On:

  • Ubuntu 14.04
  • Python 3.4.3
  • Matplotlib 1.5.0
@marcharper
Copy link
Member

I'll try on my machine.

@marcharper
Copy link
Member

Works ok for me (matplotlib 1.4.2 on ubuntu)

user@tower:~/repos/axelrod/tournament$ sh update_results.sh 0 100
-- Regenerating noisy tournament figures
Starting basic_strategies tournament with 100 round robins of 200 turns per pair.
Finished all basic_strategies tasks in 6.8s
Starting strategies tournament with 100 round robins of 200 turns per pair.
Finished all strategies tasks in 1930.5s
Starting all_strategies tournament with 100 round robins of 200 turns per pair.
Finished all all_strategies tasks in 3993.8s
Finished all tournaments in 5931.1s
-- Running Axelrod, regenerating cache, results, and figures
Starting basic_strategies tournament with 100 round robins of 200 turns per pair.
/usr/lib/python2.7/dist-packages/matplotlib/collections.py:571: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):
Finished all basic_strategies tasks in 4.4s
Starting strategies tournament with 100 round robins of 200 turns per pair.
Finished all strategies tasks in 1370.4s
Starting all_strategies tournament with 100 round robins of 200 turns per pair.
Finished all all_strategies tasks in 542.8s
Finished all tournaments in 1917.8s
Be sure to git commit changes to update the docs!

How much RAM do you have?

@drvinceknight
Copy link
Member Author

16gb. Surely that's enough?

Not worth worrying about it too much unless it happens again. Close the
issue?

On Thu, 25 Feb 2016, 19:08 Marc Harper notifications@github.com wrote:

Works ok for me (matplotlib 1.4.2 on ubuntu)

user@tower:~/repos/axelrod/tournament$ sh update_results.sh 0 100
-- Regenerating noisy tournament figures
Starting basic_strategies tournament with 100 round robins of 200 turns per pair.
Finished all basic_strategies tasks in 6.8s
Starting strategies tournament with 100 round robins of 200 turns per pair.
Finished all strategies tasks in 1930.5s
Starting all_strategies tournament with 100 round robins of 200 turns per pair.
Finished all all_strategies tasks in 3993.8s
Finished all tournaments in 5931.1s
-- Running Axelrod, regenerating cache, results, and figures
Starting basic_strategies tournament with 100 round robins of 200 turns per pair.
/usr/lib/python2.7/dist-packages/matplotlib/collections.py:571: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
if self._edgecolors == str('face'):
Finished all basic_strategies tasks in 4.4s
Starting strategies tournament with 100 round robins of 200 turns per pair.
Finished all strategies tasks in 1370.4s
Starting all_strategies tournament with 100 round robins of 200 turns per pair.
Finished all all_strategies tasks in 542.8s
Finished all tournaments in 1917.8s
Be sure to git commit changes to update the docs!

How much RAM do you have?


Reply to this email directly or view it on GitHub
#24 (comment)
.

@marcharper
Copy link
Member

That's the same that I have. Unless you can reproduce it, I vote to close.

@drvinceknight
Copy link
Member Author

If it happens again I'll open it up again :)

On Thu, 25 Feb 2016, 19:23 Marc Harper notifications@github.com wrote:

That's the same that I have. Unless you can reproduce it, I vote to close.


Reply to this email directly or view it on GitHub
#24 (comment)
.

@audiofeature
Copy link

I had the same problem with Matplatlib 1.4.2. Updating to 1.5.0 helped. Well, i don't get the error anymore, but still no images plotted...
See this issue: matplotlib/matplotlib#5209

@drvinceknight
Copy link
Member Author

I found that the problem for me was actually my graphics card not being able to display the images. Are you getting image files at all? Can you try a different image format perhaps @audiofeature? The default is svg, but perhaps png?

@audiofeature
Copy link

I figured that something was wrong with my matplotlib installation and dependencies. On Ubuntu 15.10, i removed matplotlib with pip and reinstalled from the package manager (sudo apt-get install python-matplotlib). This solved my problem and now the figures are being shown again!
However, I get above error message again,

/usr/lib/python2.7/dist-packages/matplotlib/collections.py:571: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):

yet without noticable problem.
In conclusion: the "no figure drawn" problem is a problem of matplotlib installed via pip instead of apt.
the "FutureWarning" seems unrelated to that. (and is rather due to a newer version of numpy)

@audiofeature
Copy link

(Note that i can both visualize plots now and save them to png)

@drvinceknight
Copy link
Member Author

I'm glad you've managed to get things working. I'll look in to that error message!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants