Skip to content

Commit

Permalink
Cpp notebook with docker (#101)
Browse files Browse the repository at this point in the history
* start on CPP example notebook for smart cache
  • Loading branch information
amueller authored Sep 28, 2020
1 parent f8ce37e commit 4febf6f
Show file tree
Hide file tree
Showing 10 changed files with 697 additions and 172 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,15 @@ private static void RequestNewConfigurationMessageHandler(SmartCacheProxy.Reques

// Register the observation with the optimizer by sending it a grpc request.
//
Console.WriteLine("Register an observation");

OptimizerProxy.Register(currentConfigJsonString, "HitRate", hitRate);
}

// Now, ask the optimizer for a new configuration suggestion.
//
string newConfigJsonString = OptimizerProxy.Suggest();
Console.WriteLine("Suggesting: " + newConfigJsonString);

var newConfigDictionary = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(newConfigJsonString);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public string Suggest(bool random = false)
});

string suggestedParameter = configurationParameters.ParametersJsonString;
Console.WriteLine($"Suggest {random} {suggestedParameter}");
Console.WriteLine($"Suggest random={random} {suggestedParameter}");
return suggestedParameter;
}
}
Expand Down
Loading

0 comments on commit 4febf6f

Please sign in to comment.