Skip to content

main thread not in main loop error when RV pipeline plots sample train/validation images #1777

Answered by lewfish
aerotractjack asked this question in Q&A
Discussion options

You must be logged in to vote

Putting

import matplotlib as plt
plt.use("agg")

at the start of your config file isn't going to work as expected if you are using the local runner (by passing local to rastervision run). This is because the local runner starts a separate Python processes for each command. To get the effect you are looking for you will need to use the inprocess runner by passing inprocess. This will run everything within the same Python process that is interpreting the config file and running plt.use("agg").

That might be a quick fix, but I still wouldn't expect this to occur at all.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@aerotractjack
Comment options

Answer selected by aerotractjack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants