File size: 1,012 Bytes
2f684d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

"""
Data models for the Taskmanager Environment.

The taskmanager environment is a simple test environment that echoes back messages.
"""

from openenv.core.env_server.types import Action, Observation
from pydantic import Field
from typing import List, Dict


class TaskmanagerAction(Action):
    """Action for the Taskmanager environment - just a message to echo."""

    task_id: int = Field(..., description="Task to execute")


class TaskmanagerObservation(Observation):
    """Observation for Task Scheduling Environment"""

    tasks: List[Dict] = Field(
        default_factory=list, description="List of remaining tickets"
    )
    current_time: int = Field(default=0, description="Current time in the schedule")
    steps_left: int = Field(default=0, description="Steps remaining in episode")