diff --git a/.gitignore b/.gitignore index 6a4dae1..b52fc4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store __pycache__ +*.egg-info diff --git a/holo/test_functions/closed_form/_ehrlich.py b/holo/test_functions/closed_form/_ehrlich.py index cc5d952..5197891 100644 --- a/holo/test_functions/closed_form/_ehrlich.py +++ b/holo/test_functions/closed_form/_ehrlich.py @@ -42,7 +42,11 @@ def __init__( self.initial_dist = torch.ones(num_states) / num_states bandwidth = int(num_states * 0.4) self.transition_matrix = sample_sparse_ergodic_transition_matrix( - num_states, bandwidth, softmax_temp=0.5, generator=self._generator, repeats_always_possible=True + num_states, + bandwidth, + softmax_temp=0.5, + generator=self._generator, + repeats_always_possible=True, ) self.stationary_dist = dmp_stationary_dist(self.transition_matrix) @@ -129,13 +133,11 @@ def optimal_solution(self): ] ) index = spacing.cumsum(0).tolist() - print(index) motif = motif.tolist() for idx in range(index[-1] + 1): if idx in index: next_state = motif.pop(0) soln[position] = next_state - # print(position) position += 1 # fill in remaining states with last state of last motif soln[position:] = soln[position - 1] @@ -143,8 +145,6 @@ def optimal_solution(self): # check optimal value optimal_value = self.evaluate_true(soln.unsqueeze(0)) if not optimal_value == self._optimal_value: - print(soln) - print(optimal_value) raise RuntimeError("optimal value not achieved by optimal solution.") return soln diff --git a/holo/test_functions/elemental/_discrete_markov_process.py b/holo/test_functions/elemental/_discrete_markov_process.py index f21d90c..c0ef939 100644 --- a/holo/test_functions/elemental/_discrete_markov_process.py +++ b/holo/test_functions/elemental/_discrete_markov_process.py @@ -103,9 +103,7 @@ def sample_sparse_ergodic_transition_matrix( generator = torch.Generator() randn_matrix = torch.randn(num_states, num_states, generator=generator) - print(randn_matrix) dense_transition_matrix = (randn_matrix / softmax_temp).softmax(dim=-1) - print(dense_transition_matrix) # construct mask as banded matrix mask = banded_square_matrix(num_states, bandwidth).bool() @@ -116,8 +114,6 @@ def sample_sparse_ergodic_transition_matrix( # set diagonal entries of mask to True mask = mask | torch.eye(num_states, dtype=torch.bool) - print(mask) - transition_matrix = torch.where(mask, dense_transition_matrix, torch.zeros_like(dense_transition_matrix)) transition_matrix = transition_matrix / transition_matrix.sum(dim=-1, keepdim=True)