Skip to content

Commit

Permalink
[!104][SIMULTANEOUS] Adaptation of SimulST agents to the new SimulEva…
Browse files Browse the repository at this point in the history
…l version

# Why is the change needed?
With the new version of SimulEval 1.1.0, all agents' codes do not work anymore.

# What changes does the patch introduce?
Introduce a new version of the agents which works with the new SimulEval version. The main parts of the code are still the same but the interaction with SimulEval has changed:

1. more than one token can be directly passed to SimulEval through `WriteAction()`, thus the output given to the tool must be "ready to show", i.e. de-tokenized and with correct spacing between words;
2. customized agents must inherit from `SpeechToTextAgent` class to be able to work with this new version;
3. `AgentStates` has its own structure in the SimulEval tool and customized states must inherit from it.

# How was this patch tested?
UTs and manual runs.
  • Loading branch information
sarapapi authored and mgaido91 committed Sep 27, 2023
1 parent 9892515 commit 8cee29f
Show file tree
Hide file tree
Showing 29 changed files with 1,300 additions and 376 deletions.
26 changes: 24 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ cache:

stages:
- test
- test_simul_v1.0.2
- test_simul_v1.1.0

before_script:
- apt-get update && apt-get --yes install libsndfile1
Expand All @@ -24,7 +26,6 @@ before_script:
- rm -rf SimulEval
- git clone https://github.com/facebookresearch/SimulEval.git/
- cd SimulEval
- git checkout 844e4bf62cb4031b4d49247b9520a9966416eea3
- pip install -e .
- cd $curdir

Expand All @@ -33,4 +34,25 @@ test:
script:
- python -m unittest discover -s fbk_uts -p "*.py"
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

test_simul_v1.0.2:
stage: test_simul_v1.0.2
script:
- cd ../SimulEval
- git checkout v1.0.2
- cd $curdir
- python -m unittest discover -s fbk_simul_uts/v1_0 -p "*.py"
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

test_simul_v1.1.0:
stage: test_simul_v1.1.0
script:
- cd ../SimulEval
# No version/tag is available for SimulEval 1.1.0
- git checkout main
- cd $curdir
- python -m unittest discover -s fbk_simul_uts/v1_1 -p "*.py"
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
File renamed without changes.
Empty file.
Loading

0 comments on commit 8cee29f

Please sign in to comment.