Spaces:
Sleeping
Sleeping
Download models.py from brand0nwalls/NetOps: direct link, hf CLI and curl.
- Browser
- Download file 979 Bytes
-
https://huggingface.co/spaces/brand0nwalls/NetOps/resolve/main/models.py
- Command line
-
hf download hf://spaces/brand0nwalls/NetOps/models.py
-
curl -L -o models.py https://huggingface.co/spaces/brand0nwalls/NetOps/resolve/main/models.py
979 Bytes
| from pydantic import Field | |
| from openenv.core.env_server.types import Action, Observation, State | |
| class NetOpsAction(Action): | |
| command: str = Field(..., min_length=1, description="Action command name") | |
| args: dict = Field(default_factory=dict, description="Command arguments") | |
| class NetOpsObservation(Observation): | |
| alert: str = Field(default="", description="Incident alert text") | |
| observation: str = Field(default="", description="Result of last action") | |
| available_actions: list[str] = Field(default_factory=list, description="Valid action commands") | |
| steps_taken: int = Field(default=0, ge=0) | |
| max_steps: int = Field(default=15) | |
| difficulty: str = Field(default="easy") | |
| class NetOpsState(State): | |
| fault_type: str = "" | |
| component: str = "" | |
| difficulty: str = "easy" | |
| is_resolved: bool = False | |
| cumulative_reward: float = 0.0 | |
| health_score: float = 1.0 | |
| diagnosis_submitted: bool = False | |
| remediation_attempted: bool = False | |