Skip to content

Commit

Permalink
Clean ups (#315)
Browse files Browse the repository at this point in the history
* Clean ups

* pylint fix

* formatting fix

* reformat

Co-authored-by: Rasul Karimov <[email protected]>
  • Loading branch information
junpenglao and Rasul Karimov authored Aug 28, 2020
1 parent 0f16a47 commit 42642ef
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 372 deletions.
3 changes: 1 addition & 2 deletions pymc4/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
BoundedContinuousDistribution,
)
from pymc4.distributions import transforms
from .half_student_t import HalfStudentT as TFPHalfStudentT


__all__ = [
Expand Down Expand Up @@ -297,7 +296,7 @@ def __init__(self, name, df, scale, **kwargs):
def _init_distribution(conditions, **kwargs):
scale = conditions["scale"]
df = conditions["df"]
return TFPHalfStudentT(df=df, loc=0, scale=scale, **kwargs)
return tfd.HalfStudentT(df=df, loc=0, scale=scale, **kwargs)


class Beta(UnitContinuousDistribution):
Expand Down
311 changes: 0 additions & 311 deletions pymc4/distributions/half_student_t.py

This file was deleted.

3 changes: 1 addition & 2 deletions pymc4/flow/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import tensorflow as tf

import pymc4 as pm
from pymc4 import coroutine_model
from pymc4 import scopes
from pymc4 import utils
Expand Down Expand Up @@ -351,7 +350,7 @@ def validate_return_object(self, return_object: Any):
)

def validate_return_value(self, return_value: Any):
pm.utils.map_nested(self.validate_return_object, return_value)
tf.nest.map_structure(self.validate_return_object, return_value)

def evaluate_model(
self,
Expand Down
Loading

0 comments on commit 42642ef

Please sign in to comment.