Skip to content

major slowdown in distribution.random() #1824

@hvasbath

Description

@hvasbath

I abserved a major slowdown in using the distributions.random() method to create an initial starting point population for metropolis chains the following way:

# create initial population
vars = inputvars(vars)
self.population = []
for i in range(self.n_chains):
    dummy = pm.Point({v.name: v.random() for v in vars},
                                                            model=model)
    self.population.append(dummy)

On the most recent version it takes: 260.339263s

And on the commit:
commit 1c9adc6
Author: Thomas Wiecki
Date: Tue Nov 29 11:30:52 2016 +0100

MAINT Re-enable trust_input.

it takes 6.925914 s.

I dont know what you changed where, unfortunately I couldnt keep up with all the commits. Have there been any major changes in the random or subsequently related methods?

The particular distribution that is being called there is the Uniform distribution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions