tensorflow / tensorflow/probability

Importing tensorflow_probability.distributions

Open
#706 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
4.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

I usually first try this import that fails:

import tensorflow_probability.distributions as tfd

Then I try the second one that works

from tensorflow_probability import distributions as tfd

Is there a reason against including distributions in the parent package such that both imports work?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the tensorflow_probability package initialization and the two import forms shown in the issue. Check whether both imports can resolve to the same distributions module, then verify that import tensorflow_probability.distributions as tfd works without breaking the existing from tensorflow_probability import distributions as tfd form.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.