guepard-relml 0.1.0__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.
- guepard_relml-0.1.0/.claude/settings.local.json +8 -0
- guepard_relml-0.1.0/.env.example +44 -0
- guepard_relml-0.1.0/.github/workflows/wheels.yml +77 -0
- guepard_relml-0.1.0/.gitignore +56 -0
- guepard_relml-0.1.0/CMakeLists.txt +301 -0
- guepard_relml-0.1.0/LICENSE +21 -0
- guepard_relml-0.1.0/PKG-INFO +980 -0
- guepard_relml-0.1.0/README.md +941 -0
- guepard_relml-0.1.0/benchmarks/baselines/README.md +33 -0
- guepard_relml-0.1.0/benchmarks/baselines/pl_predict.py +559 -0
- guepard_relml-0.1.0/benchmarks/baselines/pyg_f1.py +606 -0
- guepard_relml-0.1.0/benchmarks/baselines/run_ml1m.py +100 -0
- guepard_relml-0.1.0/benchmarks/baselines/simple_baseline_ml1m.py +141 -0
- guepard_relml-0.1.0/benchmarks/f1_podium/README.md +58 -0
- guepard_relml-0.1.0/benchmarks/f1_podium/eval_enriched.py +163 -0
- guepard_relml-0.1.0/benchmarks/f1_podium/eval_formonly.py +87 -0
- guepard_relml-0.1.0/benchmarks/f1_podium/eval_podium.py +88 -0
- guepard_relml-0.1.0/benchmarks/f1_podium/eval_regression.py +116 -0
- guepard_relml-0.1.0/benchmarks/f1_podium/predict_montreal.py +264 -0
- guepard_relml-0.1.0/benchmarks/f1_podium/predict_montreal_position.py +129 -0
- guepard_relml-0.1.0/benchmarks/proposal/README.md +250 -0
- guepard_relml-0.1.0/benchmarks/proposal/_common.py +430 -0
- guepard_relml-0.1.0/benchmarks/proposal/f1_compare.py +280 -0
- guepard_relml-0.1.0/benchmarks/proposal/f1_relbench_compare.py +386 -0
- guepard_relml-0.1.0/benchmarks/proposal/make_plots.py +100 -0
- guepard_relml-0.1.0/benchmarks/proposal/ml1m_compare.py +312 -0
- guepard_relml-0.1.0/benchmarks/proposal/relml_pyg.py +580 -0
- guepard_relml-0.1.0/benchmarks/proposal/sunnyside_compare.py +258 -0
- guepard_relml-0.1.0/benchmarks/relbench_f1/common.py +306 -0
- guepard_relml-0.1.0/benchmarks/relbench_f1/leak_audit.csv +5 -0
- guepard_relml-0.1.0/benchmarks/relbench_f1/results.csv +14 -0
- guepard_relml-0.1.0/benchmarks/relbench_f1/run_kumorfm.py +203 -0
- guepard_relml-0.1.0/benchmarks/relbench_f1/run_rdl.py +150 -0
- guepard_relml-0.1.0/benchmarks/relbench_f1/run_relml.py +233 -0
- guepard_relml-0.1.0/benchmarks/requirements.txt +12 -0
- guepard_relml-0.1.0/bindings/relml_python.cpp +497 -0
- guepard_relml-0.1.0/data/relbench_f1/circuits.csv +78 -0
- guepard_relml-0.1.0/data/relbench_f1/constructor_results.csv +9409 -0
- guepard_relml-0.1.0/data/relbench_f1/constructor_standings.csv +10171 -0
- guepard_relml-0.1.0/data/relbench_f1/constructors.csv +212 -0
- guepard_relml-0.1.0/data/relbench_f1/drivers.csv +858 -0
- guepard_relml-0.1.0/data/relbench_f1/oracle.csv +1942 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/kumorfm__driver-dnf__s0.csv +703 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/kumorfm__driver-position__s0.csv +761 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/kumorfm__driver-top3.csv +727 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/kumorfm__driver-top3__s0.csv +727 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/rdl__driver-dnf__s0.csv +703 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/rdl__driver-position__s0.csv +761 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/rdl__driver-top3.csv +727 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/rdl__driver-top3__s0.csv +727 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/rdl__driver-top3__s1.csv +727 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/rdl__driver-top3__s2.csv +727 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/relml__driver-dnf__s0.csv +703 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/relml__driver-position__s0.csv +761 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/relml__driver-top3.csv +727 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/relml__driver-top3__s0.csv +727 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/relml__driver-top3__s1.csv +727 -0
- guepard_relml-0.1.0/data/relbench_f1/preds/relml__driver-top3__s2.csv +727 -0
- guepard_relml-0.1.0/data/relbench_f1/qualifying.csv +4083 -0
- guepard_relml-0.1.0/data/relbench_f1/races.csv +821 -0
- guepard_relml-0.1.0/data/relbench_f1/results.csv +20324 -0
- guepard_relml-0.1.0/data/relbench_f1/schema.json +24 -0
- guepard_relml-0.1.0/data/relbench_f1/standings.csv +28116 -0
- guepard_relml-0.1.0/data/relbench_f1/task_driver_dnf.csv +12680 -0
- guepard_relml-0.1.0/data/relbench_f1/task_driver_position.csv +8713 -0
- guepard_relml-0.1.0/data/relbench_f1/task_driver_top3.csv +2668 -0
- guepard_relml-0.1.0/docs/README.md +42 -0
- guepard_relml-0.1.0/docs/figures/ml1m_relml_vs_pyg.pdf +0 -0
- guepard_relml-0.1.0/docs/figures/relbench_f1_relml_vs_pyg.pdf +0 -0
- guepard_relml-0.1.0/docs/integration.md +1141 -0
- guepard_relml-0.1.0/docs/proposal.tex +816 -0
- guepard_relml-0.1.0/external/.gitignore +3 -0
- guepard_relml-0.1.0/external/README.md +22 -0
- guepard_relml-0.1.0/external/install.sh +45 -0
- guepard_relml-0.1.0/handoff.md +591 -0
- guepard_relml-0.1.0/include/relml/CSVLoader.h +41 -0
- guepard_relml-0.1.0/include/relml/Column.h +46 -0
- guepard_relml-0.1.0/include/relml/Database.h +25 -0
- guepard_relml-0.1.0/include/relml/FKDetector.h +50 -0
- guepard_relml-0.1.0/include/relml/Parameter.h +27 -0
- guepard_relml-0.1.0/include/relml/Table.h +39 -0
- guepard_relml-0.1.0/include/relml/Typeinferrer.h +37 -0
- guepard_relml-0.1.0/include/relml/agent/Agent.h +66 -0
- guepard_relml-0.1.0/include/relml/agent/ModelRegistry.h +25 -0
- guepard_relml-0.1.0/include/relml/agent/RelMLSystem.h +66 -0
- guepard_relml-0.1.0/include/relml/encoding/CategoricalEncoder.h +37 -0
- guepard_relml-0.1.0/include/relml/encoding/HeteroEncoder.h +158 -0
- guepard_relml-0.1.0/include/relml/encoding/NumericalEncoder.h +24 -0
- guepard_relml-0.1.0/include/relml/encoding/TimestampEncoder.h +26 -0
- guepard_relml-0.1.0/include/relml/gnn/HeteroGraphSAGE.h +96 -0
- guepard_relml-0.1.0/include/relml/gnn/MLPHead.h +62 -0
- guepard_relml-0.1.0/include/relml/gnn/SAGEKernels.h +65 -0
- guepard_relml-0.1.0/include/relml/graph/GraphBuilder.h +24 -0
- guepard_relml-0.1.0/include/relml/graph/HeteroGraph.h +58 -0
- guepard_relml-0.1.0/include/relml/training/Adam.h +24 -0
- guepard_relml-0.1.0/include/relml/training/InferenceSchema.h +118 -0
- guepard_relml-0.1.0/include/relml/training/Metrics.h +49 -0
- guepard_relml-0.1.0/include/relml/training/TaskBuilder.h +25 -0
- guepard_relml-0.1.0/include/relml/training/TaskParser.h +32 -0
- guepard_relml-0.1.0/include/relml/training/TaskSpec.h +125 -0
- guepard_relml-0.1.0/include/relml/training/Trainer.h +186 -0
- guepard_relml-0.1.0/install.sh +150 -0
- guepard_relml-0.1.0/logo-guepard.svg +28 -0
- guepard_relml-0.1.0/logs/benchmark.log +1389 -0
- guepard_relml-0.1.0/logs/benchmark2.log +1936 -0
- guepard_relml-0.1.0/pyproject.toml +67 -0
- guepard_relml-0.1.0/python/examples/binary_f1_example.py +505 -0
- guepard_relml-0.1.0/python/examples/f1_podium.py +823 -0
- guepard_relml-0.1.0/python/examples/ml1m_ratings.py +387 -0
- guepard_relml-0.1.0/python/examples/sunny_side_demand.py +1355 -0
- guepard_relml-0.1.0/python/examples/sunnyside_v2_demand.py +343 -0
- guepard_relml-0.1.0/python/guepard/__init__.py +1 -0
- guepard_relml-0.1.0/python/guepard/__pycache__/__init__.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/qwery/__init__.py +1 -0
- guepard_relml-0.1.0/python/guepard/qwery/__pycache__/__init__.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/qwery/relml/__init__.py +340 -0
- guepard_relml-0.1.0/python/guepard/qwery/relml/__pycache__/__init__.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/qwery/relml/__pycache__/db_introspect.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/qwery/relml/__pycache__/explainer.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/qwery/relml/__pycache__/schema_io.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/qwery/relml/_relml_core.cpython-313-darwin.so +0 -0
- guepard_relml-0.1.0/python/guepard/qwery/relml/explainer.py +691 -0
- guepard_relml-0.1.0/python/guepard/qwery/relml/schema_explorer.py +587 -0
- guepard_relml-0.1.0/python/guepard/qwery/relml/schema_io.py +187 -0
- guepard_relml-0.1.0/python/guepard/tools/README.md +28 -0
- guepard_relml-0.1.0/python/guepard/tools/__init__.py +14 -0
- guepard_relml-0.1.0/python/guepard/tools/__pycache__/__init__.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/README.md +143 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__init__.py +22 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__main__.py +4 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/__init__.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/__main__.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/agent.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/base.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/client.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/dashboard.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/dashboard_server.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/dashboards.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/display.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/external.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/hardware.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/host.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/ollama_bridge.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/plot.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/repl.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/serve.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/session.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/tests.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/__pycache__/tools.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agent.py +176 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agents/__init__.py +10 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agents/__pycache__/__init__.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agents/__pycache__/evaluator.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agents/__pycache__/orchestrator.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agents/__pycache__/schema_analyst.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agents/__pycache__/task_designer.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agents/evaluator.py +95 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agents/orchestrator.py +504 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agents/schema_analyst.py +66 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/agents/task_designer.py +206 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/assets/gue-logo.ans +7 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/assets/gue-logo.svg +17 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/base.py +177 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/client.py +223 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/dashboard.py +511 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/dashboard_server.py +340 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/dashboards.py +210 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/display.py +128 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/external.py +35 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/hardware.py +92 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/host.py +57 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/ollama_bridge.py +132 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/plot.py +304 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/repl.py +726 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/PROTOCOL.md +52 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/__init__.py +6 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/__pycache__/__init__.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/__pycache__/framing.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/__pycache__/host_bridge.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/__pycache__/server.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/__pycache__/tests.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/framing.py +108 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/host_bridge.py +46 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/server.py +165 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/rpc/tests.py +232 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/serve.py +496 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/session.py +1954 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/tests.py +1398 -0
- guepard_relml-0.1.0/python/guepard/tools/agent/tools.py +513 -0
- guepard_relml-0.1.0/python/guepard/tools/schema_introspect/README.md +120 -0
- guepard_relml-0.1.0/python/guepard/tools/schema_introspect/__init__.py +7 -0
- guepard_relml-0.1.0/python/guepard/tools/schema_introspect/__pycache__/__init__.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/schema_introspect/__pycache__/core.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/schema_introspect/__pycache__/tests.cpython-313.pyc +0 -0
- guepard_relml-0.1.0/python/guepard/tools/schema_introspect/api.py +89 -0
- guepard_relml-0.1.0/python/guepard/tools/schema_introspect/core.py +510 -0
- guepard_relml-0.1.0/python/guepard/tools/schema_introspect/tests.py +105 -0
- guepard_relml-0.1.0/python/pyproject.toml +37 -0
- guepard_relml-0.1.0/runs/graphsage__driver-top3.csv +727 -0
- guepard_relml-0.1.0/runs/graphsage__driver-top3__nograph.csv +727 -0
- guepard_relml-0.1.0/runs/reference_rdl__driver-top3.csv +727 -0
- guepard_relml-0.1.0/runs/relml__driver-top3.csv +727 -0
- guepard_relml-0.1.0/runs/relml__driver-top3__nograph.csv +727 -0
- guepard_relml-0.1.0/runs/results.json +47 -0
- guepard_relml-0.1.0/scripts/import_rel_trial.py +69 -0
- guepard_relml-0.1.0/scripts/load_relbench_to_csv.py +88 -0
- guepard_relml-0.1.0/src/agent/ModelRegistry.cpp +37 -0
- guepard_relml-0.1.0/src/agent/RelMLSystem.cpp +258 -0
- guepard_relml-0.1.0/src/agent/agent.cpp +194 -0
- guepard_relml-0.1.0/src/database/CSVLoader.cpp +148 -0
- guepard_relml-0.1.0/src/database/Column.cpp +44 -0
- guepard_relml-0.1.0/src/database/Database.cpp +48 -0
- guepard_relml-0.1.0/src/database/FKDetector.cpp +149 -0
- guepard_relml-0.1.0/src/database/Table.cpp +81 -0
- guepard_relml-0.1.0/src/database/Typeinferrer.cpp +80 -0
- guepard_relml-0.1.0/src/encoding/CategoricalEncoder.cpp +40 -0
- guepard_relml-0.1.0/src/encoding/HeteroEncoder.cpp +501 -0
- guepard_relml-0.1.0/src/encoding/NumericalEncoder.cpp +39 -0
- guepard_relml-0.1.0/src/encoding/TimestampEncoder.cpp +61 -0
- guepard_relml-0.1.0/src/example_tasks/avito_user_ad_visit.cpp +424 -0
- guepard_relml-0.1.0/src/example_tasks/hm_churn.cpp +324 -0
- guepard_relml-0.1.0/src/example_tasks/ml1m_rating_classification.cpp +291 -0
- guepard_relml-0.1.0/src/example_tasks/pl_outcome.cpp +1627 -0
- guepard_relml-0.1.0/src/example_tasks/sunnyside_demand.cpp +414 -0
- guepard_relml-0.1.0/src/example_tasks/sunnyside_slots.cpp +303 -0
- guepard_relml-0.1.0/src/gnn/HeteroGraphSAGE.cpp +303 -0
- guepard_relml-0.1.0/src/gnn/MLPHead.cpp +131 -0
- guepard_relml-0.1.0/src/gnn/SAGEKernels.cpp +184 -0
- guepard_relml-0.1.0/src/graph/Graphbuilder.cpp +137 -0
- guepard_relml-0.1.0/src/graph/HeteroGraph.cpp +49 -0
- guepard_relml-0.1.0/src/training/Adam.cpp +30 -0
- guepard_relml-0.1.0/src/training/Metrics.cpp +177 -0
- guepard_relml-0.1.0/src/training/TaskBuilder.cpp +84 -0
- guepard_relml-0.1.0/src/training/TaskParser.cpp +241 -0
- guepard_relml-0.1.0/src/training/TaskSpec.cpp +254 -0
- guepard_relml-0.1.0/src/training/Trainer.cpp +844 -0
- guepard_relml-0.1.0/tests/bench_gnn.cpp +88 -0
- guepard_relml-0.1.0/tests/test_agent.cpp +20 -0
- guepard_relml-0.1.0/tests/test_database.cpp +55 -0
- guepard_relml-0.1.0/tests/test_encoding.cpp +64 -0
- guepard_relml-0.1.0/tests/test_gnn.cpp +81 -0
- guepard_relml-0.1.0/tests/test_grad_check.cpp +285 -0
- guepard_relml-0.1.0/tests/test_graph.cpp +58 -0
- guepard_relml-0.1.0/tests/test_system.cpp +204 -0
- guepard_relml-0.1.0/tests/test_training.cpp +53 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# RelML agent configuration — copy to `.env` and fill in ONE backend.
|
|
2
|
+
# cp .env.example .env
|
|
3
|
+
# The agent reads these from the environment or the nearest .env (searching
|
|
4
|
+
# upward from the package). Secrets here are NEVER logged. Do not commit .env.
|
|
5
|
+
|
|
6
|
+
# ── Credentials: pick ONE backend ──────────────────────────────────────────
|
|
7
|
+
# AWS Bedrock (bearer-token auth). Setting this selects the bedrock backend.
|
|
8
|
+
AWS_BEARER_TOKEN_BEDROCK=
|
|
9
|
+
|
|
10
|
+
# First-party Anthropic API. Used when no Bedrock token is set.
|
|
11
|
+
ANTHROPIC_API_KEY=
|
|
12
|
+
|
|
13
|
+
# Ollama Cloud (https://ollama.com/settings/keys). Selects the ollama backend
|
|
14
|
+
# when no Bedrock / Anthropic credentials are set.
|
|
15
|
+
OLLAMA_API_KEY=
|
|
16
|
+
|
|
17
|
+
# ── Optional overrides ──────────────────────────────────────────────────────
|
|
18
|
+
# Force a backend regardless of which credential is present:
|
|
19
|
+
# bedrock | anthropic | ollama
|
|
20
|
+
# RELML_AGENT_BACKEND=ollama
|
|
21
|
+
|
|
22
|
+
# Override the model id (defaults: Bedrock us.anthropic.claude-sonnet-4-5-…,
|
|
23
|
+
# Anthropic claude-sonnet-4-5, Ollama gpt-oss:120b).
|
|
24
|
+
# RELML_AGENT_MODEL=
|
|
25
|
+
|
|
26
|
+
# Ollama API host (default https://ollama.com for cloud; use
|
|
27
|
+
# http://localhost:11434 for a local daemon without a cloud key).
|
|
28
|
+
# OLLAMA_HOST=https://ollama.com
|
|
29
|
+
|
|
30
|
+
# Ollama HTTP timeout in seconds (default 300).
|
|
31
|
+
# OLLAMA_TIMEOUT=300
|
|
32
|
+
|
|
33
|
+
# Bedrock region (default us-east-1). AWS_REGION also works.
|
|
34
|
+
# RELML_AGENT_REGION=us-east-1
|
|
35
|
+
|
|
36
|
+
# Where trained models are persisted per database
|
|
37
|
+
# (default ~/.relml/agent_models).
|
|
38
|
+
# RELML_MODEL_DIR=
|
|
39
|
+
|
|
40
|
+
# Show full subagent reasoning + exploratory tables (default: quiet).
|
|
41
|
+
# RELML_VERBOSE=1
|
|
42
|
+
|
|
43
|
+
# Skip the banner logo image in the REPL.
|
|
44
|
+
# RELML_NO_LOGO=1
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: build wheels
|
|
2
|
+
|
|
3
|
+
# Builds binary wheels for guepard-relml across platforms/Python versions by
|
|
4
|
+
# compiling the C++ core (_relml_core) from source via scikit-build-core.
|
|
5
|
+
# Artifacts are uploaded; publishing to PyPI is a manual/gated follow-up.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
tags: ["v*"] # build on release tags
|
|
10
|
+
workflow_dispatch: {} # ...or on demand
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
wheels:
|
|
14
|
+
name: wheels on ${{ matrix.os }}
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
os: [ubuntu-latest, macos-14, macos-13] # linux x86_64, macOS arm64, macOS x86_64
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Build wheels
|
|
24
|
+
uses: pypa/cibuildwheel@v2.21
|
|
25
|
+
env:
|
|
26
|
+
# CPython 3.9–3.13; skip musllinux and 32-bit for a first release.
|
|
27
|
+
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*"
|
|
28
|
+
CIBW_SKIP: "*-musllinux* *-manylinux_i686"
|
|
29
|
+
CIBW_ARCHS_MACOS: auto # arm64 on macos-14, x86_64 on macos-13
|
|
30
|
+
CIBW_ARCHS_LINUX: x86_64
|
|
31
|
+
# Smoke-test each wheel: the compiled extension must import.
|
|
32
|
+
CIBW_TEST_COMMAND: >-
|
|
33
|
+
python -c "import guepard.qwery.relml._relml_core as c; assert hasattr(c, 'train')"
|
|
34
|
+
# BLAS is optional (CMake falls back to a scalar path); on macOS the
|
|
35
|
+
# system Accelerate framework is picked up automatically. OpenBLAS can
|
|
36
|
+
# be added to the Linux build later for speed.
|
|
37
|
+
|
|
38
|
+
- uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: wheels-${{ matrix.os }}
|
|
41
|
+
path: wheelhouse/*.whl
|
|
42
|
+
|
|
43
|
+
sdist:
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
- run: pipx run build --sdist
|
|
48
|
+
- uses: actions/upload-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: sdist
|
|
51
|
+
path: dist/*.tar.gz
|
|
52
|
+
|
|
53
|
+
publish:
|
|
54
|
+
name: publish to PyPI
|
|
55
|
+
needs: [wheels, sdist]
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
# Only on a version tag (git tag v0.1.1 && git push --tags).
|
|
58
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
59
|
+
# No GitHub Environment (unavailable on private/free repos). If you make the
|
|
60
|
+
# repo public, you can add `environment: pypi` here for tag-only protection.
|
|
61
|
+
permissions:
|
|
62
|
+
id-token: write # PyPI Trusted Publishing (OIDC) — no API token/secret needed
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/download-artifact@v4
|
|
65
|
+
with:
|
|
66
|
+
path: all-artifacts
|
|
67
|
+
- name: Collect wheels + sdist into dist/
|
|
68
|
+
run: |
|
|
69
|
+
mkdir -p dist
|
|
70
|
+
find all-artifacts -name '*.whl' -exec cp {} dist/ \;
|
|
71
|
+
find all-artifacts -name '*.tar.gz' -exec cp {} dist/ \;
|
|
72
|
+
ls -l dist
|
|
73
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
74
|
+
# Dry-run to TestPyPI first by uncommenting (and adding the matching
|
|
75
|
+
# pending publisher on test.pypi.org):
|
|
76
|
+
# with:
|
|
77
|
+
# repository-url: https://test.pypi.org/legacy/
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Data folders
|
|
2
|
+
*-data/
|
|
3
|
+
|
|
4
|
+
# Local working drafts (training history CSVs, plot PDFs, model .bin
|
|
5
|
+
# files, schema dumps, etc.) — generated artifacts, not source.
|
|
6
|
+
draft/
|
|
7
|
+
|
|
8
|
+
# Loose generated artifacts at the repo root (in case anything escapes
|
|
9
|
+
# the draft/ folder during an experiment).
|
|
10
|
+
/*.csv
|
|
11
|
+
/*.pdf
|
|
12
|
+
/*.bin
|
|
13
|
+
/*.schema.json
|
|
14
|
+
|
|
15
|
+
# Script and generated code dumps (from scripts/collect_code.sh)
|
|
16
|
+
collect_code.sh
|
|
17
|
+
all_code.txt
|
|
18
|
+
collected_code.txt
|
|
19
|
+
/out.txt
|
|
20
|
+
|
|
21
|
+
# Presentation / explainer video — authored + rendered locally with Manim.
|
|
22
|
+
# Not part of the shipped library (the rendered media is large and generated).
|
|
23
|
+
presentation/
|
|
24
|
+
|
|
25
|
+
# Environment and secrets
|
|
26
|
+
.env
|
|
27
|
+
.env.*
|
|
28
|
+
# keep the template tracked
|
|
29
|
+
!.env.example
|
|
30
|
+
|
|
31
|
+
# Build
|
|
32
|
+
build/
|
|
33
|
+
# Scratch or alternate out-of-source CMake trees (e.g. experimental configures)
|
|
34
|
+
/build-*/
|
|
35
|
+
|
|
36
|
+
# Python
|
|
37
|
+
myenv/
|
|
38
|
+
__pycache__/
|
|
39
|
+
*.pyc
|
|
40
|
+
*.egg-info/
|
|
41
|
+
.eggs/
|
|
42
|
+
venv/
|
|
43
|
+
.venv/
|
|
44
|
+
# The compiled extension is built by CMake into per-platform wheels
|
|
45
|
+
# (scikit-build-core); the dev build copies one into the tree. Ignore it.
|
|
46
|
+
python/guepard/qwery/relml/_relml_core*.so
|
|
47
|
+
python/guepard/qwery/relml/_relml_core*.pyd
|
|
48
|
+
python/guepard/qwery/relml/_relml_core*.dylib
|
|
49
|
+
|
|
50
|
+
# IDE and OS
|
|
51
|
+
.idea/
|
|
52
|
+
.vscode/
|
|
53
|
+
*.swp
|
|
54
|
+
.DS_Store
|
|
55
|
+
*.bin
|
|
56
|
+
lime_backtest/
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.20)
|
|
2
|
+
|
|
3
|
+
if(APPLE)
|
|
4
|
+
execute_process(
|
|
5
|
+
COMMAND xcrun --show-sdk-path
|
|
6
|
+
OUTPUT_VARIABLE _sdk_path
|
|
7
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
8
|
+
)
|
|
9
|
+
set(CMAKE_OSX_SYSROOT "${_sdk_path}" CACHE PATH "macOS SDK path")
|
|
10
|
+
set(CMAKE_C_COMPILER "/usr/bin/clang" CACHE PATH "C compiler" FORCE)
|
|
11
|
+
set(CMAKE_CXX_COMPILER "/usr/bin/clang++" CACHE PATH "CXX compiler" FORCE)
|
|
12
|
+
endif()
|
|
13
|
+
|
|
14
|
+
project(relml VERSION 0.1.0 LANGUAGES CXX)
|
|
15
|
+
|
|
16
|
+
# Static relml_* libs are linked into the Python extension (.so); require PIC.
|
|
17
|
+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
18
|
+
|
|
19
|
+
set(CMAKE_CXX_STANDARD 20)
|
|
20
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
21
|
+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
22
|
+
|
|
23
|
+
# Building just the Python extension (e.g. via pip / install.sh) only needs the
|
|
24
|
+
# core libs + bindings. The C++ tests, example tasks, and the standalone agent
|
|
25
|
+
# library (which pulls in libcurl) are developer extras — gate them so a Python
|
|
26
|
+
# install stays lightweight and dependency-light.
|
|
27
|
+
option(RELML_BUILD_EXTRAS "Build C++ tests, example tasks, and the agent library" ON)
|
|
28
|
+
|
|
29
|
+
if(APPLE AND CMAKE_OSX_SYSROOT)
|
|
30
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${CMAKE_OSX_SYSROOT}/usr/include/c++/v1" CACHE STRING "" FORCE)
|
|
31
|
+
endif()
|
|
32
|
+
|
|
33
|
+
include_directories(include)
|
|
34
|
+
|
|
35
|
+
# ---------------------------------------------------------------------------
|
|
36
|
+
# stdc++fs is only needed on Linux/GCC — macOS/clang has it built-in
|
|
37
|
+
# ---------------------------------------------------------------------------
|
|
38
|
+
set(STDCXXFS $<$<NOT:$<PLATFORM_ID:Darwin>>:stdc++fs>)
|
|
39
|
+
|
|
40
|
+
# ---------------------------------------------------------------------------
|
|
41
|
+
# OpenMP
|
|
42
|
+
# ---------------------------------------------------------------------------
|
|
43
|
+
find_package(OpenMP)
|
|
44
|
+
if(OpenMP_CXX_FOUND)
|
|
45
|
+
set(RELML_OPENMP_FOUND 1)
|
|
46
|
+
endif()
|
|
47
|
+
|
|
48
|
+
# ---------------------------------------------------------------------------
|
|
49
|
+
# BLAS: prefer Apple Accelerate on macOS (vecLib is highly tuned for
|
|
50
|
+
# Apple Silicon NEON/AMX and beats OpenBLAS substantially on the small
|
|
51
|
+
# matrices that show up in heterogeneous GNNs — many edge types × small
|
|
52
|
+
# per-type GEMMs). On Linux fall back to whatever find_package(BLAS) sees.
|
|
53
|
+
# ---------------------------------------------------------------------------
|
|
54
|
+
set(RELML_BLAS_VARIANT "none")
|
|
55
|
+
if(APPLE)
|
|
56
|
+
find_library(ACCELERATE_FRAMEWORK Accelerate)
|
|
57
|
+
if(ACCELERATE_FRAMEWORK)
|
|
58
|
+
set(BLAS_LIBRARIES "${ACCELERATE_FRAMEWORK}")
|
|
59
|
+
set(BLAS_INCLUDE_DIRS "")
|
|
60
|
+
set(BLAS_FOUND TRUE)
|
|
61
|
+
set(RELML_BLAS_VARIANT "Accelerate")
|
|
62
|
+
add_compile_definitions(RELML_USE_BLAS RELML_USE_ACCELERATE)
|
|
63
|
+
message(STATUS "BLAS: using Apple Accelerate (${ACCELERATE_FRAMEWORK})")
|
|
64
|
+
endif()
|
|
65
|
+
endif()
|
|
66
|
+
if(NOT BLAS_FOUND)
|
|
67
|
+
find_package(BLAS QUIET)
|
|
68
|
+
if(BLAS_FOUND)
|
|
69
|
+
set(RELML_BLAS_VARIANT "${BLAS_LIBRARIES}")
|
|
70
|
+
add_compile_definitions(RELML_USE_BLAS)
|
|
71
|
+
message(STATUS "BLAS: ${BLAS_LIBRARIES}")
|
|
72
|
+
else()
|
|
73
|
+
message(STATUS "BLAS not found — using scalar fallback")
|
|
74
|
+
endif()
|
|
75
|
+
endif()
|
|
76
|
+
|
|
77
|
+
# ---------------------------------------------------------------------------
|
|
78
|
+
# CUDA (optional)
|
|
79
|
+
# ---------------------------------------------------------------------------
|
|
80
|
+
option(RELML_USE_CUDA "Build CUDA backend for GPU training" OFF)
|
|
81
|
+
if(NOT CMAKE_CUDA_COMPILER)
|
|
82
|
+
get_filename_component(_cuda_root "${CUDAToolkit_INCLUDE_DIR}" DIRECTORY)
|
|
83
|
+
if(EXISTS "${_cuda_root}/bin/nvcc")
|
|
84
|
+
set(CMAKE_CUDA_COMPILER "${_cuda_root}/bin/nvcc" CACHE FILEPATH "CUDA compiler")
|
|
85
|
+
endif()
|
|
86
|
+
unset(_cuda_root)
|
|
87
|
+
endif()
|
|
88
|
+
if(RELML_USE_CUDA)
|
|
89
|
+
set(CMAKE_CUDA_ARCHITECTURES "52" CACHE STRING "CUDA architectures (52 = Maxwell GTX 980)")
|
|
90
|
+
find_package(CUDAToolkit REQUIRED)
|
|
91
|
+
enable_language(CUDA)
|
|
92
|
+
message(STATUS "CUDA found: building relml_cuda")
|
|
93
|
+
add_compile_definitions(RELML_CUDA)
|
|
94
|
+
add_library(relml_cuda STATIC
|
|
95
|
+
src/cuda/cuda_backend.cc
|
|
96
|
+
src/cuda/cuda_backend_impl.cu
|
|
97
|
+
)
|
|
98
|
+
set_target_properties(relml_cuda PROPERTIES
|
|
99
|
+
CUDA_SEPARABLE_COMPILATION ON
|
|
100
|
+
POSITION_INDEPENDENT_CODE ON
|
|
101
|
+
)
|
|
102
|
+
target_include_directories(relml_cuda PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
103
|
+
target_link_libraries(relml_cuda PUBLIC CUDA::cudart CUDA::cublas)
|
|
104
|
+
set_property(TARGET relml_cuda PROPERTY CUDA_ARCHITECTURES "52")
|
|
105
|
+
else()
|
|
106
|
+
message(STATUS "CUDA not found — GPU backend disabled")
|
|
107
|
+
endif()
|
|
108
|
+
|
|
109
|
+
# ---------------------------------------------------------------------------
|
|
110
|
+
# libcurl — only the standalone agent library needs it (a developer extra)
|
|
111
|
+
# ---------------------------------------------------------------------------
|
|
112
|
+
if(RELML_BUILD_EXTRAS)
|
|
113
|
+
find_package(CURL REQUIRED)
|
|
114
|
+
endif()
|
|
115
|
+
|
|
116
|
+
# ---------------------------------------------------------------------------
|
|
117
|
+
# nlohmann/json
|
|
118
|
+
# ---------------------------------------------------------------------------
|
|
119
|
+
include(FetchContent)
|
|
120
|
+
FetchContent_Declare(
|
|
121
|
+
nlohmann_json
|
|
122
|
+
URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz
|
|
123
|
+
)
|
|
124
|
+
FetchContent_MakeAvailable(nlohmann_json)
|
|
125
|
+
|
|
126
|
+
# ---------------------------------------------------------------------------
|
|
127
|
+
# Libraries
|
|
128
|
+
# ---------------------------------------------------------------------------
|
|
129
|
+
add_library(relml_database
|
|
130
|
+
src/database/Column.cpp
|
|
131
|
+
src/database/Table.cpp
|
|
132
|
+
src/database/Database.cpp
|
|
133
|
+
src/database/Typeinferrer.cpp
|
|
134
|
+
src/database/FKDetector.cpp
|
|
135
|
+
src/database/CSVLoader.cpp
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
add_library(relml_graph
|
|
139
|
+
src/graph/HeteroGraph.cpp
|
|
140
|
+
src/graph/Graphbuilder.cpp
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
add_library(relml_encoding
|
|
144
|
+
src/encoding/CategoricalEncoder.cpp
|
|
145
|
+
src/encoding/NumericalEncoder.cpp
|
|
146
|
+
src/encoding/TimestampEncoder.cpp
|
|
147
|
+
src/encoding/HeteroEncoder.cpp
|
|
148
|
+
)
|
|
149
|
+
if(OpenMP_CXX_FOUND)
|
|
150
|
+
target_link_libraries(relml_encoding PUBLIC OpenMP::OpenMP_CXX)
|
|
151
|
+
endif()
|
|
152
|
+
if(BLAS_FOUND)
|
|
153
|
+
target_link_libraries(relml_encoding PUBLIC ${BLAS_LIBRARIES})
|
|
154
|
+
target_include_directories(relml_encoding PRIVATE ${BLAS_INCLUDE_DIRS})
|
|
155
|
+
endif()
|
|
156
|
+
|
|
157
|
+
# Apple Clang 16 ICEs while compiling HeteroGraphSAGE.cpp with -fopenmp,
|
|
158
|
+
# even at -O0 and with no actual #pragma omp directives in the source —
|
|
159
|
+
# the mere combination of the OMP frontend with templated unordered_map
|
|
160
|
+
# machinery crashes the compiler. Sidestep by putting the hot kernels in
|
|
161
|
+
# their own template-free TU (compiled WITH OpenMP) and linking it from
|
|
162
|
+
# relml_gnn (which is NOT linked directly to OpenMP::OpenMP_CXX).
|
|
163
|
+
add_library(relml_sage_kernels src/gnn/SAGEKernels.cpp)
|
|
164
|
+
if(OpenMP_CXX_FOUND)
|
|
165
|
+
target_link_libraries(relml_sage_kernels PUBLIC OpenMP::OpenMP_CXX)
|
|
166
|
+
endif()
|
|
167
|
+
|
|
168
|
+
add_library(relml_gnn
|
|
169
|
+
src/gnn/HeteroGraphSAGE.cpp
|
|
170
|
+
src/gnn/MLPHead.cpp
|
|
171
|
+
)
|
|
172
|
+
target_link_libraries(relml_gnn PUBLIC relml_sage_kernels)
|
|
173
|
+
|
|
174
|
+
add_library(relml_training
|
|
175
|
+
src/training/Adam.cpp
|
|
176
|
+
src/training/Metrics.cpp
|
|
177
|
+
src/training/TaskBuilder.cpp
|
|
178
|
+
src/training/TaskParser.cpp
|
|
179
|
+
src/training/TaskSpec.cpp
|
|
180
|
+
src/training/Trainer.cpp
|
|
181
|
+
)
|
|
182
|
+
if(OpenMP_CXX_FOUND)
|
|
183
|
+
target_link_libraries(relml_training PUBLIC OpenMP::OpenMP_CXX)
|
|
184
|
+
endif()
|
|
185
|
+
target_link_libraries(relml_training PUBLIC nlohmann_json::nlohmann_json)
|
|
186
|
+
|
|
187
|
+
# ---------------------------------------------------------------------------
|
|
188
|
+
# Developer extras: the standalone agent library, C++ tests, and example tasks.
|
|
189
|
+
# Skipped for a lightweight Python-extension build (-DRELML_BUILD_EXTRAS=OFF).
|
|
190
|
+
# ---------------------------------------------------------------------------
|
|
191
|
+
if(RELML_BUILD_EXTRAS)
|
|
192
|
+
add_library(relml_agent
|
|
193
|
+
src/agent/agent.cpp
|
|
194
|
+
src/agent/ModelRegistry.cpp
|
|
195
|
+
src/agent/RelMLSystem.cpp
|
|
196
|
+
)
|
|
197
|
+
target_include_directories(relml_agent PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
198
|
+
target_link_libraries(relml_agent PUBLIC
|
|
199
|
+
CURL::libcurl
|
|
200
|
+
nlohmann_json::nlohmann_json
|
|
201
|
+
relml_training
|
|
202
|
+
relml_gnn
|
|
203
|
+
relml_encoding
|
|
204
|
+
relml_graph
|
|
205
|
+
relml_database
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
# Convenience function for example tasks
|
|
209
|
+
function(add_relml_task target source)
|
|
210
|
+
add_executable(${target} ${source})
|
|
211
|
+
target_link_libraries(${target} PRIVATE
|
|
212
|
+
relml_training
|
|
213
|
+
relml_gnn
|
|
214
|
+
relml_encoding
|
|
215
|
+
relml_graph
|
|
216
|
+
relml_database
|
|
217
|
+
${STDCXXFS}
|
|
218
|
+
)
|
|
219
|
+
endfunction()
|
|
220
|
+
|
|
221
|
+
# Tests
|
|
222
|
+
add_executable(test_database tests/test_database.cpp)
|
|
223
|
+
target_link_libraries(test_database relml_database ${STDCXXFS})
|
|
224
|
+
|
|
225
|
+
add_executable(test_graph tests/test_graph.cpp)
|
|
226
|
+
target_link_libraries(test_graph relml_database relml_graph ${STDCXXFS})
|
|
227
|
+
|
|
228
|
+
add_executable(test_encoding tests/test_encoding.cpp)
|
|
229
|
+
target_link_libraries(test_encoding relml_database relml_encoding ${STDCXXFS})
|
|
230
|
+
|
|
231
|
+
add_executable(test_gnn tests/test_gnn.cpp)
|
|
232
|
+
target_link_libraries(test_gnn relml_database relml_graph relml_encoding relml_gnn ${STDCXXFS})
|
|
233
|
+
|
|
234
|
+
add_executable(test_training tests/test_training.cpp)
|
|
235
|
+
target_link_libraries(test_training relml_training relml_gnn relml_encoding relml_graph relml_database ${STDCXXFS})
|
|
236
|
+
|
|
237
|
+
add_executable(test_grad_check tests/test_grad_check.cpp)
|
|
238
|
+
target_link_libraries(test_grad_check relml_training relml_gnn relml_encoding relml_graph relml_database ${STDCXXFS})
|
|
239
|
+
|
|
240
|
+
add_executable(bench_gnn tests/bench_gnn.cpp)
|
|
241
|
+
target_link_libraries(bench_gnn relml_training relml_gnn relml_encoding relml_graph relml_database ${STDCXXFS})
|
|
242
|
+
|
|
243
|
+
add_executable(test_agent tests/test_agent.cpp)
|
|
244
|
+
target_link_libraries(test_agent relml_agent)
|
|
245
|
+
|
|
246
|
+
add_executable(test_system tests/test_system.cpp)
|
|
247
|
+
target_link_libraries(test_system relml_agent ${STDCXXFS})
|
|
248
|
+
|
|
249
|
+
# Example tasks
|
|
250
|
+
add_relml_task(hm_churn src/example_tasks/hm_churn.cpp)
|
|
251
|
+
add_relml_task(ml1m_rating_classification src/example_tasks/ml1m_rating_classification.cpp)
|
|
252
|
+
add_relml_task(pl_outcome src/example_tasks/pl_outcome.cpp)
|
|
253
|
+
add_relml_task(avito_user_ad_visit src/example_tasks/avito_user_ad_visit.cpp)
|
|
254
|
+
add_relml_task(sunnyside_demand src/example_tasks/sunnyside_demand.cpp)
|
|
255
|
+
add_relml_task(sunnyside_slots src/example_tasks/sunnyside_slots.cpp)
|
|
256
|
+
endif()
|
|
257
|
+
|
|
258
|
+
# ---------------------------------------------------------------------------
|
|
259
|
+
# Python bindings (optional — only built when Python and pybind11 are available)
|
|
260
|
+
#
|
|
261
|
+
# DuckDB lives entirely on the Python side. The C++ binding receives plain
|
|
262
|
+
# Python dicts — no DuckDB headers or library needed here.
|
|
263
|
+
# ---------------------------------------------------------------------------
|
|
264
|
+
find_package(Python COMPONENTS Interpreter Development)
|
|
265
|
+
if(Python_FOUND)
|
|
266
|
+
FetchContent_Declare(
|
|
267
|
+
pybind11
|
|
268
|
+
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.12.0.tar.gz
|
|
269
|
+
DOWNLOAD_EXTRACT_TIMESTAMP true
|
|
270
|
+
)
|
|
271
|
+
FetchContent_MakeAvailable(pybind11)
|
|
272
|
+
|
|
273
|
+
pybind11_add_module(_relml_core bindings/relml_python.cpp)
|
|
274
|
+
target_link_libraries(_relml_core PRIVATE
|
|
275
|
+
relml_training
|
|
276
|
+
relml_gnn
|
|
277
|
+
relml_encoding
|
|
278
|
+
relml_graph
|
|
279
|
+
relml_database
|
|
280
|
+
)
|
|
281
|
+
if(OpenMP_CXX_FOUND)
|
|
282
|
+
target_link_libraries(_relml_core PRIVATE OpenMP::OpenMP_CXX)
|
|
283
|
+
endif()
|
|
284
|
+
|
|
285
|
+
if(DEFINED SKBUILD)
|
|
286
|
+
# Wheel build: install the freshly compiled extension into the package so
|
|
287
|
+
# scikit-build-core packages it (one correct .so per platform wheel).
|
|
288
|
+
install(TARGETS _relml_core LIBRARY DESTINATION guepard/qwery/relml)
|
|
289
|
+
else()
|
|
290
|
+
# Dev build: copy the .so into the source tree so it is importable without
|
|
291
|
+
# an install step. (Skipped under scikit-build to avoid dirtying the tree.)
|
|
292
|
+
add_custom_command(TARGET _relml_core POST_BUILD
|
|
293
|
+
COMMAND ${CMAKE_COMMAND} -E copy
|
|
294
|
+
$<TARGET_FILE:_relml_core>
|
|
295
|
+
${CMAKE_SOURCE_DIR}/python/guepard/qwery/relml/$<TARGET_FILE_NAME:_relml_core>
|
|
296
|
+
)
|
|
297
|
+
endif()
|
|
298
|
+
message(STATUS "Python bindings: enabled")
|
|
299
|
+
else()
|
|
300
|
+
message(STATUS "Python bindings: disabled (Python not found)")
|
|
301
|
+
endif()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Guepard Corp
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|