Commit 2692fc43 authored by Baran Dalgic's avatar Baran Dalgic

first draft to tag instances

parent a628f01e
Pipeline #153389 failed with stages
in 15 seconds
......@@ -343,8 +343,12 @@ public class EMADLGenerator {
return fileContents;
protected String getDataPath(TaggingResolver taggingResolver, EMAComponentSymbol component){
List<TagSymbol> tags = (List<TagSymbol>) taggingResolver.getTags(component, DataPathSymbol.KIND);
protected String getDataPath(TaggingResolver taggingResolver, EMAComponentSymbol component, EMAComponentInstanceSymbol instance){
// instance tags have priority
List<TagSymbol> tags = (List<TagSymbol>) taggingResolver.getTags(instance, DataPathSymbol.KIND);
List<TagSymbol> comps = (List<TagSymbol>) taggingResolver.getTags(component, DataPathSymbol.KIND);
String dataPath;
if (tags.isEmpty()) {
DataPathConfigParser newParserConfig = new DataPathConfigParser(getModelsPath() + "data_paths.txt");
......@@ -354,6 +358,7 @@ public class EMADLGenerator {
// values for data path tags are not optional, therefore always present if tag is present
dataPath = (String) tags.get(0).getValues().get(0);
return dataPath;
......@@ -376,8 +381,7 @@ public class EMADLGenerator {
if (architecture.isPresent()){
String dPath = getDataPath(taggingResolver, EMAComponentSymbol);
/*String dPath = DataPathConfigParser.getDataPath(getModelsPath() + "data_paths.txt", componentSymbol.getFullName());*/
String dPath = getDataPath(taggingResolver, EMAComponentSymbol, componentInstanceSymbol);
generateCNN(fileContents, taggingResolver, componentInstanceSymbol, architecture.get());
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment