Commit 8a96e41f authored by Samuel GAIST's avatar Samuel GAIST Committed by Samuel GAIST
Browse files

[backend][experimentmodel] Do not assume map content

The model will also be used on new experiments which
are empty.
parent 64598725
...@@ -119,12 +119,11 @@ class AlgorithmData: ...@@ -119,12 +119,11 @@ class AlgorithmData:
def dataformat_for_endpoint(self, endpoint: str) -> str: def dataformat_for_endpoint(self, endpoint: str) -> str:
for alg_in, block_in in self.input_mapping.items(): for alg_in, block_in in self.input_mapping.items():
if block_in == endpoint: if block_in == endpoint:
return self.input_type_map[alg_in] return self.input_type_map.get(alg_in, "")
for alg_out, block_out in self.output_mapping.items(): for alg_out, block_out in self.output_mapping.items():
if block_out == endpoint: if block_out == endpoint:
return self.output_type_map[alg_out] return self.output_type_map.get(alg_out, "")
return "" return ""
def __repr__(self) -> str: def __repr__(self) -> str:
......
Supports Markdown
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