MCPcopy Create free account
hub / github.com/PAIR-code/lit / config_spec

Method config_spec

lit_nlp/components/shap_explainer.py:94–106  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

92 return is_tabular and has_outputs
93
94 def config_spec(self) -> types.Spec:
95 return {
96 EXPLAIN_KEY: types.SingleFieldMatcher(
97 spec='output',
98 types=[
99 'MulticlassPreds',
100 'RegressionScore',
101 'Scalar',
102 'SparseMultilabelPreds',
103 ],
104 ),
105 SAMPLE_KEY: types.Scalar(min_val=0, max_val=50, default=30, step=1),
106 }
107
108 def meta_spec(self) -> types.Spec:
109 return {'saliency': types.FeatureSalience(autorun=False, signed=True)}

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected