".github/git@developer.sourcefind.cn:OpenDAS/dynamo.git" did not exist on "418ae5e8e75d695bd60afbef7b347637ac64bc4a"
Commit f2540236 authored by Sachin Kadyan's avatar Sachin Kadyan
Browse files

Changed the seq embedding tensor passed to the data pipeline to be a seqemb feature dictionary.

- `_process_seqemb_features` now returns a dictionary instead of a tensor.
parent 43d09645
...@@ -642,14 +642,16 @@ class DataPipeline: ...@@ -642,14 +642,16 @@ class DataPipeline:
def _process_seqemb_features(self, def _process_seqemb_features(self,
alignment_dir: str, alignment_dir: str,
) -> Mapping[str, Any]: ) -> Mapping[str, Any]:
seqemb_features = {}
for f in os.listdir(alignment_dir): for f in os.listdir(alignment_dir):
path = os.path.join(alignment_dir, f) path = os.path.join(alignment_dir, f)
ext = os.path.splitext(f)[-1] ext = os.path.splitext(f)[-1]
if (ext == ".pt"): if (ext == ".pt"):
seqemb_data = torch.load(path) seqemb_data = torch.load(path)
seqemb_features["seq_embedding"] = seqemb_data
return seqemb_data return seqemb_features
def process_fasta( def process_fasta(
self, self,
......
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