From e3ef6dcf6767228499c1467f00dd92e469001e25 Mon Sep 17 00:00:00 2001 From: Hongyuan Zhan Date: Thu, 26 Mar 2020 12:27:46 -0700 Subject: [PATCH] Replace unit-tests on LMModel and FLLanguageModelingTask by LiteLMModel and FLLiteLMTask (#1296) Summary: Pull Request resolved: https://github.com/facebookresearch/pytext/pull/1296 Previously, fl_language_model_test.py covers unit-tests on LMModel by comparing LMTask and FLLMTask. We will ship LiteLMModel instead of LMModel, hence the unit-tests should be using LiteLMModel, LiteLMTask, and FLLiteLMTask instead. One caveat: we need to import LiteLMTask from fb/tasks.py, however, the import section in fb/tasks.py misses tons of dependencies (I guess no unit-tests was ran on tasks.py?), hence I have to replicate LiteLMTask. Reviewed By: kmalik22 Differential Revision: D20651264 fbshipit-source-id: d4843efdea6e4dbc5ffd97963a275ac87337580b --- tests/data/test_lm_tiny.tsv | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/data/test_lm_tiny.tsv b/tests/data/test_lm_tiny.tsv index a1081b5fe..47b8d82b1 100644 --- a/tests/data/test_lm_tiny.tsv +++ b/tests/data/test_lm_tiny.tsv @@ -1,5 +1,8 @@ - I am an Arsenal fan . - What is the weather today - I want to sleep - Where can I get some golf lessons? - What the the shortest route to get to the airport? +I am an Arsenal fan. user1 +What is the weather today? user2 +I want to sleep. user3 +Where can I get some golf lessons? user4 +What the the shortest route to get to the airport? user5 +When is the time for the Arsenal vs Liverpool match this week? user6 +Nice to meet you! user7 +Thank you very much. user8