Prepare GeoIntel for public release
Managed validation / Managed repository validation (pull_request) Successful in 1m46s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Successful in 1m51s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Successful in 20s
GeoIntel release gates / Production AI image, SBOM and container scan (pull_request) Successful in 15m3s
GeoIntel release gates / Deploy exact gated revision to Unraid (pull_request) Skipped
Managed validation / Managed repository validation (pull_request) Successful in 1m46s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Successful in 1m51s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Successful in 20s
GeoIntel release gates / Production AI image, SBOM and container scan (pull_request) Successful in 15m3s
GeoIntel release gates / Deploy exact gated revision to Unraid (pull_request) Skipped
This commit is contained in:
@@ -319,7 +319,7 @@ def main() -> int:
|
||||
state_path = args.output_dir / "best-state.pt"
|
||||
if not state_path.is_file():
|
||||
raise RuntimeError(f"missing existing best state: {state_path}")
|
||||
model.load_state_dict(torch.load(state_path, map_location=device))
|
||||
model.load_state_dict(torch.load(state_path, map_location=device, weights_only=True))
|
||||
model.eval()
|
||||
torch.jit.script(model).save(str(args.output_dir / "proposal-classifier.torchscript.pt"))
|
||||
print(
|
||||
@@ -369,7 +369,7 @@ def main() -> int:
|
||||
if float(metric["f1"]) > best_f1:
|
||||
best_f1 = float(metric["f1"])
|
||||
torch.save(model.state_dict(), args.output_dir / "best-state.pt")
|
||||
model.load_state_dict(torch.load(args.output_dir / "best-state.pt", map_location=device))
|
||||
model.load_state_dict(torch.load(args.output_dir / "best-state.pt", map_location=device, weights_only=True))
|
||||
model.eval()
|
||||
scripted = torch.jit.script(model)
|
||||
model_path = args.output_dir / "proposal-classifier.torchscript.pt"
|
||||
|
||||
Reference in New Issue
Block a user