Skip to content

Commit

Permalink
fix incorrect array split
Browse files Browse the repository at this point in the history
  • Loading branch information
antoine-galataud committed Jun 3, 2024
1 parent a968796 commit b03a8f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hopes/policy/policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def log_probabilities(self, obs: np.ndarray) -> np.ndarray:
"""Compute the log-probabilities of the actions under the HTTP policy for a given set of
observations."""
all_log_probs = []
for chunk in np.array_split(obs, len(obs) // self.batch_size):
for chunk in np.array_split(obs, self.batch_size):
# Send HTTP request to server
response = requests.post(
f"http{'s' if self.ssl else ''}://{self.host}:{self.port}/{self.path}",
Expand Down

0 comments on commit b03a8f8

Please sign in to comment.