crca 1.4.0__py3-none-any.whl → 1.5.0__py3-none-any.whl
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.
- CRCA.py +172 -7
- MODEL_CARD.md +53 -0
- PKG-INFO +8 -2
- RELEASE_NOTES.md +17 -0
- STABILITY.md +19 -0
- architecture/hybrid/consistency_engine.py +362 -0
- architecture/hybrid/conversation_manager.py +421 -0
- architecture/hybrid/explanation_generator.py +452 -0
- architecture/hybrid/few_shot_learner.py +533 -0
- architecture/hybrid/graph_compressor.py +286 -0
- architecture/hybrid/hybrid_agent.py +4398 -0
- architecture/hybrid/language_compiler.py +623 -0
- architecture/hybrid/main,py +0 -0
- architecture/hybrid/reasoning_tracker.py +322 -0
- architecture/hybrid/self_verifier.py +524 -0
- architecture/hybrid/task_decomposer.py +567 -0
- architecture/hybrid/text_corrector.py +341 -0
- benchmark_results/crca_core_benchmarks.json +178 -0
- branches/crca_sd/crca_sd_realtime.py +6 -2
- branches/general_agent/__init__.py +102 -0
- branches/general_agent/general_agent.py +1400 -0
- branches/general_agent/personality.py +169 -0
- branches/general_agent/utils/__init__.py +19 -0
- branches/general_agent/utils/prompt_builder.py +170 -0
- {crca-1.4.0.dist-info → crca-1.5.0.dist-info}/METADATA +8 -2
- {crca-1.4.0.dist-info → crca-1.5.0.dist-info}/RECORD +303 -20
- crca_core/__init__.py +35 -0
- crca_core/benchmarks/__init__.py +14 -0
- crca_core/benchmarks/synthetic_scm.py +103 -0
- crca_core/core/__init__.py +23 -0
- crca_core/core/api.py +120 -0
- crca_core/core/estimate.py +208 -0
- crca_core/core/godclass.py +72 -0
- crca_core/core/intervention_design.py +174 -0
- crca_core/core/lifecycle.py +48 -0
- crca_core/discovery/__init__.py +9 -0
- crca_core/discovery/tabular.py +193 -0
- crca_core/identify/__init__.py +171 -0
- crca_core/identify/backdoor.py +39 -0
- crca_core/identify/frontdoor.py +48 -0
- crca_core/identify/graph.py +106 -0
- crca_core/identify/id_algorithm.py +43 -0
- crca_core/identify/iv.py +48 -0
- crca_core/models/__init__.py +67 -0
- crca_core/models/provenance.py +56 -0
- crca_core/models/refusal.py +39 -0
- crca_core/models/result.py +83 -0
- crca_core/models/spec.py +151 -0
- crca_core/models/validation.py +68 -0
- crca_core/scm/__init__.py +9 -0
- crca_core/scm/linear_gaussian.py +198 -0
- crca_core/timeseries/__init__.py +6 -0
- crca_core/timeseries/pcmci.py +181 -0
- crca_llm/__init__.py +12 -0
- crca_llm/client.py +85 -0
- crca_llm/coauthor.py +118 -0
- crca_llm/orchestrator.py +289 -0
- crca_llm/types.py +21 -0
- crca_reasoning/__init__.py +16 -0
- crca_reasoning/critique.py +54 -0
- crca_reasoning/godclass.py +206 -0
- crca_reasoning/memory.py +24 -0
- crca_reasoning/rationale.py +10 -0
- crca_reasoning/react_controller.py +81 -0
- crca_reasoning/tool_router.py +97 -0
- crca_reasoning/types.py +40 -0
- crca_sd/__init__.py +15 -0
- crca_sd/crca_sd_core.py +2 -0
- crca_sd/crca_sd_governance.py +2 -0
- crca_sd/crca_sd_mpc.py +2 -0
- crca_sd/crca_sd_realtime.py +2 -0
- crca_sd/crca_sd_tui.py +2 -0
- cuda-keyring_1.1-1_all.deb +0 -0
- cuda-keyring_1.1-1_all.deb.1 +0 -0
- docs/IMAGE_ANNOTATION_USAGE.md +539 -0
- docs/INSTALL_DEEPSPEED.md +125 -0
- docs/api/branches/crca-cg.md +19 -0
- docs/api/branches/crca-q.md +27 -0
- docs/api/branches/crca-sd.md +37 -0
- docs/api/branches/general-agent.md +24 -0
- docs/api/branches/overview.md +19 -0
- docs/api/crca/agent-methods.md +62 -0
- docs/api/crca/operations.md +79 -0
- docs/api/crca/overview.md +32 -0
- docs/api/image-annotation/engine.md +52 -0
- docs/api/image-annotation/overview.md +17 -0
- docs/api/schemas/annotation.md +34 -0
- docs/api/schemas/core-schemas.md +82 -0
- docs/api/schemas/overview.md +32 -0
- docs/api/schemas/policy.md +30 -0
- docs/api/utils/conversation.md +22 -0
- docs/api/utils/graph-reasoner.md +32 -0
- docs/api/utils/overview.md +21 -0
- docs/api/utils/router.md +19 -0
- docs/api/utils/utilities.md +97 -0
- docs/architecture/causal-graphs.md +41 -0
- docs/architecture/data-flow.md +29 -0
- docs/architecture/design-principles.md +33 -0
- docs/architecture/hybrid-agent/components.md +38 -0
- docs/architecture/hybrid-agent/consistency.md +26 -0
- docs/architecture/hybrid-agent/overview.md +44 -0
- docs/architecture/hybrid-agent/reasoning.md +22 -0
- docs/architecture/llm-integration.md +26 -0
- docs/architecture/modular-structure.md +37 -0
- docs/architecture/overview.md +69 -0
- docs/architecture/policy-engine-arch.md +29 -0
- docs/branches/crca-cg/corposwarm.md +39 -0
- docs/branches/crca-cg/esg-scoring.md +30 -0
- docs/branches/crca-cg/multi-agent.md +35 -0
- docs/branches/crca-cg/overview.md +40 -0
- docs/branches/crca-q/alternative-data.md +55 -0
- docs/branches/crca-q/architecture.md +71 -0
- docs/branches/crca-q/backtesting.md +45 -0
- docs/branches/crca-q/causal-engine.md +33 -0
- docs/branches/crca-q/execution.md +39 -0
- docs/branches/crca-q/market-data.md +60 -0
- docs/branches/crca-q/overview.md +58 -0
- docs/branches/crca-q/philosophy.md +60 -0
- docs/branches/crca-q/portfolio-optimization.md +66 -0
- docs/branches/crca-q/risk-management.md +102 -0
- docs/branches/crca-q/setup.md +65 -0
- docs/branches/crca-q/signal-generation.md +61 -0
- docs/branches/crca-q/signal-validation.md +43 -0
- docs/branches/crca-sd/core.md +84 -0
- docs/branches/crca-sd/governance.md +53 -0
- docs/branches/crca-sd/mpc-solver.md +65 -0
- docs/branches/crca-sd/overview.md +59 -0
- docs/branches/crca-sd/realtime.md +28 -0
- docs/branches/crca-sd/tui.md +20 -0
- docs/branches/general-agent/overview.md +37 -0
- docs/branches/general-agent/personality.md +36 -0
- docs/branches/general-agent/prompt-builder.md +30 -0
- docs/changelog/index.md +79 -0
- docs/contributing/code-style.md +69 -0
- docs/contributing/documentation.md +43 -0
- docs/contributing/overview.md +29 -0
- docs/contributing/testing.md +29 -0
- docs/core/crcagent/async-operations.md +65 -0
- docs/core/crcagent/automatic-extraction.md +107 -0
- docs/core/crcagent/batch-prediction.md +80 -0
- docs/core/crcagent/bayesian-inference.md +60 -0
- docs/core/crcagent/causal-graph.md +92 -0
- docs/core/crcagent/counterfactuals.md +96 -0
- docs/core/crcagent/deterministic-simulation.md +78 -0
- docs/core/crcagent/dual-mode-operation.md +82 -0
- docs/core/crcagent/initialization.md +88 -0
- docs/core/crcagent/optimization.md +65 -0
- docs/core/crcagent/overview.md +63 -0
- docs/core/crcagent/time-series.md +57 -0
- docs/core/schemas/annotation.md +30 -0
- docs/core/schemas/core-schemas.md +82 -0
- docs/core/schemas/overview.md +30 -0
- docs/core/schemas/policy.md +41 -0
- docs/core/templates/base-agent.md +31 -0
- docs/core/templates/feature-mixins.md +31 -0
- docs/core/templates/overview.md +29 -0
- docs/core/templates/templates-guide.md +75 -0
- docs/core/tools/mcp-client.md +34 -0
- docs/core/tools/overview.md +24 -0
- docs/core/utils/conversation.md +27 -0
- docs/core/utils/graph-reasoner.md +29 -0
- docs/core/utils/overview.md +27 -0
- docs/core/utils/router.md +27 -0
- docs/core/utils/utilities.md +97 -0
- docs/css/custom.css +84 -0
- docs/examples/basic-usage.md +57 -0
- docs/examples/general-agent/general-agent-examples.md +50 -0
- docs/examples/hybrid-agent/hybrid-agent-examples.md +56 -0
- docs/examples/image-annotation/image-annotation-examples.md +54 -0
- docs/examples/integration/integration-examples.md +58 -0
- docs/examples/overview.md +37 -0
- docs/examples/trading/trading-examples.md +46 -0
- docs/features/causal-reasoning/advanced-topics.md +101 -0
- docs/features/causal-reasoning/counterfactuals.md +43 -0
- docs/features/causal-reasoning/do-calculus.md +50 -0
- docs/features/causal-reasoning/overview.md +47 -0
- docs/features/causal-reasoning/structural-models.md +52 -0
- docs/features/hybrid-agent/advanced-components.md +55 -0
- docs/features/hybrid-agent/core-components.md +64 -0
- docs/features/hybrid-agent/overview.md +34 -0
- docs/features/image-annotation/engine.md +82 -0
- docs/features/image-annotation/features.md +113 -0
- docs/features/image-annotation/integration.md +75 -0
- docs/features/image-annotation/overview.md +53 -0
- docs/features/image-annotation/quickstart.md +73 -0
- docs/features/policy-engine/doctrine-ledger.md +105 -0
- docs/features/policy-engine/monitoring.md +44 -0
- docs/features/policy-engine/mpc-control.md +89 -0
- docs/features/policy-engine/overview.md +46 -0
- docs/getting-started/configuration.md +225 -0
- docs/getting-started/first-agent.md +164 -0
- docs/getting-started/installation.md +144 -0
- docs/getting-started/quickstart.md +137 -0
- docs/index.md +118 -0
- docs/js/mathjax.js +13 -0
- docs/lrm/discovery_proof_notes.md +25 -0
- docs/lrm/finetune_full.md +83 -0
- docs/lrm/math_appendix.md +120 -0
- docs/lrm/overview.md +32 -0
- docs/mkdocs.yml +238 -0
- docs/stylesheets/extra.css +21 -0
- docs_generated/crca_core/CounterfactualResult.md +12 -0
- docs_generated/crca_core/DiscoveryHypothesisResult.md +13 -0
- docs_generated/crca_core/DraftSpec.md +13 -0
- docs_generated/crca_core/EstimateResult.md +13 -0
- docs_generated/crca_core/IdentificationResult.md +17 -0
- docs_generated/crca_core/InterventionDesignResult.md +12 -0
- docs_generated/crca_core/LockedSpec.md +15 -0
- docs_generated/crca_core/RefusalResult.md +12 -0
- docs_generated/crca_core/ValidationReport.md +9 -0
- docs_generated/crca_core/index.md +13 -0
- examples/general_agent_example.py +277 -0
- examples/general_agent_quickstart.py +202 -0
- examples/general_agent_simple.py +92 -0
- examples/hybrid_agent_auto_extraction.py +84 -0
- examples/hybrid_agent_dictionary_demo.py +104 -0
- examples/hybrid_agent_enhanced.py +179 -0
- examples/hybrid_agent_general_knowledge.py +107 -0
- examples/image_annotation_quickstart.py +328 -0
- examples/test_hybrid_fixes.py +77 -0
- image_annotation/__init__.py +27 -0
- image_annotation/annotation_engine.py +2593 -0
- install_cuda_wsl2.sh +59 -0
- install_deepspeed.sh +56 -0
- install_deepspeed_simple.sh +87 -0
- mkdocs.yml +252 -0
- ollama/Modelfile +8 -0
- prompts/__init__.py +2 -1
- prompts/default_crca.py +9 -1
- prompts/general_agent.py +227 -0
- prompts/image_annotation.py +56 -0
- pyproject.toml +17 -2
- requirements-docs.txt +10 -0
- requirements.txt +21 -2
- schemas/__init__.py +26 -1
- schemas/annotation.py +222 -0
- schemas/conversation.py +193 -0
- schemas/hybrid.py +211 -0
- schemas/reasoning.py +276 -0
- schemas_export/crca_core/CounterfactualResult.schema.json +108 -0
- schemas_export/crca_core/DiscoveryHypothesisResult.schema.json +113 -0
- schemas_export/crca_core/DraftSpec.schema.json +635 -0
- schemas_export/crca_core/EstimateResult.schema.json +113 -0
- schemas_export/crca_core/IdentificationResult.schema.json +145 -0
- schemas_export/crca_core/InterventionDesignResult.schema.json +111 -0
- schemas_export/crca_core/LockedSpec.schema.json +646 -0
- schemas_export/crca_core/RefusalResult.schema.json +90 -0
- schemas_export/crca_core/ValidationReport.schema.json +62 -0
- scripts/build_lrm_dataset.py +80 -0
- scripts/export_crca_core_schemas.py +54 -0
- scripts/export_hf_lrm.py +37 -0
- scripts/export_ollama_gguf.py +45 -0
- scripts/generate_changelog.py +157 -0
- scripts/generate_crca_core_docs_from_schemas.py +86 -0
- scripts/run_crca_core_benchmarks.py +163 -0
- scripts/run_full_finetune.py +198 -0
- scripts/run_lrm_eval.py +31 -0
- templates/graph_management.py +29 -0
- tests/conftest.py +9 -0
- tests/test_core.py +2 -3
- tests/test_crca_core_discovery_tabular.py +15 -0
- tests/test_crca_core_estimate_dowhy.py +36 -0
- tests/test_crca_core_identify.py +18 -0
- tests/test_crca_core_intervention_design.py +36 -0
- tests/test_crca_core_linear_gaussian_scm.py +69 -0
- tests/test_crca_core_spec.py +25 -0
- tests/test_crca_core_timeseries_pcmci.py +15 -0
- tests/test_crca_llm_coauthor.py +12 -0
- tests/test_crca_llm_orchestrator.py +80 -0
- tests/test_hybrid_agent_llm_enhanced.py +556 -0
- tests/test_image_annotation_demo.py +376 -0
- tests/test_image_annotation_operational.py +408 -0
- tests/test_image_annotation_unit.py +551 -0
- tests/test_training_moe.py +13 -0
- training/__init__.py +42 -0
- training/datasets.py +140 -0
- training/deepspeed_zero2_0_5b.json +22 -0
- training/deepspeed_zero2_1_5b.json +22 -0
- training/deepspeed_zero3_0_5b.json +28 -0
- training/deepspeed_zero3_14b.json +28 -0
- training/deepspeed_zero3_h100_3gpu.json +20 -0
- training/deepspeed_zero3_offload.json +28 -0
- training/eval.py +92 -0
- training/finetune.py +516 -0
- training/public_datasets.py +89 -0
- training_data/react_train.jsonl +7473 -0
- utils/agent_discovery.py +311 -0
- utils/batch_processor.py +317 -0
- utils/conversation.py +78 -0
- utils/edit_distance.py +118 -0
- utils/formatter.py +33 -0
- utils/graph_reasoner.py +530 -0
- utils/rate_limiter.py +283 -0
- utils/router.py +2 -2
- utils/tool_discovery.py +307 -0
- webui/__init__.py +10 -0
- webui/app.py +229 -0
- webui/config.py +104 -0
- webui/static/css/style.css +332 -0
- webui/static/js/main.js +284 -0
- webui/templates/index.html +42 -0
- tests/test_crca_excel.py +0 -166
- tests/test_data_broker.py +0 -424
- tests/test_palantir.py +0 -349
- {crca-1.4.0.dist-info → crca-1.5.0.dist-info}/WHEEL +0 -0
- {crca-1.4.0.dist-info → crca-1.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"AssumptionItem": {
|
|
4
|
+
"properties": {
|
|
5
|
+
"name": {
|
|
6
|
+
"minLength": 1,
|
|
7
|
+
"title": "Name",
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"status": {
|
|
11
|
+
"$ref": "#/$defs/AssumptionStatus",
|
|
12
|
+
"default": "unknown"
|
|
13
|
+
},
|
|
14
|
+
"description": {
|
|
15
|
+
"anyOf": [
|
|
16
|
+
{
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "null"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"default": null,
|
|
24
|
+
"title": "Description"
|
|
25
|
+
},
|
|
26
|
+
"evidence": {
|
|
27
|
+
"anyOf": [
|
|
28
|
+
{
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "null"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"default": null,
|
|
36
|
+
"title": "Evidence"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"name"
|
|
41
|
+
],
|
|
42
|
+
"title": "AssumptionItem",
|
|
43
|
+
"type": "object"
|
|
44
|
+
},
|
|
45
|
+
"AssumptionSpec": {
|
|
46
|
+
"properties": {
|
|
47
|
+
"items": {
|
|
48
|
+
"items": {
|
|
49
|
+
"$ref": "#/$defs/AssumptionItem"
|
|
50
|
+
},
|
|
51
|
+
"title": "Items",
|
|
52
|
+
"type": "array"
|
|
53
|
+
},
|
|
54
|
+
"falsification_plan": {
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"title": "Falsification Plan",
|
|
59
|
+
"type": "array"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"title": "AssumptionSpec",
|
|
63
|
+
"type": "object"
|
|
64
|
+
},
|
|
65
|
+
"AssumptionStatus": {
|
|
66
|
+
"enum": [
|
|
67
|
+
"declared",
|
|
68
|
+
"contested",
|
|
69
|
+
"violated",
|
|
70
|
+
"unknown"
|
|
71
|
+
],
|
|
72
|
+
"title": "AssumptionStatus",
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"CausalGraphSpec": {
|
|
76
|
+
"properties": {
|
|
77
|
+
"nodes": {
|
|
78
|
+
"items": {
|
|
79
|
+
"$ref": "#/$defs/NodeSpec"
|
|
80
|
+
},
|
|
81
|
+
"title": "Nodes",
|
|
82
|
+
"type": "array"
|
|
83
|
+
},
|
|
84
|
+
"edges": {
|
|
85
|
+
"items": {
|
|
86
|
+
"$ref": "#/$defs/EdgeSpec"
|
|
87
|
+
},
|
|
88
|
+
"title": "Edges",
|
|
89
|
+
"type": "array"
|
|
90
|
+
},
|
|
91
|
+
"latent_confounders": {
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"title": "Latent Confounders",
|
|
96
|
+
"type": "array"
|
|
97
|
+
},
|
|
98
|
+
"notes": {
|
|
99
|
+
"anyOf": [
|
|
100
|
+
{
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "null"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"default": null,
|
|
108
|
+
"title": "Notes"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"title": "CausalGraphSpec",
|
|
112
|
+
"type": "object"
|
|
113
|
+
},
|
|
114
|
+
"DataColumnSpec": {
|
|
115
|
+
"properties": {
|
|
116
|
+
"name": {
|
|
117
|
+
"minLength": 1,
|
|
118
|
+
"title": "Name",
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"dtype": {
|
|
122
|
+
"minLength": 1,
|
|
123
|
+
"title": "Dtype",
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"allowed_range": {
|
|
127
|
+
"anyOf": [
|
|
128
|
+
{
|
|
129
|
+
"maxItems": 2,
|
|
130
|
+
"minItems": 2,
|
|
131
|
+
"prefixItems": [
|
|
132
|
+
{
|
|
133
|
+
"type": "number"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "number"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"type": "array"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"type": "null"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"default": null,
|
|
146
|
+
"title": "Allowed Range"
|
|
147
|
+
},
|
|
148
|
+
"missingness_expected": {
|
|
149
|
+
"anyOf": [
|
|
150
|
+
{
|
|
151
|
+
"maximum": 1.0,
|
|
152
|
+
"minimum": 0.0,
|
|
153
|
+
"type": "number"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "null"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"default": null,
|
|
160
|
+
"title": "Missingness Expected"
|
|
161
|
+
},
|
|
162
|
+
"unit": {
|
|
163
|
+
"anyOf": [
|
|
164
|
+
{
|
|
165
|
+
"type": "string"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"type": "null"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"default": null,
|
|
172
|
+
"title": "Unit"
|
|
173
|
+
},
|
|
174
|
+
"description": {
|
|
175
|
+
"anyOf": [
|
|
176
|
+
{
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"type": "null"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"default": null,
|
|
184
|
+
"title": "Description"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"required": [
|
|
188
|
+
"name",
|
|
189
|
+
"dtype"
|
|
190
|
+
],
|
|
191
|
+
"title": "DataColumnSpec",
|
|
192
|
+
"type": "object"
|
|
193
|
+
},
|
|
194
|
+
"DataSpec": {
|
|
195
|
+
"properties": {
|
|
196
|
+
"dataset_name": {
|
|
197
|
+
"anyOf": [
|
|
198
|
+
{
|
|
199
|
+
"type": "string"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"type": "null"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"default": null,
|
|
206
|
+
"title": "Dataset Name"
|
|
207
|
+
},
|
|
208
|
+
"dataset_hash": {
|
|
209
|
+
"anyOf": [
|
|
210
|
+
{
|
|
211
|
+
"type": "string"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"type": "null"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"default": null,
|
|
218
|
+
"title": "Dataset Hash"
|
|
219
|
+
},
|
|
220
|
+
"columns": {
|
|
221
|
+
"items": {
|
|
222
|
+
"$ref": "#/$defs/DataColumnSpec"
|
|
223
|
+
},
|
|
224
|
+
"title": "Columns",
|
|
225
|
+
"type": "array"
|
|
226
|
+
},
|
|
227
|
+
"time_index": {
|
|
228
|
+
"anyOf": [
|
|
229
|
+
{
|
|
230
|
+
"$ref": "#/$defs/TimeIndexSpec"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"type": "null"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"default": null
|
|
237
|
+
},
|
|
238
|
+
"entity_index": {
|
|
239
|
+
"anyOf": [
|
|
240
|
+
{
|
|
241
|
+
"$ref": "#/$defs/EntityIndexSpec"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"type": "null"
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
"default": null
|
|
248
|
+
},
|
|
249
|
+
"measurement_error_notes": {
|
|
250
|
+
"anyOf": [
|
|
251
|
+
{
|
|
252
|
+
"type": "string"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"type": "null"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"default": null,
|
|
259
|
+
"title": "Measurement Error Notes"
|
|
260
|
+
},
|
|
261
|
+
"proxy_variables": {
|
|
262
|
+
"additionalProperties": {
|
|
263
|
+
"type": "string"
|
|
264
|
+
},
|
|
265
|
+
"title": "Proxy Variables",
|
|
266
|
+
"type": "object"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"title": "DataSpec",
|
|
270
|
+
"type": "object"
|
|
271
|
+
},
|
|
272
|
+
"EdgeSpec": {
|
|
273
|
+
"properties": {
|
|
274
|
+
"source": {
|
|
275
|
+
"minLength": 1,
|
|
276
|
+
"title": "Source",
|
|
277
|
+
"type": "string"
|
|
278
|
+
},
|
|
279
|
+
"target": {
|
|
280
|
+
"minLength": 1,
|
|
281
|
+
"title": "Target",
|
|
282
|
+
"type": "string"
|
|
283
|
+
},
|
|
284
|
+
"lag": {
|
|
285
|
+
"anyOf": [
|
|
286
|
+
{
|
|
287
|
+
"type": "integer"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"type": "null"
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"default": null,
|
|
294
|
+
"title": "Lag"
|
|
295
|
+
},
|
|
296
|
+
"description": {
|
|
297
|
+
"anyOf": [
|
|
298
|
+
{
|
|
299
|
+
"type": "string"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"type": "null"
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
"default": null,
|
|
306
|
+
"title": "Description"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"required": [
|
|
310
|
+
"source",
|
|
311
|
+
"target"
|
|
312
|
+
],
|
|
313
|
+
"title": "EdgeSpec",
|
|
314
|
+
"type": "object"
|
|
315
|
+
},
|
|
316
|
+
"EntityIndexSpec": {
|
|
317
|
+
"properties": {
|
|
318
|
+
"entity_id_column": {
|
|
319
|
+
"minLength": 1,
|
|
320
|
+
"title": "Entity Id Column",
|
|
321
|
+
"type": "string"
|
|
322
|
+
},
|
|
323
|
+
"time_column": {
|
|
324
|
+
"minLength": 1,
|
|
325
|
+
"title": "Time Column",
|
|
326
|
+
"type": "string"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"required": [
|
|
330
|
+
"entity_id_column",
|
|
331
|
+
"time_column"
|
|
332
|
+
],
|
|
333
|
+
"title": "EntityIndexSpec",
|
|
334
|
+
"type": "object"
|
|
335
|
+
},
|
|
336
|
+
"NodeSpec": {
|
|
337
|
+
"properties": {
|
|
338
|
+
"name": {
|
|
339
|
+
"minLength": 1,
|
|
340
|
+
"title": "Name",
|
|
341
|
+
"type": "string"
|
|
342
|
+
},
|
|
343
|
+
"observed": {
|
|
344
|
+
"default": true,
|
|
345
|
+
"title": "Observed",
|
|
346
|
+
"type": "boolean"
|
|
347
|
+
},
|
|
348
|
+
"unit": {
|
|
349
|
+
"anyOf": [
|
|
350
|
+
{
|
|
351
|
+
"type": "string"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"type": "null"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"default": null,
|
|
358
|
+
"title": "Unit"
|
|
359
|
+
},
|
|
360
|
+
"description": {
|
|
361
|
+
"anyOf": [
|
|
362
|
+
{
|
|
363
|
+
"type": "string"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"type": "null"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"default": null,
|
|
370
|
+
"title": "Description"
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"required": [
|
|
374
|
+
"name"
|
|
375
|
+
],
|
|
376
|
+
"title": "NodeSpec",
|
|
377
|
+
"type": "object"
|
|
378
|
+
},
|
|
379
|
+
"NoiseSpec": {
|
|
380
|
+
"properties": {
|
|
381
|
+
"distribution": {
|
|
382
|
+
"const": "gaussian",
|
|
383
|
+
"default": "gaussian",
|
|
384
|
+
"title": "Distribution",
|
|
385
|
+
"type": "string"
|
|
386
|
+
},
|
|
387
|
+
"params": {
|
|
388
|
+
"additionalProperties": true,
|
|
389
|
+
"title": "Params",
|
|
390
|
+
"type": "object"
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"title": "NoiseSpec",
|
|
394
|
+
"type": "object"
|
|
395
|
+
},
|
|
396
|
+
"RoleSpec": {
|
|
397
|
+
"properties": {
|
|
398
|
+
"treatments": {
|
|
399
|
+
"items": {
|
|
400
|
+
"type": "string"
|
|
401
|
+
},
|
|
402
|
+
"title": "Treatments",
|
|
403
|
+
"type": "array"
|
|
404
|
+
},
|
|
405
|
+
"outcomes": {
|
|
406
|
+
"items": {
|
|
407
|
+
"type": "string"
|
|
408
|
+
},
|
|
409
|
+
"title": "Outcomes",
|
|
410
|
+
"type": "array"
|
|
411
|
+
},
|
|
412
|
+
"mediators": {
|
|
413
|
+
"items": {
|
|
414
|
+
"type": "string"
|
|
415
|
+
},
|
|
416
|
+
"title": "Mediators",
|
|
417
|
+
"type": "array"
|
|
418
|
+
},
|
|
419
|
+
"instruments": {
|
|
420
|
+
"items": {
|
|
421
|
+
"type": "string"
|
|
422
|
+
},
|
|
423
|
+
"title": "Instruments",
|
|
424
|
+
"type": "array"
|
|
425
|
+
},
|
|
426
|
+
"adjustment_candidates": {
|
|
427
|
+
"items": {
|
|
428
|
+
"type": "string"
|
|
429
|
+
},
|
|
430
|
+
"title": "Adjustment Candidates",
|
|
431
|
+
"type": "array"
|
|
432
|
+
},
|
|
433
|
+
"prohibited_controls": {
|
|
434
|
+
"items": {
|
|
435
|
+
"type": "string"
|
|
436
|
+
},
|
|
437
|
+
"title": "Prohibited Controls",
|
|
438
|
+
"type": "array"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"title": "RoleSpec",
|
|
442
|
+
"type": "object"
|
|
443
|
+
},
|
|
444
|
+
"SCMSpec": {
|
|
445
|
+
"description": "Explicit SCM required for counterfactuals.",
|
|
446
|
+
"properties": {
|
|
447
|
+
"scm_type": {
|
|
448
|
+
"const": "linear_gaussian",
|
|
449
|
+
"default": "linear_gaussian",
|
|
450
|
+
"title": "Scm Type",
|
|
451
|
+
"type": "string"
|
|
452
|
+
},
|
|
453
|
+
"equations": {
|
|
454
|
+
"items": {
|
|
455
|
+
"$ref": "#/$defs/StructuralEquationSpec"
|
|
456
|
+
},
|
|
457
|
+
"title": "Equations",
|
|
458
|
+
"type": "array"
|
|
459
|
+
},
|
|
460
|
+
"noise_cov": {
|
|
461
|
+
"anyOf": [
|
|
462
|
+
{
|
|
463
|
+
"items": {
|
|
464
|
+
"items": {
|
|
465
|
+
"type": "number"
|
|
466
|
+
},
|
|
467
|
+
"type": "array"
|
|
468
|
+
},
|
|
469
|
+
"type": "array"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"type": "null"
|
|
473
|
+
}
|
|
474
|
+
],
|
|
475
|
+
"default": null,
|
|
476
|
+
"title": "Noise Cov"
|
|
477
|
+
},
|
|
478
|
+
"intervention_semantics": {
|
|
479
|
+
"additionalProperties": {
|
|
480
|
+
"type": "string"
|
|
481
|
+
},
|
|
482
|
+
"title": "Intervention Semantics",
|
|
483
|
+
"type": "object"
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
"title": "SCMSpec",
|
|
487
|
+
"type": "object"
|
|
488
|
+
},
|
|
489
|
+
"SpecStatus": {
|
|
490
|
+
"enum": [
|
|
491
|
+
"draft",
|
|
492
|
+
"locked"
|
|
493
|
+
],
|
|
494
|
+
"title": "SpecStatus",
|
|
495
|
+
"type": "string"
|
|
496
|
+
},
|
|
497
|
+
"StructuralEquationSpec": {
|
|
498
|
+
"description": "Represents one structural equation V = f(Pa(V), U_V).\n\nv0.1: store both a human-readable formula and an executable parameterization\nfor supported SCM families.",
|
|
499
|
+
"properties": {
|
|
500
|
+
"variable": {
|
|
501
|
+
"minLength": 1,
|
|
502
|
+
"title": "Variable",
|
|
503
|
+
"type": "string"
|
|
504
|
+
},
|
|
505
|
+
"parents": {
|
|
506
|
+
"items": {
|
|
507
|
+
"type": "string"
|
|
508
|
+
},
|
|
509
|
+
"title": "Parents",
|
|
510
|
+
"type": "array"
|
|
511
|
+
},
|
|
512
|
+
"form": {
|
|
513
|
+
"const": "linear_gaussian",
|
|
514
|
+
"default": "linear_gaussian",
|
|
515
|
+
"title": "Form",
|
|
516
|
+
"type": "string"
|
|
517
|
+
},
|
|
518
|
+
"coefficients": {
|
|
519
|
+
"additionalProperties": {
|
|
520
|
+
"type": "number"
|
|
521
|
+
},
|
|
522
|
+
"title": "Coefficients",
|
|
523
|
+
"type": "object"
|
|
524
|
+
},
|
|
525
|
+
"intercept": {
|
|
526
|
+
"default": 0.0,
|
|
527
|
+
"title": "Intercept",
|
|
528
|
+
"type": "number"
|
|
529
|
+
},
|
|
530
|
+
"noise": {
|
|
531
|
+
"$ref": "#/$defs/NoiseSpec"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"required": [
|
|
535
|
+
"variable"
|
|
536
|
+
],
|
|
537
|
+
"title": "StructuralEquationSpec",
|
|
538
|
+
"type": "object"
|
|
539
|
+
},
|
|
540
|
+
"TimeIndexSpec": {
|
|
541
|
+
"properties": {
|
|
542
|
+
"column": {
|
|
543
|
+
"minLength": 1,
|
|
544
|
+
"title": "Column",
|
|
545
|
+
"type": "string"
|
|
546
|
+
},
|
|
547
|
+
"frequency": {
|
|
548
|
+
"anyOf": [
|
|
549
|
+
{
|
|
550
|
+
"type": "string"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"type": "null"
|
|
554
|
+
}
|
|
555
|
+
],
|
|
556
|
+
"default": null,
|
|
557
|
+
"title": "Frequency"
|
|
558
|
+
},
|
|
559
|
+
"timezone": {
|
|
560
|
+
"anyOf": [
|
|
561
|
+
{
|
|
562
|
+
"type": "string"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"type": "null"
|
|
566
|
+
}
|
|
567
|
+
],
|
|
568
|
+
"default": null,
|
|
569
|
+
"title": "Timezone"
|
|
570
|
+
},
|
|
571
|
+
"irregular_sampling_policy": {
|
|
572
|
+
"anyOf": [
|
|
573
|
+
{
|
|
574
|
+
"type": "string"
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"type": "null"
|
|
578
|
+
}
|
|
579
|
+
],
|
|
580
|
+
"default": null,
|
|
581
|
+
"title": "Irregular Sampling Policy"
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"required": [
|
|
585
|
+
"column"
|
|
586
|
+
],
|
|
587
|
+
"title": "TimeIndexSpec",
|
|
588
|
+
"type": "object"
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
"description": "Locked spec (authoritative for identification/estimation/simulation semantics).",
|
|
592
|
+
"properties": {
|
|
593
|
+
"status": {
|
|
594
|
+
"$ref": "#/$defs/SpecStatus",
|
|
595
|
+
"default": "locked"
|
|
596
|
+
},
|
|
597
|
+
"spec_hash": {
|
|
598
|
+
"title": "Spec Hash",
|
|
599
|
+
"type": "string"
|
|
600
|
+
},
|
|
601
|
+
"approvals": {
|
|
602
|
+
"items": {
|
|
603
|
+
"type": "string"
|
|
604
|
+
},
|
|
605
|
+
"title": "Approvals",
|
|
606
|
+
"type": "array"
|
|
607
|
+
},
|
|
608
|
+
"locked_at_utc": {
|
|
609
|
+
"title": "Locked At Utc",
|
|
610
|
+
"type": "string"
|
|
611
|
+
},
|
|
612
|
+
"data": {
|
|
613
|
+
"$ref": "#/$defs/DataSpec"
|
|
614
|
+
},
|
|
615
|
+
"graph": {
|
|
616
|
+
"$ref": "#/$defs/CausalGraphSpec"
|
|
617
|
+
},
|
|
618
|
+
"roles": {
|
|
619
|
+
"$ref": "#/$defs/RoleSpec"
|
|
620
|
+
},
|
|
621
|
+
"assumptions": {
|
|
622
|
+
"$ref": "#/$defs/AssumptionSpec"
|
|
623
|
+
},
|
|
624
|
+
"scm": {
|
|
625
|
+
"anyOf": [
|
|
626
|
+
{
|
|
627
|
+
"$ref": "#/$defs/SCMSpec"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"type": "null"
|
|
631
|
+
}
|
|
632
|
+
],
|
|
633
|
+
"default": null
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
"required": [
|
|
637
|
+
"spec_hash",
|
|
638
|
+
"locked_at_utc",
|
|
639
|
+
"data",
|
|
640
|
+
"graph",
|
|
641
|
+
"roles",
|
|
642
|
+
"assumptions"
|
|
643
|
+
],
|
|
644
|
+
"title": "LockedSpec",
|
|
645
|
+
"type": "object"
|
|
646
|
+
}
|