Skip to content

Commit

Permalink
FIX: Trigger condition takes all data
Browse files Browse the repository at this point in the history
  • Loading branch information
maffettone committed Dec 13, 2023
1 parent df285c8 commit a18b920
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions pdf_agents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,7 @@ def get_offline_objects() -> dict:
)

def trigger_condition(self, uid) -> bool:
try:
det_pos = self.exp_catalog[uid].start["more_info"]["Det_1_Z"]["Det_1_Z"]["value"]
except KeyError:
det_pos = self.exp_catalog[uid].start["Det_1_Z"]["Det_1_Z"]["value"]
return det_pos > 4_000.0
return True


class PDFSequentialAgent(PDFBaseAgent, SequentialAgentBase):
Expand Down
1 change: 1 addition & 0 deletions pdf_agents/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def _sample_uncertainty_proxy(self, batch_size=1):
return grid[top_indicies], centers

def ask(self, batch_size=1):
"""Get's a relative position from the agent. Returns a document and hashes the suggestion for redundancy"""
suggestions, centers = self._sample_uncertainty_proxy(batch_size)
kept_suggestions = []
if not isinstance(suggestions, Iterable):
Expand Down

0 comments on commit a18b920

Please sign in to comment.