Skip to content

Move new samplers out of experimental module and put old samplers at legacy module #694

@chaozg

Description

@chaozg

General description of task

Move the "new" samplers at cuqi.experimental.mcmc to cuqi.sampler and the "old" samplers at cuqi.sampler to cuqi.legacy.sampler.

Definition of Done (Feature/change)

  • Move samplers at sampler, including all subsamplers and gibbs, to legacy.sampler.
  • Move samplers at experimental.mcmc to new module 'sampler' and keep it under cuqi.
  • Update all demos under dev, howto, and tutorial
  • Update unit tests
  • Update the logic in BayesianProblem and use the new samplers by default with BayesianProblem
    • Note: From now on, the default samplers of BayesianProblem are changed, from old/legacy to new.
    • We can still use old/legacy samplers with BayesianProblem by providing a flag legacy=True
  • Fix problems in unit tests related to the above change to BayesianProblem
  • In the main legacy.sampler.Sampler class, we add a warning once the user creates an instance of the old samplers (including legacy.sampler.Gibbs, which doesn't inherit from legacy.sampler.Sampler)
  • Rename test file test_sampler.py -> test_legacy_sampler.py
  • _recommender.py is moved to the same level as the new sampler files, i.e., sampler/_recommender.py. It is decided to leave it at experimental after group discussion.

Definition of Done (Mandatory)

  • Documentation added (docstrings on all public methods/classes)
  • Unit tests added/updated (and passing!)
  • Code reviewed and approved by 2 CUQI-maintainers
  • Online documentation is rendered correctly (esp. math)

Metadata

Metadata

Assignees

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