simudyne-pulse 0.7.0.dev4__tar.gz → 0.7.0.dev5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/PKG-INFO +1 -1
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/pyproject.toml +1 -1
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/data.py +21 -12
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/fix.py +7 -5
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/fm.py +71 -43
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/simulation.py +403 -316
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/simulator_gym.py +33 -20
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/validation.py +185 -122
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne_pulse.egg-info/PKG-INFO +1 -1
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/LICENSE +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/README.md +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/setup.cfg +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/__init__.py +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/client.py +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/exceptions.py +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/__init__.py +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/api_keys.py +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/historical.py +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/profile.py +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne_pulse.egg-info/SOURCES.txt +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne_pulse.egg-info/dependency_links.txt +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne_pulse.egg-info/requires.txt +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne_pulse.egg-info/top_level.txt +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/tests/test_new_resources.py +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/tests/test_simulator_gym.py +0 -0
- {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/tests/test_validation.py +0 -0
|
@@ -20,19 +20,28 @@ class DataResource:
|
|
|
20
20
|
All arguments are optional filters; with none passed the whole catalog
|
|
21
21
|
comes back, as before.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
Parameters
|
|
24
|
+
----------
|
|
25
|
+
symbol : str, optional
|
|
26
|
+
Exact symbol, e.g. "700.HK".
|
|
27
|
+
exchange : str, optional
|
|
28
|
+
Exchange protocol, e.g. "hkex_securities".
|
|
29
|
+
provider : str, optional
|
|
30
|
+
Data provider, e.g. "omd" or "bmll".
|
|
31
|
+
date : str, optional
|
|
32
|
+
Calibration date "YYYY-MM-DD". Keeps only instruments
|
|
33
|
+
calibrated on that date, and narrows each instrument's
|
|
34
|
+
available_dates to it.
|
|
35
|
+
q : str, optional
|
|
36
|
+
Case-insensitive substring match over ticker and company name.
|
|
37
|
+
limit : int, optional
|
|
38
|
+
Max instruments to return.
|
|
39
|
+
offset : int, optional
|
|
40
|
+
Instruments to skip (for paging alongside limit).
|
|
33
41
|
|
|
34
|
-
Returns
|
|
35
|
-
|
|
42
|
+
Returns
|
|
43
|
+
-------
|
|
44
|
+
list of instrument dicts, each with available_dates.
|
|
36
45
|
"""
|
|
37
46
|
params = {
|
|
38
47
|
k: v for k, v in {
|
|
@@ -18,13 +18,15 @@ class FixResource:
|
|
|
18
18
|
def usage(self) -> dict:
|
|
19
19
|
"""FIX simulation statistics: what was run over FIX, and how often.
|
|
20
20
|
|
|
21
|
-
Returns
|
|
22
|
-
|
|
21
|
+
Returns
|
|
22
|
+
-------
|
|
23
|
+
dict with ``total_runs``, ``simulated_seconds``, and ``runs`` — one
|
|
23
24
|
entry per distinct configuration, each with its ``symbol``,
|
|
24
25
|
``cal_date``, ``scenario`` and ``runs`` count.
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
Examples
|
|
28
|
+
--------
|
|
29
|
+
>>> usage = client.fix.usage()
|
|
30
|
+
>>> print(f"{usage['total_runs']} FIX runs")
|
|
29
31
|
"""
|
|
30
32
|
return self._client._request("GET", USAGE_PATH)
|
|
@@ -47,8 +47,9 @@ class FmResource:
|
|
|
47
47
|
``min_prompt_rows``, and the ``model_args`` descriptors for the knobs
|
|
48
48
|
run() will accept. Pro tier.
|
|
49
49
|
|
|
50
|
-
Returns
|
|
51
|
-
|
|
50
|
+
Returns
|
|
51
|
+
-------
|
|
52
|
+
dict with a ``models`` list.
|
|
52
53
|
"""
|
|
53
54
|
return self._client._request("GET", MODELS_PATH)
|
|
54
55
|
|
|
@@ -71,19 +72,29 @@ class FmResource:
|
|
|
71
72
|
restricts the result to the (provider, exchange) markets that model's
|
|
72
73
|
``supported_data`` declares — exactly what run() will accept.
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
75
|
+
Parameters
|
|
76
|
+
----------
|
|
77
|
+
model_id : str, optional
|
|
78
|
+
Registered model (see models()). Unknown id -> 404.
|
|
79
|
+
symbol : str, optional
|
|
80
|
+
Exact symbol, e.g. "TSCO" or "700".
|
|
81
|
+
q : str, optional
|
|
82
|
+
Case-insensitive substring match over the symbol.
|
|
83
|
+
provider : str, optional
|
|
84
|
+
Data provider, e.g. "bmll".
|
|
85
|
+
exchange : str, optional
|
|
86
|
+
Protocol, e.g. "lse" or "hkex_securities".
|
|
87
|
+
date : str, optional
|
|
88
|
+
Trading date YYYY-MM-DD; keeps only symbols with data on it,
|
|
89
|
+
and only that date.
|
|
90
|
+
limit : int, default 50
|
|
91
|
+
Max symbols to return (default 50, max 200).
|
|
92
|
+
offset : int, default 0
|
|
93
|
+
Symbols to skip, for paging.
|
|
94
|
+
|
|
95
|
+
Returns
|
|
96
|
+
-------
|
|
97
|
+
dict with ``symbols`` (each with its provider, exchange and dates)
|
|
87
98
|
and ``total``, paged by symbol identity.
|
|
88
99
|
"""
|
|
89
100
|
params = {"limit": limit, "offset": offset}
|
|
@@ -112,28 +123,42 @@ class FmResource:
|
|
|
112
123
|
) -> dict:
|
|
113
124
|
"""Submit a foundation-model inference job. Pro tier.
|
|
114
125
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
126
|
+
Parameters
|
|
127
|
+
----------
|
|
128
|
+
model_id : str
|
|
129
|
+
A model from models().
|
|
130
|
+
symbol : str
|
|
131
|
+
Symbol whose real data becomes the prompt context.
|
|
132
|
+
cal_date : str
|
|
133
|
+
Trading date of the prompt, YYYY-MM-DD.
|
|
134
|
+
provider : str
|
|
135
|
+
Data provider, e.g. "bmll".
|
|
136
|
+
exchange : str
|
|
137
|
+
Exchange protocol, e.g. "hkex_securities".
|
|
138
|
+
duration_minutes : float, optional
|
|
139
|
+
Sim horizon as wall-clock minutes measured from
|
|
140
|
+
the first row of the context. The resulting frame count is
|
|
141
|
+
reported in the run's output rather than requested up front.
|
|
142
|
+
horizon : int, optional
|
|
143
|
+
Raw frame count — the older form; applies only when
|
|
144
|
+
duration_minutes is unset.
|
|
145
|
+
n_runs : int, default 1
|
|
146
|
+
Monte Carlo runs, 1-8 (per-run seeds derived from ``seed``
|
|
147
|
+
exactly as the ABM derives them).
|
|
148
|
+
seed : int, default 42
|
|
149
|
+
Random seed (default 42).
|
|
150
|
+
model_args : dict, optional
|
|
151
|
+
Overrides for the model's declared knobs (see
|
|
152
|
+
models()); unknown or out-of-range keys are rejected with 400.
|
|
153
|
+
device : str, optional
|
|
154
|
+
"cpu" or "gpu"; None uses the model's default.
|
|
155
|
+
exec_algos : list, optional
|
|
156
|
+
Execution algorithms, the ABM's config shape. At most
|
|
157
|
+
one per job; market runs only.
|
|
158
|
+
|
|
159
|
+
Returns
|
|
160
|
+
-------
|
|
161
|
+
dict with job_id, the model version, and the queued sim_ids.
|
|
137
162
|
"""
|
|
138
163
|
payload = {
|
|
139
164
|
"model_id": model_id,
|
|
@@ -165,8 +190,9 @@ class FmResource:
|
|
|
165
190
|
) -> dict:
|
|
166
191
|
"""Start a live streaming session instead of a batch job. Pro tier.
|
|
167
192
|
|
|
168
|
-
Returns
|
|
169
|
-
|
|
193
|
+
Returns
|
|
194
|
+
-------
|
|
195
|
+
dict with ``token`` (used to connect to the live chart),
|
|
170
196
|
``job_id`` and ``model_id``.
|
|
171
197
|
"""
|
|
172
198
|
payload = {"model_id": model_id, "seed": seed}
|
|
@@ -179,8 +205,9 @@ class FmResource:
|
|
|
179
205
|
def job_status(self, job_id: str) -> dict:
|
|
180
206
|
"""Foundation-model job status.
|
|
181
207
|
|
|
182
|
-
Returns
|
|
183
|
-
|
|
208
|
+
Returns
|
|
209
|
+
-------
|
|
210
|
+
dict with job_id, ``status``, ``message``, ``detail``,
|
|
184
211
|
``started_at`` and ``completed_at``. ``status`` is one of queued,
|
|
185
212
|
provisioning, starting, running, complete or failed — only the
|
|
186
213
|
last two are terminal (see TERMINAL_STATUSES), so poll until one
|
|
@@ -193,7 +220,8 @@ class FmResource:
|
|
|
193
220
|
def job_logs(self, job_id: str) -> dict:
|
|
194
221
|
"""Foundation-model job pod logs.
|
|
195
222
|
|
|
196
|
-
Returns
|
|
197
|
-
|
|
223
|
+
Returns
|
|
224
|
+
-------
|
|
225
|
+
dict with ``logs`` — the thing to read when a job failed.
|
|
198
226
|
"""
|
|
199
227
|
return self._client._request("GET", f"{JOBS_PATH}/{job_id}/logs")
|