Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
530 views
in Technique[技术] by (71.8m points)

python - pymc3 very slow at first run in a fresh environment

Whenever I run pm.sample() for the first time in a fresh environment, it takes a lot of time to execute, even for very simple models. Running the exact same code again is multiple times faster. In my use case, I need it to be fast even in the first run.

The issue is not the sampling itself, but rather in what pymc3 is doing behind the hood before it even assigns the sampler.

Is there anything I could cache manually before running pm.sample() to make it faster? I’ve tried running the model as a Python script right after installing all the packages in a fresh environment, but it did not help.

question from:https://stackoverflow.com/questions/65910973/pymc3-very-slow-at-first-run-in-a-fresh-environment

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...