Spaces:
Sleeping
Sleeping
Upload productivity_env/models.py with huggingface_hub
Browse files- productivity_env/models.py +22 -4
productivity_env/models.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
-
from
|
| 2 |
-
from typing import Optional
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
| 5 |
time_of_day_hour: float
|
| 6 |
stress_level: float
|
| 7 |
distraction_events: int
|
|
@@ -14,6 +16,22 @@ class ProductivityObservation(BaseModel):
|
|
| 14 |
deadline_days_remaining: float
|
| 15 |
failure_probability: float
|
| 16 |
|
| 17 |
-
class ProductivityAction(
|
| 18 |
action_type: str # e.g., "WAIT", "SEND_NUDGE", "FORCE_BREAK", "BLOCK_SOCIAL_MEDIA"
|
| 19 |
message: Optional[str] = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Optional
|
|
|
|
| 2 |
|
| 3 |
+
from openenv.core import Action, Observation, State
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
class ProductivityObservation(Observation):
|
| 7 |
time_of_day_hour: float
|
| 8 |
stress_level: float
|
| 9 |
distraction_events: int
|
|
|
|
| 16 |
deadline_days_remaining: float
|
| 17 |
failure_probability: float
|
| 18 |
|
| 19 |
+
class ProductivityAction(Action):
|
| 20 |
action_type: str # e.g., "WAIT", "SEND_NUDGE", "FORCE_BREAK", "BLOCK_SOCIAL_MEDIA"
|
| 21 |
message: Optional[str] = None
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class ProductivityState(State):
|
| 25 |
+
task_name: str
|
| 26 |
+
current_task: str
|
| 27 |
+
deadline_days_remaining: float
|
| 28 |
+
stress_level: float
|
| 29 |
+
motivation_level: float
|
| 30 |
+
distraction_events: int
|
| 31 |
+
focus_score: float
|
| 32 |
+
failure_probability: float
|
| 33 |
+
session_duration_minutes: int
|
| 34 |
+
break_count: int
|
| 35 |
+
social_media_minutes: int
|
| 36 |
+
time_of_day_hour: float
|
| 37 |
+
raw_state: dict[str, Any]
|