repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
pyro
pyro/contrib/randomvariable/random_variable.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from typing import Union from torch import Tensor from pyro.distributions import TransformedDistribution from pyro.distributions.transforms import ( AbsTransform, AffineTransform, ExpTransform, PowerTransform, Sig...
176
5,424
pyro
pyro/contrib/forecast/util.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import numbers from functools import singledispatch import torch from torch.distributions import transform_to, transforms import pyro.distributions as dist from pyro.infer.reparam import DiscreteCosineReparam, HaarReparam from pyro.p...
487
16,054
pyro
pyro/contrib/forecast/__init__.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from .evaluate import backtest, eval_crps, eval_mae, eval_rmse from .forecaster import Forecaster, ForecastingModel, HMCForecaster __all__ = [ "Forecaster", "ForecastingModel", "HMCForecaster", "backtest", "eval_cr...
16
360
pyro
pyro/contrib/forecast/forecaster.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import logging from abc import ABCMeta, abstractmethod from contextlib import ExitStack import torch import torch.nn as nn import pyro import pyro.distributions as dist import pyro.poutine as poutine from pyro.infer import MCMC, NUTS...
547
23,353
pyro
pyro/contrib/forecast/evaluate.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import logging import warnings from timeit import default_timer import torch import pyro from pyro.ops.stats import crps_empirical from .forecaster import Forecaster logger = logging.getLogger(__name__) @torch.no_grad() def eval_...
251
8,823
pyro
pyro/contrib/timeseries/__init__.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 """ The :mod:`pyro.contrib.timeseries` module provides a collection of Bayesian time series models useful for forecasting applications. """ from pyro.contrib.timeseries.base import TimeSeriesModel from pyro.contrib.timeseries.gp i...
26
712
pyro
pyro/contrib/timeseries/lgssmgp.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch import torch.nn as nn from torch.distributions import MultivariateNormal, constraints import pyro.distributions as dist from pyro.contrib.timeseries.base import TimeSeriesModel from pyro.nn import PyroParam, pyro_meth...
275
11,260
pyro
pyro/contrib/timeseries/lgssm.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch import torch.nn as nn from torch.distributions import MultivariateNormal, constraints import pyro.distributions as dist from pyro.contrib.timeseries.base import TimeSeriesModel from pyro.nn import PyroParam, pyro_meth...
157
6,439
pyro
pyro/contrib/timeseries/gp.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import math import torch import torch.nn as nn from torch.distributions import MultivariateNormal, constraints import pyro.distributions as dist from pyro.contrib.timeseries.base import TimeSeriesModel from pyro.nn import PyroPar...
569
23,486
pyro
pyro/contrib/timeseries/base.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from pyro.nn import PyroModule, pyro_method class TimeSeriesModel(PyroModule): """ Base class for univariate and multivariate time series models. """ @pyro_method def log_prob(self, targets): """ ...
50
2,211
pyro
pyro/contrib/gp/util.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from pyro.infer import TraceMeanField_ELBO from pyro.infer.util import torch_backward, torch_item def conditional( Xnew, X, kernel, f_loc, f_scale_tril=None, Lff=None, full_cov=False, ...
195
7,152
pyro
pyro/contrib/gp/__init__.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from pyro.contrib.gp import kernels, likelihoods, models, parameterized, util from pyro.contrib.gp.parameterized import Parameterized __all__ = [ "Parameterized", "kernels", "likelihoods", "models", "parameteri...
15
340
pyro
pyro/contrib/gp/parameterized.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import warnings from collections import OrderedDict from functools import partial from torch.distributions import biject_to, constraints from torch.nn import Parameter import pyro import pyro.distributions as dist from pyro.distr...
213
8,052
pyro
pyro/contrib/gp/likelihoods/binary.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch import pyro import pyro.distributions as dist from pyro.contrib.gp.likelihoods.likelihood import Likelihood class Binary(Likelihood): """ Implementation of Binary likelihood, which is used for binary classif...
56
1,988
pyro
pyro/contrib/gp/likelihoods/likelihood.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from pyro.contrib.gp.parameterized import Parameterized class Likelihood(Parameterized): """ Base class for likelihoods used in Gaussian Process. Every inherited class should implement a forward pass which takes ...
29
875
pyro
pyro/contrib/gp/likelihoods/__init__.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from pyro.contrib.gp.likelihoods.binary import Binary from pyro.contrib.gp.likelihoods.gaussian import Gaussian from pyro.contrib.gp.likelihoods.likelihood import Likelihood from pyro.contrib.gp.likelihoods.multi_class import Multi...
30
847
pyro
pyro/contrib/gp/likelihoods/gaussian.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints import pyro import pyro.distributions as dist from pyro.contrib.gp.likelihoods.likelihood import Likelihood from pyro.nn.module import PyroParam class Gaussian(Likelihood)...
49
1,677
pyro
pyro/contrib/gp/likelihoods/multi_class.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch.nn.functional as F import pyro import pyro.distributions as dist from pyro.contrib.gp.likelihoods.likelihood import Likelihood def _softmax(x): return F.softmax(x, dim=-1) class MultiClass(Likelihood): """...
78
2,859
pyro
pyro/contrib/gp/likelihoods/poisson.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch import pyro import pyro.distributions as dist from pyro.contrib.gp.likelihoods.likelihood import Likelihood class Poisson(Likelihood): """ Implementation of Poisson likelihood, which is used for count data. ...
53
1,884
pyro
pyro/contrib/gp/kernels/isotropic.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints from pyro.contrib.gp.kernels.kernel import Kernel from pyro.nn.module import PyroParam def _torch_sqrt(x, eps=1e-12): """ A convenient function to avoid the NaN gr...
185
5,740
pyro
pyro/contrib/gp/kernels/kernel.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import numbers from pyro.contrib.gp.parameterized import Parameterized class Kernel(Parameterized): """ Base class for kernels used in this Gaussian Process module. Every inherited class should implement a :meth:`fo...
260
8,446
pyro
pyro/contrib/gp/kernels/static.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints from pyro.contrib.gp.kernels.kernel import Kernel from pyro.nn.module import PyroParam class Constant(Kernel): r""" Implementation of Constant kernel: :ma...
56
1,536
pyro
pyro/contrib/gp/kernels/coregionalize.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints from torch.nn import Parameter from pyro.contrib.gp.kernels.kernel import Kernel from pyro.nn.module import PyroParam class Coregionalize(Kernel): r""" A kernel fo...
95
3,699
pyro
pyro/contrib/gp/kernels/brownian.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints from pyro.contrib.gp.kernels.kernel import Kernel from pyro.nn.module import PyroParam class Brownian(Kernel): r""" This kernel correponds to a two-sided Brownion ...
51
1,577
pyro
pyro/contrib/gp/kernels/__init__.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from pyro.contrib.gp.kernels.brownian import Brownian from pyro.contrib.gp.kernels.coregionalize import Coregionalize from pyro.contrib.gp.kernels.dot_product import DotProduct, Linear, Polynomial from pyro.contrib.gp.kernels.isotr...
65
1,483
pyro
pyro/contrib/gp/kernels/dot_product.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints from pyro.contrib.gp.kernels.kernel import Kernel from pyro.nn.module import PyroParam class DotProduct(Kernel): r""" Base class for kernels which are functions of...
86
2,646
pyro
pyro/contrib/gp/kernels/periodic.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import math import torch from torch.distributions import constraints from pyro.contrib.gp.kernels.isotropic import Isotropy from pyro.contrib.gp.kernels.kernel import Kernel from pyro.nn.module import PyroParam class Cosine(Iso...
79
2,424
pyro
pyro/contrib/gp/models/vsgp.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints from torch.nn import Parameter import pyro import pyro.distributions as dist import pyro.poutine as poutine from pyro.contrib.gp.models.model import GPModel from pyro.contri...
218
8,417
pyro
pyro/contrib/gp/models/sgpr.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints from torch.nn import Parameter import pyro import pyro.distributions as dist from pyro.contrib.gp.models.model import GPModel from pyro.nn.module import PyroParam, pyro_meth...
278
11,001
pyro
pyro/contrib/gp/models/model.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from pyro.contrib.gp.parameterized import Parameterized def _zero_mean_function(x): return 0 class GPModel(Parameterized): r""" Base class for Gaussian Process models. The core of a Gaussian Proce...
228
9,145
pyro
pyro/contrib/gp/models/__init__.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from pyro.contrib.gp.models.gplvm import GPLVM from pyro.contrib.gp.models.gpr import GPRegression from pyro.contrib.gp.models.model import GPModel from pyro.contrib.gp.models.sgpr import SparseGPRegression from pyro.contrib.gp.mod...
19
546
pyro
pyro/contrib/gp/models/gplvm.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import pyro.distributions as dist from pyro.contrib.gp.parameterized import Parameterized from pyro.nn.module import PyroSample, pyro_method class GPLVM(Parameterized): """ Gaussian Process Latent Variable Model (GPLVM) m...
96
3,897
pyro
pyro/contrib/gp/models/vgp.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints from torch.nn import Parameter import pyro import pyro.distributions as dist from pyro.contrib.gp.models.model import GPModel from pyro.contrib.gp.util import conditional fr...
181
6,859
pyro
pyro/contrib/gp/models/gpr.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch import torch.distributions as torchdist from torch.distributions import constraints import pyro import pyro.distributions as dist from pyro.contrib.gp.models.model import GPModel from pyro.contrib.gp.util import condi...
234
8,932
pyro
pyro/contrib/tracking/distributions.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints import pyro.distributions as dist from pyro.contrib.tracking.extended_kalman_filter import EKFState from pyro.contrib.tracking.measurements import PositionMeasurement from p...
103
3,577
pyro
pyro/contrib/tracking/__init__.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from pyro.contrib.tracking import assignment __all__ = [ "assignment", ]
9
167
pyro
pyro/contrib/tracking/assignment.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import itertools import math import numbers import torch import pyro.distributions as dist from pyro.util import warn_if_nan def _product(factors): result = 1.0 for factor in factors: result = result * factor ...
459
19,243
pyro
pyro/contrib/tracking/dynamic_models.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from abc import ABCMeta, abstractmethod import torch from torch import nn from torch.nn import Parameter import pyro.distributions as dist from pyro.distributions.util import eye_like class DynamicModel(nn.Module, metaclass=ABC...
468
16,560
pyro
pyro/contrib/tracking/measurements.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from abc import ABCMeta, abstractmethod import torch from pyro.distributions.util import eye_like class Measurement(object, metaclass=ABCMeta): """ Gaussian measurement interface. :param mean: mean of measurement d...
154
4,544
pyro
pyro/contrib/tracking/extended_kalman_filter.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions.utils import lazy_property import pyro.distributions as dist from pyro.distributions.util import eye_like class EKFState: """ State-Centric EKF (Extended Kalman Filter) for use with ...
228
7,796
pyro
pyro/contrib/tracking/hashing.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import heapq import itertools from collections import defaultdict from numbers import Number import torch class LSH: """ Implements locality-sensitive hashing for low-dimensional euclidean space. Allows to efficien...
220
7,266
pyro
pyro/contrib/mue/models.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 """ Example MuE observation models. """ import datetime import numpy as np import torch import torch.nn as nn from torch.nn.functional import softplus from torch.optim import Adam from torch.utils.data import DataLoader import pyro ...
873
34,329
pyro
pyro/contrib/mue/missingdatahmm.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import Categorical, OneHotCategorical from pyro.distributions import constraints from pyro.distributions.hmm import _sequential_logmatmulexp from pyro.distributions.torch_distribution import Torch...
318
13,358
pyro
pyro/contrib/mue/dataloaders.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import numpy as np import torch from torch.utils.data import Dataset alphabets = { "amino-acid": np.array( [ "R", "H", "K", "D", "E", "S", ...
198
6,063
pyro
pyro/contrib/mue/statearrangers.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import torch import torch.nn as nn class Profile(nn.Module): """ Profile HMM state arrangement. Parameterizes an HMM according to Equation S40 in [1] (with r_{M+1,j} = 1 and u_{M+1,j} = 0 for j in {0, 1, 2}). For furt...
208
9,017
pyro
pyro/contrib/easyguide/__init__.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from pyro.contrib.easyguide.easyguide import EasyGuide, easy_guide __all__ = [ "EasyGuide", "easy_guide", ]
10
206
pyro
pyro/contrib/easyguide/easyguide.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import re import weakref from abc import ABCMeta, abstractmethod from contextlib import ExitStack import torch from torch.distributions import biject_to import pyro import pyro.distributions as dist import pyro.poutine as poutine...
345
12,922
pyro
pyro/contrib/examples/nextstrain.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import logging import os import subprocess import urllib import torch from .util import _mkdir_p, get_data_directory DATA = get_data_directory(__file__) URL = "https://github.com/pyro-ppl/datasets/raw/master/nextstrain.data.pt.gz" ...
45
1,567
pyro
pyro/contrib/examples/util.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import os import sys import torchvision.datasets as datasets from torch.utils.data import DataLoader from torchvision import transforms class MNIST(datasets.MNIST): mirrors = ["https://github.com/pyro-ppl/datasets/blob/maste...
85
2,479
pyro
pyro/contrib/examples/polyphonic_data_loader.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 """ Data loader logic with two main responsibilities: (i) download raw data and process; this logic is initiated upon import (ii) helper functions for dealing with mini-batches, sequence packing, etc. Data are taken from Boulang...
181
6,924
pyro
pyro/contrib/examples/scanvi_data.py
.py
# Copyright Contributors to the Pyro project. # Copyright (c) 2020, YosefLab. # SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause """ The data preprocessing code in this script is adapted from: https://github.com/YosefLab/scvi-tutorials/blob/50dd3269abfe0c375ec47114f2c20725a016736f/seed_labeling.ipynb """ import m...
234
7,442
pyro
pyro/contrib/examples/finance.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import os import urllib import pandas as pd from pyro.contrib.examples.util import _mkdir_p, get_data_directory DATA = get_data_directory(__file__) # https://finance.yahoo.com/quote/%5EGSPC/history/ CACHE_URL = "https://github.com/...
27
705
pyro
pyro/contrib/examples/bart.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import argparse import bz2 import csv import datetime import logging import multiprocessing import os import subprocess import sys import urllib from functools import partial import torch from pyro.contrib.examples.util import _m...
189
6,858
pyro
pyro/contrib/examples/multi_mnist.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 """ This script generates a dataset similar to the Multi-MNIST dataset described in [1]. [1] Eslami, SM Ali, et al. "Attend, infer, repeat: Fast scene understanding with generative models." Advances in Neural Information Processin...
95
2,920
pyro
pyro/optim/dct_adam.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import math from typing import Callable, Dict, Optional, Tuple import torch from torch.nn.functional import pad from torch.optim.optimizer import Optimizer from pyro.ops.tensor_utils import dct, idct, next_fast_len def _transform_f...
215
7,641
pyro
pyro/optim/adagrad_rmsprop.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from typing import Any, Callable, Optional import torch from torch.optim.optimizer import Optimizer class AdagradRMSProp(Optimizer): """ Implements a mash-up of the Adagrad algorithm and RMSProp. For the precise upda...
88
3,060
pyro
pyro/optim/clipped_adam.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import math from typing import Any, Callable, Optional, Tuple import torch from torch.optim.optimizer import Optimizer class ClippedAdam(Optimizer): """ :param params: iterable of parameters to optimize or dicts defining...
111
4,093
pyro
pyro/optim/optim.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import inspect from typing import ( Any, Callable, Dict, Iterable, List, Optional, Type, Union, ValuesView, ) import torch from torch import Tensor from torch.nn.utils import clip_grad_norm_, cl...
289
10,660
pyro
pyro/optim/__init__.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import pyro.optim.multi # noqa F403 from pyro.optim.horovod import HorovodOptimizer from pyro.optim.lr_scheduler import PyroLRScheduler from pyro.optim.optim import AdagradRMSProp, ClippedAdam, DCTAdam, PyroOptim from pyro.optim.p...
20
594
pyro
pyro/optim/multi.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from typing import Dict, List import torch from pyro.ops.newton import newton_step from pyro.optim.optim import PyroOptim class MultiOptimizer: """ Base class of optimizers that make use of higher-order derivatives. ...
169
6,391
pyro
pyro/optim/horovod.py
.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from typing import List, Union, ValuesView from torch.optim import Optimizer import pyro from .optim import PyroOptim class HorovodOptimizer(PyroOptim): r""" Distributed wrapper for a :class:`~pyro.optim.optim.PyroOptim` o...
56
1,906
pyro
pyro/optim/lr_scheduler.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from typing import Any, Dict, Iterable, List, Optional, Union, ValuesView from torch import Tensor from pyro.optim.optim import PyroOptim class PyroLRScheduler(PyroOptim): """ A wrapper for :class:`~torch.optim.lr_sched...
64
2,351
pyro
pyro/optim/pytorch_optimizers.py
.py
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from pyro.optim import PyroOptim from pyro.optim.lr_scheduler import PyroLRScheduler __all__ = [] # Programmatically load all optimizers from PyTorch. for _name, _Optim in torch.optim.__dict__.items(): if not isi...
61
1,805
pymc
setup.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
82
2,764
pymc
pymc/vartypes.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
44
1,277
pymc
pymc/blocking.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
122
3,579
pymc
pymc/exceptions.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
110
3,140
pymc
pymc/util.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
613
20,765
pymc
pymc/_version.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
697
25,108
pymc
pymc/model_graph.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
909
29,616
pymc
pymc/math.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
552
11,905
pymc
pymc/data.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
362
12,140
pymc
pymc/testing.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
1,435
52,650
pymc
pymc/printing.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
570
19,866
pymc
pymc/_deprecations.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
130
4,668
pymc
pymc/func_utils.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
207
7,869
pymc
pymc/initial_point.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
368
14,535
pymc
pymc/pytensorf.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
1,129
37,470
pymc
pymc/dims/model.py
.py
# Copyright 2025 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
91
3,871
pymc
pymc/dims/__init__.py
.py
# Copyright 2025 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
55
1,933
pymc
pymc/dims/distributions/transforms.py
.py
# Copyright 2025 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
207
6,518
pymc
pymc/dims/distributions/vector.py
.py
# Copyright 2025 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
265
9,691
pymc
pymc/dims/distributions/scalar.py
.py
# Copyright 2025 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
350
11,504
pymc
pymc/dims/distributions/censored.py
.py
# Copyright 2026 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
68
2,942
pymc
pymc/dims/distributions/core.py
.py
# Copyright 2025 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
383
15,258
pymc
pymc/step_methods/metropolis.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
1,258
43,178
pymc
pymc/step_methods/state.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
122
4,975
pymc
pymc/step_methods/arraystep.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
236
8,598
pymc
pymc/step_methods/__init__.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
61
1,838
pymc
pymc/step_methods/slicer.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
217
7,178
pymc
pymc/step_methods/compound.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
427
14,604
pymc
pymc/step_methods/step_sizes.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
106
3,496
pymc
pymc/step_methods/hmc/hmc.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
237
9,275
pymc
pymc/step_methods/hmc/quadpotential.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
960
33,106
pymc
pymc/step_methods/hmc/integration.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
146
4,701
pymc
pymc/step_methods/hmc/nuts.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
490
20,053
pymc
pymc/step_methods/hmc/base_hmc.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
303
10,589
pymc
pymc/plots/__init__.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
40
1,251
pymc
pymc/tuning/starting.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
270
9,802
pymc
pymc/tuning/scaling.py
.py
# Copyright 2024 - present The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
139
3,898