Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizerHost.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ GPUTPCNNClusterizerHost::GPUTPCNNClusterizerHost(const GPUSettingsProcessingNNcl
init(settings);
}

void GPUTPCNNClusterizerHost::loadFromCCDB(std::map<std::string, std::string> settings) {
void GPUTPCNNClusterizerHost::loadFromCCDB(std::map<std::string, std::string> settings)
{
o2::ccdb::CcdbApi ccdbApi;
ccdbApi.init(settings["nnCCDBURL"]);

metadata["inputDType"] = settings["inputDType"];
metadata["outputDType"] = settings["outputDType"];
metadata["nnCCDBEvalType"] = settings["nnCCDBEvalType"]; // classification_1C, classification_2C, regression_1C, regression_2C
metadata["nnCCDBEvalType"] = settings["nnCCDBEvalType"]; // classification_1C, classification_2C, regression_1C, regression_2C
metadata["nnCCDBWithMomentum"] = settings["nnCCDBWithMomentum"]; // 0, 1 -> Only for regression model
metadata["nnCCDBLayerType"] = settings["nnCCDBLayerType"]; // FC, CNN
metadata["nnCCDBLayerType"] = settings["nnCCDBLayerType"]; // FC, CNN
if (settings["nnCCDBInteractionRate"] != "" && std::stoi(settings["nnCCDBInteractionRate"]) > 0) {
metadata["nnCCDBInteractionRate"] = settings["nnCCDBInteractionRate"];
}
Expand All @@ -58,16 +59,15 @@ void GPUTPCNNClusterizerHost::init(const GPUSettingsProcessingNNclusterizer& set
std::string class_model_path = settings.nnClassificationPath, reg_model_path = settings.nnRegressionPath;
std::vector<std::string> reg_model_paths;

if(settings.nnLoadFromCCDB) {
if (settings.nnLoadFromCCDB) {
std::map<std::string, std::string> ccdbSettings = {
{"nnCCDBURL", settings.nnCCDBURL},
{"nnCCDBPath", settings.nnCCDBPath},
{"inputDType", settings.nnInferenceInputDType},
{"outputDType", settings.nnInferenceOutputDType},
{"nnCCDBWithMomentum", std::to_string(settings.nnCCDBWithMomentum)},
{"nnCCDBBeamType", settings.nnCCDBBeamType},
{"nnCCDBInteractionRate", std::to_string(settings.nnCCDBInteractionRate)}
};
{"nnCCDBInteractionRate", std::to_string(settings.nnCCDBInteractionRate)}};

std::string nnFetchFolder = "";
std::vector<std::string> fetchMode = o2::utils::Str::tokenize(settings.nnCCDBFetchMode, ':');
Expand Down
6 changes: 3 additions & 3 deletions GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizerHost.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class GPUTPCNNClusterizerHost
o2::ml::OrtModel model_class, model_reg_1, model_reg_2; // For splitting clusters
std::vector<std::string> reg_model_paths;

private:
std::map<std::string, std::string> metadata;
std::map<std::string, std::string> headers;
private:
std::map<std::string, std::string> metadata;
std::map<std::string, std::string> headers;
}; // class GPUTPCNNClusterizerHost

} // namespace o2::gpu
Expand Down