Skip to content

Commit

Permalink
another fx
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii committed Nov 6, 2024
1 parent e8d00ec commit 1c8028f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion prediction_market_agent_tooling/jobs/jobs_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def get_job(id: str) -> "JobAgentMarket":
"""Get a single job by its id."""

@abstractmethod
def submit_job_result(self, max_bond: float, result: str) -> ProcessedTradedMarket:
def submit_job_result(
self, agent_name: str, max_bond: float, result: str
) -> ProcessedTradedMarket:
"""Submit the completed result for this job."""

def to_simple_job(self, max_bond: float) -> SimpleJob:
Expand Down
6 changes: 4 additions & 2 deletions prediction_market_agent_tooling/jobs/omen/omen_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ def get_job(id: str) -> "OmenJobAgentMarket":
OmenJobAgentMarket.get_binary_market(id=id)
)

def submit_job_result(self, max_bond: float, result: str) -> ProcessedTradedMarket:
def submit_job_result(
self, agent_name: str, max_bond: float, result: str
) -> ProcessedTradedMarket:
if not APIKeys().enable_ipfs_upload:
raise RuntimeError(
f"ENABLE_IPFS_UPLOAD must be set to True to upload job results."
Expand All @@ -86,7 +88,7 @@ def submit_job_result(self, max_bond: float, result: str) -> ProcessedTradedMark
)

keys = APIKeys()
self.store_trades(processed_traded_market, keys)
self.store_trades(processed_traded_market, keys, agent_name)

return processed_traded_market

Expand Down

0 comments on commit 1c8028f

Please sign in to comment.