entropy-lab / entropy

BSD 3-Clause "New" or "Revised" License
30 stars 13 forks source link

Saving matplotlib figures as images assigned to experiments #311

Open urig opened 2 years ago

urig commented 2 years ago

This PR introduces a new feature where users can associate matplotlib figures to experiments and save them in the Entropy DB. The figures are saved as PNG images and can be viewed (but not aggregated) in the Entropy Dashboard app.

This PR also removes the deprecated "Plots API" and associated Python classes. The Plots table in the Entropy DB is not affected.

github-actions[bot] commented 2 years ago

Unit Test Results

332 tests   326 :heavy_check_mark:  54s :stopwatch:     1 suites      6 :zzz:     1 files        0 :x:

Results for commit 29b99b8d.

:recycle: This comment has been updated with latest results.

galwiner commented 2 years ago

great! I think that for this feature to be complimentary to add_figure we need to make add_figure() (in execution.py, row 62) to be able to take matplotlib figures OR add a different method in the same place that takes such figures. @urig what do you say?

urig commented 2 years ago

You're absolutely right that we need to augment EntropyContext to allow saving matplolib figures. I'm inclined towards a separate method so as to be consistent with lower level APIs but getting a single method to handle both is also a good option. Let me know which you prefer.

galwiner commented 2 years ago

@urig let's have a single method handling both. Sorry it took a while to reply, I didn't get notification you answered