Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
evangriffiths committed Feb 14, 2024
1 parent 8d31e96 commit d1b8775
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions examples/monitor/monitor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from datetime import datetime, timedelta
from zoneinfo import ZoneInfo
import streamlit as st

from prediction_market_agent_tooling.markets.manifold import get_authenticated_user
from prediction_market_agent_tooling.monitor.markets.manifold import (
Expand All @@ -14,4 +15,5 @@
start_time=start_time.astimezone(ZoneInfo("UTC")),
manifold_user_id=get_authenticated_user().id,
)
st.set_page_config(layout="wide") # Best viewed with a wide screen
monitor_agent(agent)
4 changes: 1 addition & 3 deletions prediction_market_agent_tooling/monitor/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
import pandas as pd
import streamlit as st
import typing as t
from zoneinfo import ZoneInfo

from prediction_market_agent_tooling.markets.data_models import ResolvedBet


class DeployedAgent(BaseModel):
name: str
start_time: datetime = datetime.now().astimezone(tz=ZoneInfo("UTC"))
start_time: datetime = datetime.utcnow()
end_time: t.Optional[datetime] = None

def get_resolved_bets(self) -> list[ResolvedBet]:
Expand All @@ -31,7 +30,6 @@ def monitor_agent(agent: DeployedAgent) -> None:
}
bets_df = pd.DataFrame(bets_info).sort_values(by="Resolved Time")

st.set_page_config(layout="wide")
st.title(f"Monitoring Agent: '{agent.name}'")

# Metrics
Expand Down

0 comments on commit d1b8775

Please sign in to comment.