Skip to content

Commit 4b33a67

Browse files
authored
Merge pull request #180 from bandframework/179HidePCGPR
Set PCGPR to research grade emulator
2 parents 3f49fed + 1410d27 commit 4b33a67

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/surmise/emulation.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,21 @@ def __init__(self,
7777
None.
7878
7979
'''
80+
# Emulators that could be loaded but that are research-grade only and
81+
# should not be offered through the public interface.
82+
#
83+
# TODO: This should be removed as part of refactoring the emulator
84+
# portion of the public interface.
85+
RESEARCH_EMUS = ["pcgpr"]
86+
if method.lower() in RESEARCH_EMUS:
87+
if ("expertMode" not in args.keys()) or (not args["expertMode"]):
88+
msg = "{} is included for unofficial research purposes only"
89+
raise ValueError(msg.format(method))
90+
else:
91+
# Emit warning to extend a helping hand to the experts.
92+
msg = f"Using unofficial research {method} emulator"
93+
warnings.warn(msg)
94+
8095
# cast to numpy.float64, currently only for theta and f.
8196
if theta is not None:
8297
theta = cast_f64_dtype(theta)

0 commit comments

Comments
 (0)