Skip to content

Commit

Permalink
Update conversations.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LoannPeurey authored Jun 5, 2024
1 parent bd0f1a0 commit f7c209d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ChildProject/pipelines/conversations.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ def retrieve_segments(self, recording: str):

if matches.shape[0]:
segments = self.am.get_segments(matches)
if not segments.shape[0]:
# no annotations for that unit
return pd.DataFrame(columns=([c.name for c in AnnotationManager.SEGMENTS_COLUMNS if c.required]
+ list(annotations.columns) + ['conv_count']))
segments = segments.dropna(subset='conv_count')
else:
# no annotations for that unit
Expand Down Expand Up @@ -657,4 +661,4 @@ def run(self, parameters_input, func=None):

@staticmethod
def setup_parser(parser):
parser.add_argument("parameters_input", help="path to the yml file with all parameters")
parser.add_argument("parameters_input", help="path to the yml file with all parameters")

0 comments on commit f7c209d

Please sign in to comment.