Skip to content

Commit

Permalink
fix: return report dict
Browse files Browse the repository at this point in the history
  • Loading branch information
maffettone committed Apr 13, 2024
1 parent ec83d18 commit 63992dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pdf_agents/scientific_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(
bounds: torch.Tensor,
device: torch.device = None,
num_restarts: int = 10,
raw_samples: int = 20,
raw_samples: int = 128,
observable_distance_function: Optional[Callable] = None,
ucb_beta=1.0,
**kwargs
Expand Down Expand Up @@ -122,7 +122,7 @@ def tell(self, x, y):

def report(self):
value = self._value_function(np.array(self.independent_cache), np.array(self.observable_cache))
dict(latest_data=self.tell_cache[-1], cache_len=len(self.independent_cache), latest_value=value[-1])
return dict(latest_data=self.tell_cache[-1], cache_len=len(self.independent_cache), latest_value=value[-1])

def ask(self, batch_size: int = 1):
value = self._value_function(np.array(self.independent_cache), np.array(self.observable_cache))
Expand Down

0 comments on commit 63992dd

Please sign in to comment.