Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,3 @@ notebooks/
local_data/
# Pi harness state
.pi/

# macOS
.DS_Store

# Built docs site (mkdocs output)
site/

# Pipeline run outputs
goldilocks_output/

# Stray planning scratch files
plan-*.md
10 changes: 0 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,10 @@ description = "Materials machine learning tools for recommending DFT calculation
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"dscribe>=2.1",
"huggingface_hub>=0.23",
"joblib>=1.5.3",
"matminer>=0.10.1",
"numpy>=2.4.4",
"pandas>=2.0",
"pymatgen>=2026.3.23",
"sklearn-quantile>=0.1.1",
# The default k-points model (QRF + CGCNN metallicity) is a core capability,
# so its ML stack ships in the base install (decision: stfc/goldilocks-core#32).
# torch-geometric requires torch; on GPU hosts install the matching CUDA wheel
# of torch first, then sync.
"torch>=2.0",
"torch-geometric>=2.5",
]

[project.scripts]
Expand Down
7 changes: 3 additions & 4 deletions src/goldilocks_core/advisors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Advisor interfaces for calculation recommendations."""

from .kdistance_advisor import default_kmesh_advisor as default_kmesh_advisor
from .kindex_advisor import advise_kpoints as advise_kpoints
from .kindex_advisor import ml_kmesh_advisor as ml_kmesh_advisor
from .kmesh_advisor import advise_kpoints as advise_kpoints
from .kmesh_advisor import ml_kmesh_advisor as ml_kmesh_advisor

__all__ = ["advise_kpoints", "default_kmesh_advisor", "ml_kmesh_advisor"]
__all__ = ["advise_kpoints", "ml_kmesh_advisor"]
260 changes: 0 additions & 260 deletions src/goldilocks_core/advisors/kdistance_advisor.py

This file was deleted.

35 changes: 13 additions & 22 deletions src/goldilocks_core/cli/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
CoreResult,
ModelSpec,
)
from goldilocks_core.jobs import Pipeline, default_pipeline, run_core_job
from goldilocks_core.jobs import Pipeline, run_core_job
from goldilocks_core.pseudo.pp_registry import load_pseudo_metadata


Expand Down Expand Up @@ -160,29 +160,20 @@ def _request_from_args(args: argparse.Namespace) -> CoreJobRequest:


def _pipeline_from_args(args: argparse.Namespace) -> Pipeline | None:
"""Build the pipeline for the requested k-point backend.

Precedence: an explicit ``--model`` (local CSLR k-index model) wins; an
explicit k-point hint (``--k-grid``/``--k-spacing``) resolves from advice
without loading any model; otherwise the built-in default QRF pipeline runs
(with heuristic fallback).
"""
if args.model is not None:
spec = ModelSpec(
name=args.model_name,
version=args.model_version,
model_type="random_forest",
target="k_index",
feature_set="cslr",
source="local",
location=args.model,
)
return Pipeline(kmesh=ml_kmesh_advisor(spec))

if args.k_grid is not None or args.k_spacing is not None:
"""Build a custom pipeline from CLI backend options."""
if args.model is None:
return None

return default_pipeline()
spec = ModelSpec(
name=args.model_name,
version=args.model_version,
model_type="random_forest",
target="k_index",
feature_set="cslr",
source="local",
location=args.model,
)
return Pipeline(kmesh=ml_kmesh_advisor(spec))


def _parse_optional_bool(value: str | None) -> bool | None:
Expand Down
14 changes: 0 additions & 14 deletions src/goldilocks_core/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,6 @@ class Pipeline:
bundle: BundleStage = write_bundle_directory


def default_pipeline() -> Pipeline:
"""Return a Pipeline whose Kmesh stage uses the built-in default ML model.

Unlike the bare ``Pipeline()`` (whose Kmesh stage is the spacing heuristic),
this resolves the default QRF k-point model and predicts k-points out of the
box, degrading to heuristic advice when the model or its dependencies are
unavailable. This is the pipeline the CLI uses when no ``--model`` and no
explicit k-point hint are given.
"""
from goldilocks_core.advisors import default_kmesh_advisor

return Pipeline(kmesh=default_kmesh_advisor())


def run_core_job(
request: CoreJobRequest,
*,
Expand Down
Loading