-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy path__init__.py
More file actions
76 lines (67 loc) · 2.06 KB
/
Copy path__init__.py
File metadata and controls
76 lines (67 loc) · 2.06 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
"""HUD eval: the v6 execution surface.
Define a :class:`Task` (a row pointing at its env), group many into a
:class:`Taskset`, and run agents against live :class:`~hud.eval.Run`s.
:func:`rollout` is the execution atom (one agent, one task, fully recorded);
``Task.run`` and ``Taskset.run`` are the scheduler over it, both returning a
:class:`Job` — the platform receipt. There are no standalone traces: every
run reports under a job.
This is the top layer: eval composes :mod:`hud.environment` and
:mod:`hud.agents`, which never import each other and never import eval back —
agents see eval only through the ``Run`` handle they are driven with. (Sole
exception: calling an ``@env.template`` declaration constructs the eval ``Task``
row.)
Placement is passed at execution time (see :mod:`.runtime`): ``LocalRuntime`` a
local source, ``DockerRuntime`` an image, ``Runtime(url)`` an env served
elsewhere, ``HUDRuntime`` a HUD runtime tunnel, or ``HostedRuntime`` to run the
whole rollout remotely on the platform::
from hud.eval import LocalRuntime, Taskset
job = await my_task(a=1).run(agent, runtime=LocalRuntime("env.py"))
job = await Taskset("demo", [my_task(d) for d in range(5)]).run(
agent, runtime=LocalRuntime("env.py"), group=8
)
"""
from __future__ import annotations
from hud.types import Trace
from .chat import Chat
from .job import Job
from .run import Grade, Run, rollout
from .runtime import (
DaytonaRuntime,
DockerRuntime,
HostedRuntime,
HUDRuntime,
LocalRuntime,
ModalRuntime,
Provider,
Runtime,
RuntimeConfig,
RuntimeGPU,
RuntimeLimits,
RuntimeResources,
)
from .sync import SyncPlan
from .task import Task
from .taskset import Taskset
__all__ = [
"Chat",
"DaytonaRuntime",
"DockerRuntime",
"Grade",
"HUDRuntime",
"HostedRuntime",
"Job",
"LocalRuntime",
"ModalRuntime",
"Provider",
"Run",
"Runtime",
"RuntimeConfig",
"RuntimeGPU",
"RuntimeLimits",
"RuntimeResources",
"SyncPlan",
"Task",
"Taskset",
"Trace",
"rollout",
]