mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-11-14 15:45:13 +01:00
Merge 624bbf5f94
into 72eda9a24f
This commit is contained in:
commit
9fb9eefe1e
@ -422,8 +422,8 @@ public class EarlybirdWireModule {
|
|||||||
public ScoringModelsManager provideScoringModelsManager(
|
public ScoringModelsManager provideScoringModelsManager(
|
||||||
SearchStatsReceiver serverStats,
|
SearchStatsReceiver serverStats,
|
||||||
EarlybirdIndexConfig earlybirdIndexConfig) {
|
EarlybirdIndexConfig earlybirdIndexConfig) {
|
||||||
boolean modelsEnabled = EarlybirdConfig.getBool("scoring_models_enabled", false);
|
boolean modelsDisabled = !EarlybirdConfig.getBool("scoring_models_enabled", false);
|
||||||
if (!modelsEnabled) {
|
if (modelsDisabled) {
|
||||||
LOG.info("Scoring Models - Disabled in the config. Not loading any models.");
|
LOG.info("Scoring Models - Disabled in the config. Not loading any models.");
|
||||||
serverStats.getCounter("scoring_models_disabled_in_config").increment();
|
serverStats.getCounter("scoring_models_disabled_in_config").increment();
|
||||||
return ScoringModelsManager.NO_OP_MANAGER;
|
return ScoringModelsManager.NO_OP_MANAGER;
|
||||||
@ -450,9 +450,9 @@ public class EarlybirdWireModule {
|
|||||||
Decider decider,
|
Decider decider,
|
||||||
EarlybirdIndexConfig earlybirdIndexConfig) {
|
EarlybirdIndexConfig earlybirdIndexConfig) {
|
||||||
|
|
||||||
boolean modelsEnabled = EarlybirdProperty.TF_MODELS_ENABLED.get(false);
|
boolean modelsDisabled = !EarlybirdProperty.TF_MODELS_ENABLED.get(false);
|
||||||
|
|
||||||
if (!modelsEnabled) {
|
if (modelsDisabled) {
|
||||||
LOG.info("Tensorflow Models - Disabled in the config. Not loading any models.");
|
LOG.info("Tensorflow Models - Disabled in the config. Not loading any models.");
|
||||||
serverStats.getCounter("tf_models_disabled_in_config").increment();
|
serverStats.getCounter("tf_models_disabled_in_config").increment();
|
||||||
return TensorflowModelsManager.createNoOp(statsPrefix);
|
return TensorflowModelsManager.createNoOp(statsPrefix);
|
||||||
|
Loading…
Reference in New Issue
Block a user