corethink 1.0.3__tar.gz → 1.0.4__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.
- {corethink-1.0.3 → corethink-1.0.4}/PKG-INFO +1 -1
- {corethink-1.0.3 → corethink-1.0.4}/pyproject.toml +1 -1
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/_version.py +1 -1
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/train.py +13 -1
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink.egg-info/PKG-INFO +1 -1
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_train.py +22 -0
- {corethink-1.0.3 → corethink-1.0.4}/README.md +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/setup.cfg +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/__init__.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/__main__.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/account.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/cli.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/client.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/__init__.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/admin.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/api.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/archive.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/auth.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/billing.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/capture.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/connection.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/endpoint.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/env.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/hub.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/library.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/models.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/commands/workspace.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/config.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/context.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/env_template.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/environment_http_store.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/experiment_cli.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/hosted_profiles.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/hosted_rl.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/hosted_rl_archive.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/hosted_rl_attribution.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/hosted_rl_billing.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/hosted_rl_state.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/jobs_cli.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/main.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/output.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/py.typed +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/rl_cli.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/rl_inspect.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/rl_playground.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/rl_reassessment.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/rl_settings.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/sdk.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink/settings.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink.egg-info/SOURCES.txt +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink.egg-info/dependency_links.txt +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink.egg-info/entry_points.txt +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink.egg-info/requires.txt +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/src/corethink.egg-info/top_level.txt +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_admin.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_archive.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_auth.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_billing.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_capture.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_connection.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_endpoint.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_env.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_hub.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_library.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_main_json.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_models.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_version.py +0 -0
- {corethink-1.0.3 → corethink-1.0.4}/tests/test_workspace.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "corethink"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.4"
|
|
8
8
|
description = "The CoreThink Workbench from your terminal: environments, training, endpoints and more."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -1081,6 +1081,8 @@ def estimate_lines(estimate: dict[str, Any] | None, budget: float | None = None)
|
|
|
1081
1081
|
text += " The limit is lower; it may stop early."
|
|
1082
1082
|
elif estimate.get("costUsd") is None and first and (first.get("lowUsd") or 0) > budget:
|
|
1083
1083
|
text += " The limit is below the low end; it will likely stop early."
|
|
1084
|
+
elif estimate.get("costUsd") is None and first and (first.get("typicalUsd") or 0) > budget:
|
|
1085
|
+
text += " The limit is below the likely cost; it may stop early."
|
|
1084
1086
|
if estimate.get("waiting"):
|
|
1085
1087
|
text += f" {plural(estimate['waiting'], 'run')} waiting ahead."
|
|
1086
1088
|
lines = [text]
|
|
@@ -1212,6 +1214,16 @@ def _estimate(plan: Plan) -> dict[str, Any] | None:
|
|
|
1212
1214
|
return None
|
|
1213
1215
|
|
|
1214
1216
|
|
|
1217
|
+
def eval_tasks(plan: Plan) -> int:
|
|
1218
|
+
"""Tasks in the final check: at most those held out from training."""
|
|
1219
|
+
usecase = plan.usecase or {}
|
|
1220
|
+
if usecase.get("split"):
|
|
1221
|
+
return int(usecase["split"].get("test") or 0)
|
|
1222
|
+
if usecase.get("scenarios"):
|
|
1223
|
+
return min(plan.check_tasks, withheld_tasks(int(usecase["scenarios"]), plan.share))
|
|
1224
|
+
return plan.check_tasks
|
|
1225
|
+
|
|
1226
|
+
|
|
1215
1227
|
def _limits_panel(plan: Plan, budget: float, available: float | None, estimate: dict[str, Any] | None) -> None:
|
|
1216
1228
|
"""The console's "Limits for this run" box, on stderr (stdout is for the run itself)."""
|
|
1217
1229
|
usecase = plan.usecase
|
|
@@ -1233,7 +1245,7 @@ def _limits_panel(plan: Plan, budget: float, available: float | None, estimate:
|
|
|
1233
1245
|
("Hyperparameters", "Advanced" if advanced else "Automatic"),
|
|
1234
1246
|
("Spending", f"max {ui.usd(budget, 0 if float(budget).is_integer() else 2)}"),
|
|
1235
1247
|
("Trains on", trains),
|
|
1236
|
-
("Eval set tasks", str(
|
|
1248
|
+
("Eval set tasks", str(eval_tasks(plan))),
|
|
1237
1249
|
]
|
|
1238
1250
|
if plan.method:
|
|
1239
1251
|
rows.append(("Training method", METHOD_LABEL.get(plan.method, plan.method)))
|
|
@@ -979,3 +979,25 @@ def test_start_from_an_earlier_run_repeats_its_environment_and_settings(form, ru
|
|
|
979
979
|
|
|
980
980
|
def test_start_needs_an_environment_or_a_run(form, run):
|
|
981
981
|
assert run("train", "start", "--yes").code == 2
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
def test_a_first_runs_limit_below_its_likely_cost_is_flagged():
|
|
985
|
+
from corethink.commands.train import estimate_lines
|
|
986
|
+
|
|
987
|
+
first = {"typicalUsd": 57.3, "lowUsd": 40.1, "highUsd": 85.9, "drivers": [], "assumptions": []}
|
|
988
|
+
estimate = {"costUsd": None, "minutes": None, "firstRun": first}
|
|
989
|
+
assert "may stop early" not in estimate_lines(estimate, 86)[0]
|
|
990
|
+
assert estimate_lines(estimate, 45)[0].endswith("The limit is below the likely cost; it may stop early.")
|
|
991
|
+
assert estimate_lines(estimate, 30)[0].endswith("The limit is below the low end; it will likely stop early.")
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
def test_the_eval_set_is_at_most_the_tasks_held_out():
|
|
995
|
+
from corethink.commands.train import Plan, eval_tasks
|
|
996
|
+
|
|
997
|
+
made = Plan.__new__(Plan)
|
|
998
|
+
made.usecase, made.share, made.check_tasks = {"scenarios": 80}, 0.6, 40
|
|
999
|
+
assert eval_tasks(made) == 32 # 80 tasks, 48 to train on: 32 held out, not the 40 asked for
|
|
1000
|
+
made.usecase = {"scenarios": 200}
|
|
1001
|
+
assert eval_tasks(made) == 40
|
|
1002
|
+
made.usecase = {"scenarios": 200, "split": {"train": 150, "test": 50}}
|
|
1003
|
+
assert eval_tasks(made) == 50
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|