inductive-mlxrl 0.2.2__tar.gz → 0.2.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.
- inductive_mlxrl-0.2.4/.github/scripts/audit_dependencies.py +52 -0
- inductive_mlxrl-0.2.4/.github/scripts/verify_release.py +78 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/CHANGELOG.md +40 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/CONTRIBUTING.md +36 -13
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/PKG-INFO +7 -4
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/README.md +3 -0
- inductive_mlxrl-0.2.4/SECURITY.md +35 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/external_baseline_worker.py +4 -1
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/run_phase4.py +3 -1
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/README.md +763 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/assets/terminal-results.jpg +0 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/assets/terminal-training.jpg +0 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/assets/ui-ranking.jpg +0 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/assets/ui-scorer-eval.jpg +0 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/compare.py +166 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/config.toml +48 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/data/briefs.json +120 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/data/scorer.json +1584 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/taste_reward.py +535 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/test_reward.py +54 -0
- inductive_mlxrl-0.2.4/examples/personal_taste_grpo/train.py +282 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/__init__.py +1 -1
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/cli.py +13 -13
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/config.py +6 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/data/rewards.py +15 -8
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/env/reference.py +6 -4
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/policy/logprobs.py +50 -7
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/policy/model.py +3 -1
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/rollout/agentic.py +3 -3
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/rollout/naive.py +2 -2
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/rollout/optimized.py +20 -9
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/train/grpo.py +6 -6
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/train/trajectory.py +9 -9
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/pyproject.toml +22 -5
- inductive_mlxrl-0.2.4/tests/test_cache_compatibility.py +67 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_echo.py +7 -7
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_gigpo.py +2 -2
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_grpo.py +16 -16
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_optimized_rollout.py +52 -3
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_policy_logprobs.py +195 -8
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_policy_model.py +58 -0
- inductive_mlxrl-0.2.4/tests/test_release_policy.py +98 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_rewards.py +7 -0
- inductive_mlxrl-0.2.4/tests/test_security.py +67 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_train_grpo.py +2 -2
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_trajectory_logprobs.py +1 -1
- inductive_mlxrl-0.2.4/uv.lock +4036 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/.gitignore +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/DESIGN.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/LICENSE +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/THIRD_PARTY_LICENSES.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/__init__.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/audit_phase4_config.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate1_mlxrl_after.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate1_mlxrl_after.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate1_mlxrl_after_final.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate1_mlxrl_after_final.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate1_mlxrl_after_noprefixsync.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate1_mlxrl_after_noprefixsync.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate1_mlxrl_before.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate1_mlxrl_before.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate2_unified_smoke.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate2_unified_smoke.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate3_mlx_tune_sync_256.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate3_mlx_tune_sync_256.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate3_sync_blocked.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate3_sync_blocked.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate3_sync_smoke.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate3_sync_smoke.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate4_config_audit.json +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate4_config_audit.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate4_sampler_smoke.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate4_sampler_smoke.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate5_full_reconciled.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/gate5_full_reconciled.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/phase4_external_smoke.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/phase4_external_smoke.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/phase4_full_all_targets.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/phase4_full_all_targets.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/phase4_local_mlxrl_vs_mlx_lm.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/phase4_local_mlxrl_vs_mlx_lm.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/phase4_mlx_lm_g4_smoke.jsonl +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/benchmarks/results/phase4_mlx_lm_g4_smoke.md +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/examples/qwen35_9b_g2_checkpoint.toml +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/examples/qwen3_0_6b_gigpo_recurring.toml +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/examples/qwen3_0_6b_grpo.toml +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/algo/__init__.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/algo/gigpo.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/algo/grpo.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/algorithm.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/data/__init__.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/data/gsm8k.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/echo.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/env/__init__.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/env/base.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/policy/__init__.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/policy/trajectory_logprobs.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/py.typed +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/rollout/__init__.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/train/__init__.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/train/reference.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/mlxrl/trajectory.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_agentic_env.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_agentic_rollout.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_benchmark_metrics.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_cli.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_config.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_import_direction.py +0 -0
- {inductive_mlxrl-0.2.2 → inductive_mlxrl-0.2.4}/tests/test_train_trajectory.py +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Audit every registry version in uv.lock, including other-platform dependencies."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import subprocess
|
|
6
|
+
import tempfile
|
|
7
|
+
import tomllib
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def main() -> None:
|
|
12
|
+
lock = tomllib.loads(Path("uv.lock").read_text())
|
|
13
|
+
groups: list[dict[str, str]] = []
|
|
14
|
+
for package in lock["package"]:
|
|
15
|
+
if package["source"] == {"editable": "."}:
|
|
16
|
+
continue
|
|
17
|
+
if package["source"].get("registry") != "https://pypi.org/simple":
|
|
18
|
+
raise ValueError(f"Unrecognized dependency source for {package['name']}.")
|
|
19
|
+
hashes = {wheel["hash"] for wheel in package.get("wheels", [])}
|
|
20
|
+
if "sdist" in package:
|
|
21
|
+
hashes.add(package["sdist"]["hash"])
|
|
22
|
+
if not hashes:
|
|
23
|
+
raise ValueError(f"Missing locked hashes for {package['name']}.")
|
|
24
|
+
requirement = f"{package['name']}=={package['version']} " + " ".join(
|
|
25
|
+
f"--hash={digest}" for digest in sorted(hashes)
|
|
26
|
+
)
|
|
27
|
+
# pip-audit rejects duplicate names even when versions target other Pythons.
|
|
28
|
+
for group in groups:
|
|
29
|
+
if package["name"] not in group:
|
|
30
|
+
group[package["name"]] = requirement
|
|
31
|
+
break
|
|
32
|
+
else:
|
|
33
|
+
groups.append({package["name"]: requirement})
|
|
34
|
+
with tempfile.TemporaryDirectory(prefix="mlxrl-dependency-audit-") as directory:
|
|
35
|
+
for index, group in enumerate(groups):
|
|
36
|
+
requirements = Path(directory) / f"requirements-{index}.txt"
|
|
37
|
+
requirements.write_text("\n".join(group.values()) + "\n")
|
|
38
|
+
subprocess.run(
|
|
39
|
+
[
|
|
40
|
+
"pip-audit",
|
|
41
|
+
"--strict",
|
|
42
|
+
"--disable-pip",
|
|
43
|
+
"--require-hashes",
|
|
44
|
+
"-r",
|
|
45
|
+
str(requirements),
|
|
46
|
+
],
|
|
47
|
+
check=True,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
if __name__ == "__main__":
|
|
52
|
+
main()
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""Require versioned tags to identify a main commit with successful push CI."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import ast
|
|
6
|
+
import json
|
|
7
|
+
import os
|
|
8
|
+
import re
|
|
9
|
+
import subprocess
|
|
10
|
+
import tomllib
|
|
11
|
+
import urllib.parse
|
|
12
|
+
import urllib.request
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def verify_release(ref: str, sha: str, version: str, repository: str, token: str) -> None:
|
|
17
|
+
if not ref.startswith("refs/tags/"):
|
|
18
|
+
return
|
|
19
|
+
if not re.fullmatch(r"refs/tags/v[0-9]+\.[0-9]+\.[0-9]+", ref):
|
|
20
|
+
raise ValueError("Release tags must use vX.Y.Z.")
|
|
21
|
+
if ref != f"refs/tags/v{version}":
|
|
22
|
+
raise ValueError("Release tag must match the package version.")
|
|
23
|
+
if not re.fullmatch(r"[0-9a-f]{40}", sha):
|
|
24
|
+
raise ValueError("Release commit must be a full SHA.")
|
|
25
|
+
tagged = subprocess.check_output(["git", "rev-parse", f"{ref}^{{commit}}"], text=True).strip()
|
|
26
|
+
if tagged != sha:
|
|
27
|
+
raise ValueError("Release tag and workflow commit differ.")
|
|
28
|
+
if subprocess.run(["git", "merge-base", "--is-ancestor", sha, "origin/main"]).returncode:
|
|
29
|
+
raise ValueError("Release commit must already be on origin/main.")
|
|
30
|
+
query = urllib.parse.urlencode(
|
|
31
|
+
{"head_sha": sha, "branch": "main", "event": "push", "status": "success"}
|
|
32
|
+
)
|
|
33
|
+
request = urllib.request.Request(
|
|
34
|
+
f"https://api.github.com/repos/{repository}/actions/workflows/ci.yml/runs?{query}",
|
|
35
|
+
headers={
|
|
36
|
+
"Authorization": f"Bearer {token}",
|
|
37
|
+
"Accept": "application/vnd.github+json",
|
|
38
|
+
"X-GitHub-Api-Version": "2022-11-28",
|
|
39
|
+
},
|
|
40
|
+
)
|
|
41
|
+
with urllib.request.urlopen(request, timeout=30) as response:
|
|
42
|
+
runs = json.load(response)["workflow_runs"]
|
|
43
|
+
if not any(
|
|
44
|
+
run["head_sha"] == sha
|
|
45
|
+
and run["head_branch"] == "main"
|
|
46
|
+
and run["event"] == "push"
|
|
47
|
+
and run["status"] == "completed"
|
|
48
|
+
and run["conclusion"] == "success"
|
|
49
|
+
and run["path"] == ".github/workflows/ci.yml"
|
|
50
|
+
for run in runs
|
|
51
|
+
):
|
|
52
|
+
raise ValueError("Release commit needs successful push CI on main.")
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def main() -> None:
|
|
56
|
+
version = tomllib.loads(Path("pyproject.toml").read_text())["project"]["version"]
|
|
57
|
+
module = ast.parse(Path("mlxrl/__init__.py").read_text())
|
|
58
|
+
package_version = next(
|
|
59
|
+
ast.literal_eval(node.value)
|
|
60
|
+
for node in module.body
|
|
61
|
+
if isinstance(node, ast.Assign)
|
|
62
|
+
and any(
|
|
63
|
+
isinstance(target, ast.Name) and target.id == "__version__" for target in node.targets
|
|
64
|
+
)
|
|
65
|
+
)
|
|
66
|
+
if package_version != version:
|
|
67
|
+
raise ValueError("Package and distribution versions must match.")
|
|
68
|
+
verify_release(
|
|
69
|
+
os.environ["GITHUB_REF"],
|
|
70
|
+
os.environ["GITHUB_SHA"],
|
|
71
|
+
version,
|
|
72
|
+
os.environ["GITHUB_REPOSITORY"],
|
|
73
|
+
os.environ.get("GH_TOKEN", ""),
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
if __name__ == "__main__":
|
|
78
|
+
main()
|
|
@@ -5,6 +5,46 @@ All notable changes to this project are documented here.
|
|
|
5
5
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project uses semantic versioning once releases are cut.
|
|
7
7
|
|
|
8
|
+
## [0.2.4] - 2026-10-22
|
|
9
|
+
|
|
10
|
+
### Security
|
|
11
|
+
|
|
12
|
+
- Require MLX-LM 0.32.0 or later with its MLX 0.32.2 minimum, and disable custom
|
|
13
|
+
model and tokenizer Python execution in library, example, and benchmark loaders. The older minimum
|
|
14
|
+
allowed the unsafe `model_file` behavior addressed by upstream's
|
|
15
|
+
[CVE-2026-5843 fix](https://github.com/ml-explore/mlx-lm/pull/1385).
|
|
16
|
+
- Parse answer and action tags in linear time to prevent malformed model
|
|
17
|
+
output from stalling reward evaluation and multi-turn rollouts.
|
|
18
|
+
- Reject CLI output paths whose symlinks resolve outside the working directory.
|
|
19
|
+
- Pin release actions to verified commits, freeze build and validation tools,
|
|
20
|
+
audit all locked dependencies in CI, and require release tags to match a
|
|
21
|
+
package version on main with successful push CI.
|
|
22
|
+
- Add security reporting guidance, ownership of release controls, and weekly
|
|
23
|
+
dependency and action updates.
|
|
24
|
+
|
|
25
|
+
## [0.2.3] - 2026-10-21
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- Project only completion positions through the output head for stock Qwen2,
|
|
30
|
+
Qwen3, and Llama models, reducing training logit memory while preserving
|
|
31
|
+
logprobs and gradients. Custom subclasses and wrappers retain the full
|
|
32
|
+
forward path. Thanks to @TarangKhanna for PR #6.
|
|
33
|
+
- Refresh runtime, development, and benchmark dependencies while preserving
|
|
34
|
+
the seven-day package-age cutoff in the lockfile.
|
|
35
|
+
- Include the Pillow, aiohttp, AnyIO, and urllib3 updates from Dependabot
|
|
36
|
+
PRs #1 through #4.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- Support MLX-LM 0.32 prompt-cache cloning while retaining older cache support.
|
|
41
|
+
Thanks to @TarangKhanna for PR #5.
|
|
42
|
+
- Use valid prefix lengths when building compiled decode caches from MLX-LM
|
|
43
|
+
0.32 cache buffers, and restore random state through MLX 0.32's mutable key.
|
|
44
|
+
- Keep scalar metric conversions compatible with the current MLX type stubs.
|
|
45
|
+
- Override the benchmark-only mlx-tune dependency's old datasets constraint
|
|
46
|
+
to use patched datasets 5.x (CVE-2026-66007).
|
|
47
|
+
|
|
8
48
|
## [0.2.2] - 2026-06-25
|
|
9
49
|
|
|
10
50
|
### Added
|
|
@@ -72,6 +72,15 @@ runtime dependencies marked for macOS arm64 and Python `<3.15` so universal
|
|
|
72
72
|
resolvers do not try to solve MLX wheels for unsupported platform or Python
|
|
73
73
|
splits.
|
|
74
74
|
|
|
75
|
+
The development environment overrides mlx-tune 0.6's `datasets<4` constraint
|
|
76
|
+
with `datasets>=5.0.1,<6` to avoid CVE-2026-66007. This only affects the external
|
|
77
|
+
benchmark tools; the published package depends on MLX and MLX-LM. Remove the
|
|
78
|
+
override when mlx-tune accepts a patched datasets release.
|
|
79
|
+
|
|
80
|
+
Certifi and Pillow use a one-day package-age cutoff so their October 2026
|
|
81
|
+
security patches can be installed promptly. Other dependencies retain the
|
|
82
|
+
configured default cutoff.
|
|
83
|
+
|
|
75
84
|
## Release Cycle
|
|
76
85
|
|
|
77
86
|
Releases are tag-driven and publish to PyPI through Trusted Publishing. Do not
|
|
@@ -85,21 +94,34 @@ One-time PyPI setup:
|
|
|
85
94
|
- set environment name to `pypi`;
|
|
86
95
|
- require manual approval on the GitHub `pypi` environment before publishing.
|
|
87
96
|
|
|
97
|
+
Restrict the environment to tags matching `v*`, disable administrator bypass
|
|
98
|
+
for environment approval, and protect release-tag creation, updates, and
|
|
99
|
+
deletion so only repository administrators can perform them. Require the
|
|
100
|
+
`Linux CPU-safe checks` status on main and retain pull-request review.
|
|
101
|
+
|
|
102
|
+
The publisher runs the official PyPA container by digest. When updating it,
|
|
103
|
+
resolve the upstream release's commit-tagged image from
|
|
104
|
+
`ghcr.io/pypa/gh-action-pypi-publish`, verify its content digest and source
|
|
105
|
+
metadata, and update the digest and source-commit comment together. Other
|
|
106
|
+
actions use commit pins maintained by Dependabot.
|
|
107
|
+
|
|
88
108
|
For each release:
|
|
89
109
|
|
|
90
|
-
1. Update the version in `pyproject.toml`.
|
|
110
|
+
1. Update the version in `pyproject.toml` and `mlxrl/__init__.py`, then run `uv lock`.
|
|
91
111
|
2. Add the release notes to `CHANGELOG.md`.
|
|
92
112
|
3. Run the local gates:
|
|
93
113
|
|
|
94
114
|
```bash
|
|
95
|
-
UV_CACHE_DIR=.uv-cache uv
|
|
96
|
-
UV_CACHE_DIR=.uv-cache uv run
|
|
97
|
-
UV_CACHE_DIR=.uv-cache uv run
|
|
98
|
-
UV_CACHE_DIR=.uv-cache uv
|
|
99
|
-
UV_CACHE_DIR=.uv-cache uv run --no-
|
|
115
|
+
UV_CACHE_DIR=.uv-cache uv sync --frozen --all-groups
|
|
116
|
+
UV_CACHE_DIR=.uv-cache uv run --no-sync pytest
|
|
117
|
+
UV_CACHE_DIR=.uv-cache uv run --no-sync ruff check .
|
|
118
|
+
UV_CACHE_DIR=.uv-cache uv run --no-sync pyright
|
|
119
|
+
UV_CACHE_DIR=.uv-cache uv run --no-sync python .github/scripts/audit_dependencies.py
|
|
120
|
+
UV_CACHE_DIR=.uv-cache uv build --no-build-isolation --python .venv/bin/python
|
|
121
|
+
UV_CACHE_DIR=.uv-cache uv run --no-sync twine check dist/*
|
|
100
122
|
```
|
|
101
123
|
|
|
102
|
-
4. Commit and merge the release prep.
|
|
124
|
+
4. Commit and merge the release prep, then wait for main's push CI to pass.
|
|
103
125
|
5. Tag the release from `main`:
|
|
104
126
|
|
|
105
127
|
```bash
|
|
@@ -107,12 +129,13 @@ git tag -a vX.Y.Z -m "Release vX.Y.Z"
|
|
|
107
129
|
git push origin vX.Y.Z
|
|
108
130
|
```
|
|
109
131
|
|
|
110
|
-
The `Release` workflow
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
132
|
+
The `Release` workflow first checks that the tag matches the package version,
|
|
133
|
+
identifies a commit already on main, and has successful main push CI. It builds
|
|
134
|
+
with frozen validation and build tools, checks metadata with Twine, stores the
|
|
135
|
+
artifacts, and publishes signed distributions from the protected `pypi`
|
|
136
|
+
environment after maintainer approval. The GitHub Release receives the same
|
|
137
|
+
files. Manual runs on branches only build and check artifacts; manual runs on
|
|
138
|
+
version tags must satisfy all publication controls.
|
|
116
139
|
|
|
117
140
|
The PyPI distribution name is `inductive-mlxrl`; the Python import package and
|
|
118
141
|
CLI command remain `mlxrl`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: inductive-mlxrl
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Small single-process RL post-training for LLMs on Apple Silicon with MLX.
|
|
5
5
|
Project-URL: Homepage, https://github.com/inductiveML/mlxrl
|
|
6
6
|
Project-URL: Repository, https://github.com/inductiveML/mlxrl
|
|
@@ -19,8 +19,8 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
20
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
21
|
Requires-Python: >=3.11
|
|
22
|
-
Requires-Dist: mlx-lm>=0.
|
|
23
|
-
Requires-Dist: mlx>=0.
|
|
22
|
+
Requires-Dist: mlx-lm>=0.32.0; python_version < '3.15' and platform_system == 'Darwin' and platform_machine == 'arm64'
|
|
23
|
+
Requires-Dist: mlx>=0.32.2; python_version < '3.15' and platform_system == 'Darwin' and platform_machine == 'arm64'
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
25
|
|
|
26
26
|
# mlxrl
|
|
@@ -43,6 +43,9 @@ fields may change before a 1.0 release.
|
|
|
43
43
|
|
|
44
44
|
## Quickstart
|
|
45
45
|
|
|
46
|
+
Requires Apple Silicon, Python 3.11–3.14, MLX 0.32.2+, and MLX-LM 0.32.0+.
|
|
47
|
+
See [SECURITY.md](SECURITY.md) for model trust boundaries and private reporting.
|
|
48
|
+
|
|
46
49
|
```bash
|
|
47
50
|
git clone https://github.com/inductiveML/mlxrl.git
|
|
48
51
|
cd mlxrl
|
|
@@ -18,6 +18,9 @@ fields may change before a 1.0 release.
|
|
|
18
18
|
|
|
19
19
|
## Quickstart
|
|
20
20
|
|
|
21
|
+
Requires Apple Silicon, Python 3.11–3.14, MLX 0.32.2+, and MLX-LM 0.32.0+.
|
|
22
|
+
See [SECURITY.md](SECURITY.md) for model trust boundaries and private reporting.
|
|
23
|
+
|
|
21
24
|
```bash
|
|
22
25
|
git clone https://github.com/inductiveML/mlxrl.git
|
|
23
26
|
cd mlxrl
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
Security fixes target the latest released version. Use inductive-mlxrl 0.2.4 or
|
|
4
|
+
later and MLX-LM 0.32.0 or later. Earlier supported MLX-LM versions could execute
|
|
5
|
+
Python from a model's `model_file` configuration without an explicit trust flag.
|
|
6
|
+
See the [upstream fix](https://github.com/ml-explore/mlx-lm/pull/1385).
|
|
7
|
+
|
|
8
|
+
Report vulnerabilities through the repository's
|
|
9
|
+
[private vulnerability reporting form](https://github.com/inductiveML/mlxrl/security/advisories/new).
|
|
10
|
+
Include the affected version, a minimal reproduction, and the expected impact.
|
|
11
|
+
Keep credentials and private training data out of reports and public issues.
|
|
12
|
+
|
|
13
|
+
## Trust boundaries
|
|
14
|
+
|
|
15
|
+
Model completions and action text are untrusted data. Built-in tag parsers scan
|
|
16
|
+
fixed delimiters without regex backtracking. Model loading explicitly disables
|
|
17
|
+
custom remote Python code.
|
|
18
|
+
|
|
19
|
+
Training configurations, custom Python reward functions, environment callbacks,
|
|
20
|
+
benchmark command adapters, model repositories, and adapter files must come from
|
|
21
|
+
sources you trust. The library runs in the caller's process and does not provide
|
|
22
|
+
a sandbox for these extensions or for native tensor parsers. CLI output paths
|
|
23
|
+
must resolve inside the working directory; this check does not isolate a
|
|
24
|
+
process from another user who can concurrently change its files or symlinks.
|
|
25
|
+
|
|
26
|
+
## Release controls
|
|
27
|
+
|
|
28
|
+
Release tags must match the package version, identify a commit already on main,
|
|
29
|
+
and have successful main push CI. CI audits every locked dependency version,
|
|
30
|
+
including packages for other platforms and Python versions. Release actions
|
|
31
|
+
use verified commit pins and build tools come from the frozen lockfile.
|
|
32
|
+
|
|
33
|
+
GitHub's `pypi` environment restricts publication to protected release tags and
|
|
34
|
+
requires a maintainer's approval. PyPI publication uses OIDC Trusted Publishing
|
|
35
|
+
and signed attestations. Local Metal tests remain a release requirement.
|
|
@@ -317,7 +317,9 @@ def run_mlx_lm_lora(args: argparse.Namespace) -> BenchResult:
|
|
|
317
317
|
prompt_token_lengths = [
|
|
318
318
|
encoded_prompt_token_count(tokenizer, row["prompt"]) for row in rows
|
|
319
319
|
]
|
|
320
|
-
ref_loaded = load(
|
|
320
|
+
ref_loaded = load(
|
|
321
|
+
args.model, tokenizer_config={"trust_remote_code": False}, trust_remote_code=False
|
|
322
|
+
)
|
|
321
323
|
ref_model = ref_loaded[0]
|
|
322
324
|
ref_model.freeze()
|
|
323
325
|
optimizer = optim.Adam(learning_rate=args.learning_rate)
|
|
@@ -453,6 +455,7 @@ def run_mlx_tune(args: argparse.Namespace) -> BenchResult:
|
|
|
453
455
|
model_name=args.model,
|
|
454
456
|
max_seq_length=args.max_context,
|
|
455
457
|
load_in_4bit=True,
|
|
458
|
+
trust_remote_code=False,
|
|
456
459
|
)
|
|
457
460
|
prompt_token_lengths = [
|
|
458
461
|
encoded_prompt_token_count(tokenizer, row["prompt"]) for row in rows
|
|
@@ -536,7 +536,9 @@ def run_mlx_lm_worker(args: argparse.Namespace) -> BenchResult:
|
|
|
536
536
|
|
|
537
537
|
set_mlx_wired_limit(mx, args.wired_limit_mb)
|
|
538
538
|
mx.random.seed(args.seed)
|
|
539
|
-
loaded = mlx_lm.load(
|
|
539
|
+
loaded = mlx_lm.load(
|
|
540
|
+
args.model, tokenizer_config={"trust_remote_code": False}, trust_remote_code=False
|
|
541
|
+
)
|
|
540
542
|
model = loaded[0]
|
|
541
543
|
tokenizer = loaded[1]
|
|
542
544
|
sampler = make_sampler(
|