mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 11:23:49 +08:00
Update flm_workspace.py
This commit is contained in:
@@ -3417,7 +3417,16 @@ def revert_trial_profile() -> dict[str, Any]:
|
||||
current_profile_id = params.get("FLMActiveProfileId", encoding="utf-8") or ""
|
||||
revert_snapshot = _find_revert_snapshot(paths, snapshot if isinstance(snapshot, dict) else {}, current_profile_id, params)
|
||||
if revert_snapshot is None:
|
||||
raise FileNotFoundError("active trial snapshot")
|
||||
params.put_bool("FLMTrialApplied", False)
|
||||
params.put("FLMActiveProfileId", "")
|
||||
params.put("FLMActiveOverrides", json.dumps({}, separators=(",", ":")))
|
||||
_clear_persistent_trial_baseline(params)
|
||||
try:
|
||||
snapshot_path.unlink()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
Params(memory=True).put_bool("StarPilotTogglesUpdated", True)
|
||||
return {"message": "Recovered the incomplete FLM trial; no rollback snapshot was available.", "recovered": True}
|
||||
_apply_param_bundle(params, revert_snapshot["params"])
|
||||
_clear_persistent_trial_baseline(params)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user