Skip to content

TST: tests for random variables #52

Closed
@eigenfoo

Description

@eigenfoo

I was just thinking about the test suite here - I think it makes sense to dynamically generate tests for each random variable to:

  1. Instantiate it
  2. .sample from it
  3. Evaluate its .log_prob
  4. Convert it as_tensor

In other words, we should try to pull a similar trick to how we dynamically wrap the tfp distributions as random variables, for the tests. I think has several advantages, (e.g. the tests write themselves!), but I'm unsure if this is best practice with tests... Any thoughts?

cc @canyon289 depending on how far you want to take #49, I'd be happy to do a follow up PR for tests.

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