Skip to content

Commit 43aab17

Browse files
csutertensorflower-gardener
authored andcommitted
s/master/main/ in many places in TFP code base, mostly URLs
PiperOrigin-RevId: 382532108
1 parent 88ebe3c commit 43aab17

File tree

65 files changed

+209
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+209
-208
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ minor, then feel free to make them without discussion.
1616
Want to contribute but not sure of what? Here are a few suggestions:
1717

1818
1. Add a new example or tutorial. Located in [`examples/`](
19-
https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples),
19+
https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples),
2020
these are a great way to familiarize yourself and others with TFP tools.
2121

2222
2. Solve an [existing issue](https://github.com/tensorflow/probability/issues).
@@ -51,7 +51,7 @@ your change.
5151
See the [TensorFlow Probability style guide](STYLE_GUIDE.md). Running `pylint`
5252
detects many (but certainly not all) style issues. TensorFlow Probability
5353
follows a custom [pylint
54-
configuration](https://github.com/tensorflow/probability/blob/master/testing/pylintrc).
54+
configuration](https://github.com/tensorflow/probability/blob/main/testing/pylintrc).
5555

5656
## Unit tests
5757

@@ -123,7 +123,7 @@ you, which also does some sanity checks on the environtment:
123123
```
124124

125125
See the
126-
[header comments in that script](https://github.com/tensorflow/probability/blob/master/testing/install_test_dependencies.sh)
126+
[header comments in that script](https://github.com/tensorflow/probability/blob/main/testing/install_test_dependencies.sh)
127127
for more details.
128128

129129
### Additional considerations

PRNGS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Import: `from tensorflow_probability.python.internal import samplers`
211211
### Usage
212212

213213
As a first, relatively simple example, let's take a look at usage by
214-
[`beta_binomial.py`](https://cs.opensource.google/tensorflow/probability/+/master:tensorflow_probability/python/distributions/beta_binomial.py;l=241?q=beta_binomial%20sample_n).
214+
[`beta_binomial.py`](https://cs.opensource.google/tensorflow/probability/+/main:tensorflow_probability/python/distributions/beta_binomial.py;l=241?q=beta_binomial%20sample_n).
215215
In the `_sample_n` function for `BetaBinomial`, we can see that the seed is
216216
split three ways. Typically, we give each subsidiary seed a local variable name
217217
reflecting the downstream usage. In this case, two seeds are passed to a
@@ -235,7 +235,7 @@ def _sample_n(self, n, seed=None):
235235
```
236236

237237
As a more complex example of seed splitting in a loop context, we can look at
238-
[`hidden_markov_model.py`](https://cs.opensource.google/tensorflow/probability/+/master:tensorflow_probability/python/distributions/hidden_markov_model.py;l=283).
238+
[`hidden_markov_model.py`](https://cs.opensource.google/tensorflow/probability/+/main:tensorflow_probability/python/distributions/hidden_markov_model.py;l=283).
239239
Here we see an initial split into 3 parts:
240240

241241
```python
@@ -269,4 +269,4 @@ seed splitting and keep underlying `TransitionKernel` subclasses relatively
269269
simple. `TransitionKernel` takes a `seed` argument to `one_step` and can use
270270
this to drive randomness, in some cases splitting and passing a separate seed to
271271
inner kernels. For example, see `tfp.mcmc.MetropolisHastings`
272-
[`one_step`](https://cs.opensource.google/tensorflow/probability/+/master:tensorflow_probability/python/mcmc/metropolis_hastings.py;l=203?q=MetropolisHastings&ss=tensorflow%2Fprobability).
272+
[`one_step`](https://cs.opensource.google/tensorflow/probability/+/main:tensorflow_probability/python/mcmc/metropolis_hastings.py;l=203?q=MetropolisHastings&ss=tensorflow%2Fprobability).

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ in core TF.
1818

1919
__Layer 1: Statistical Building Blocks__
2020

21-
* Distributions ([`tfp.distributions`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/distributions)):
21+
* Distributions ([`tfp.distributions`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/distributions)):
2222
A large collection of probability
2323
distributions and related statistics with batch and
2424
[broadcasting](https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html)
2525
semantics. See the
26-
[Distributions Tutorial](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/TensorFlow_Distributions_Tutorial.ipynb).
27-
* Bijectors ([`tfp.bijectors`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/bijectors)):
26+
[Distributions Tutorial](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/TensorFlow_Distributions_Tutorial.ipynb).
27+
* Bijectors ([`tfp.bijectors`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/bijectors)):
2828
Reversible and composable transformations of random variables. Bijectors
2929
provide a rich class of transformed distributions, from classical examples
3030
like the
@@ -34,71 +34,71 @@ __Layer 1: Statistical Building Blocks__
3434

3535
__Layer 2: Model Building__
3636

37-
* Joint Distributions (e.g., [`tfp.distributions.JointDistributionSequential`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/distributions/joint_distribution_sequential.py)):
37+
* Joint Distributions (e.g., [`tfp.distributions.JointDistributionSequential`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/distributions/joint_distribution_sequential.py)):
3838
Joint distributions over one or more possibly-interdependent distributions.
3939
For an introduction to modeling with TFP's `JointDistribution`s, check out
40-
[this colab](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Modeling_with_JointDistribution.ipynb)
41-
* Probabilistic Layers ([`tfp.layers`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/layers)):
40+
[this colab](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Modeling_with_JointDistribution.ipynb)
41+
* Probabilistic Layers ([`tfp.layers`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/layers)):
4242
Neural network layers with uncertainty over the functions they represent,
4343
extending TensorFlow Layers.
4444

4545
__Layer 3: Probabilistic Inference__
4646

47-
* Markov chain Monte Carlo ([`tfp.mcmc`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/mcmc)):
47+
* Markov chain Monte Carlo ([`tfp.mcmc`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/mcmc)):
4848
Algorithms for approximating integrals via sampling. Includes
4949
[Hamiltonian Monte Carlo](https://en.wikipedia.org/wiki/Hamiltonian_Monte_Carlo),
5050
random-walk Metropolis-Hastings, and the ability to build custom transition
5151
kernels.
52-
* Variational Inference ([`tfp.vi`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/vi)):
52+
* Variational Inference ([`tfp.vi`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/vi)):
5353
Algorithms for approximating integrals via optimization.
54-
* Optimizers ([`tfp.optimizer`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/optimizer)):
54+
* Optimizers ([`tfp.optimizer`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/optimizer)):
5555
Stochastic optimization methods, extending TensorFlow Optimizers. Includes
5656
[Stochastic Gradient Langevin Dynamics](http://www.icml-2011.org/papers/398_icmlpaper.pdf).
57-
* Monte Carlo ([`tfp.monte_carlo`](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/python/monte_carlo)):
57+
* Monte Carlo ([`tfp.monte_carlo`](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/python/monte_carlo)):
5858
Tools for computing Monte Carlo expectations.
5959

6060
TensorFlow Probability is under active development. Interfaces may change at any
6161
time.
6262

6363
## Examples
6464

65-
See [`tensorflow_probability/examples/`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/)
65+
See [`tensorflow_probability/examples/`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/)
6666
for end-to-end examples. It includes tutorial notebooks such as:
6767

68-
* [Linear Mixed Effects Models](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Linear_Mixed_Effects_Models.ipynb).
68+
* [Linear Mixed Effects Models](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Linear_Mixed_Effects_Models.ipynb).
6969
A hierarchical linear model for sharing statistical strength across examples.
70-
* [Eight Schools](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Eight_Schools.ipynb).
70+
* [Eight Schools](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Eight_Schools.ipynb).
7171
A hierarchical normal model for exchangeable treatment effects.
72-
* [Hierarchical Linear Models](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/HLM_TFP_R_Stan.ipynb).
72+
* [Hierarchical Linear Models](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/HLM_TFP_R_Stan.ipynb).
7373
Hierarchical linear models compared among TensorFlow Probability, R, and Stan.
74-
* [Bayesian Gaussian Mixture Models](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Bayesian_Gaussian_Mixture_Model.ipynb).
74+
* [Bayesian Gaussian Mixture Models](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Bayesian_Gaussian_Mixture_Model.ipynb).
7575
Clustering with a probabilistic generative model.
76-
* [Probabilistic Principal Components Analysis](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Probabilistic_PCA.ipynb).
76+
* [Probabilistic Principal Components Analysis](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Probabilistic_PCA.ipynb).
7777
Dimensionality reduction with latent variables.
78-
* [Gaussian Copulas](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Gaussian_Copula.ipynb).
78+
* [Gaussian Copulas](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Gaussian_Copula.ipynb).
7979
Probability distributions for capturing dependence across random variables.
80-
* [TensorFlow Distributions: A Gentle Introduction](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/TensorFlow_Distributions_Tutorial.ipynb).
80+
* [TensorFlow Distributions: A Gentle Introduction](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/TensorFlow_Distributions_Tutorial.ipynb).
8181
Introduction to TensorFlow Distributions.
82-
* [Understanding TensorFlow Distributions Shapes](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Understanding_TensorFlow_Distributions_Shapes.ipynb).
82+
* [Understanding TensorFlow Distributions Shapes](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Understanding_TensorFlow_Distributions_Shapes.ipynb).
8383
How to distinguish between samples, batches, and events for arbitrarily shaped
8484
probabilistic computations.
85-
* [TensorFlow Probability Case Study: Covariance Estimation](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/TensorFlow_Probability_Case_Study_Covariance_Estimation.ipynb).
85+
* [TensorFlow Probability Case Study: Covariance Estimation](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/TensorFlow_Probability_Case_Study_Covariance_Estimation.ipynb).
8686
A user's case study in applying TensorFlow Probability to estimate covariances.
8787

8888
It also includes example scripts such as:
8989

90-
* [Variational Autoencoders](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/vae.py).
90+
* [Variational Autoencoders](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/vae.py).
9191
Representation learning with a latent code and variational inference.
92-
* [Vector-Quantized Autoencoder](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/vq_vae.py).
92+
* [Vector-Quantized Autoencoder](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/vq_vae.py).
9393
Discrete representation learning with vector quantization.
94-
* [Disentangled Sequential Variational Autoencoder](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/disentangled_vae.py)
94+
* [Disentangled Sequential Variational Autoencoder](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/disentangled_vae.py)
9595
Disentangled representation learning over sequences with variational inference.
9696
* Latent Dirichlet Allocation
97-
([Distributions version](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/latent_dirichlet_allocation_distributions.py),
97+
([Distributions version](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/latent_dirichlet_allocation_distributions.py),
9898
Mixed membership modeling for capturing topics in a document.
99-
* [Bayesian Neural Networks](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/bayesian_neural_network.py).
99+
* [Bayesian Neural Networks](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/bayesian_neural_network.py).
100100
Neural networks with uncertainty over their weights.
101-
* [Bayesian Logistic Regression](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/logistic_regression.py).
101+
* [Bayesian Logistic Regression](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/logistic_regression.py).
102102
Bayesian inference for binary classification.
103103

104104
## Installation

0 commit comments

Comments
 (0)