From 758d1419e350aa0764456c75f789b98204366902 Mon Sep 17 00:00:00 2001 From: Alex Gurung Date: Tue, 1 Mar 2022 15:26:30 -0800 Subject: [PATCH 001/107] initial setup for both object interaction tasks --- .../collect_narrations/review_results.py | 2 + .../collect_narrations/run_task.py | 4 +- .../webapp/src/ViewRouter.js | 4 +- .../webapp/src/Views/Task1/index.js | 2 +- .../collect_narrations/webapp/src/app.jsx | 2 +- .../ground_events/examine_results.py | 110 +++++- .../ground_events/run_task.py | 60 +-- .../ground_events/webapp/src/TaskCopy.js | 1 + .../ground_events/webapp/src/app.jsx | 369 +++++++++--------- .../src/components/AttributeSetter/index.js | 6 +- .../src/components/DropdownSelect/index.js | 5 +- .../src/components/QuestionOnSelect/index.js | 2 +- .../Questions/BooleanQuestion/index.js | 4 +- .../Questions/MultipleSelectQuestion/index.js | 1 - .../Questions/NumberQuestion/index.js | 2 +- .../views/Task/Constraints/Questions/index.js | 4 +- .../src/views/Task/Constraints/index.js | 4 +- .../src/views/Task/Events/Questions/index.js | 4 +- .../webapp/src/views/Task/index.js | 4 +- 19 files changed, 339 insertions(+), 251 deletions(-) diff --git a/crowdsourcing/custom_world_interactions/collect_narrations/review_results.py b/crowdsourcing/custom_world_interactions/collect_narrations/review_results.py index 5a77b5c78..4f30fe850 100644 --- a/crowdsourcing/custom_world_interactions/collect_narrations/review_results.py +++ b/crowdsourcing/custom_world_interactions/collect_narrations/review_results.py @@ -24,6 +24,8 @@ def format_data_for_printing(data): outputs_string = "" if contents["inputs"] is not None and contents["outputs"] is not None: + print("INPUTS") + print(contents['inputs']) inputs = contents["inputs"] outputs = contents["outputs"]["final_data"] primary = outputs["primaryObject"] diff --git a/crowdsourcing/custom_world_interactions/collect_narrations/run_task.py b/crowdsourcing/custom_world_interactions/collect_narrations/run_task.py index 24e929e89..fd0de1e25 100644 --- a/crowdsourcing/custom_world_interactions/collect_narrations/run_task.py +++ b/crowdsourcing/custom_world_interactions/collect_narrations/run_task.py @@ -32,7 +32,8 @@ from typing import List, Any TASK_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) -LIGHT_DB_PATH = "~/ParlAI/data/LIGHT/merged.db" +# LIGHT_DB_PATH = "~/ParlAI/data/LIGHT/merged.db" +LIGHT_DB_PATH = "~/ParlAI/data/light/environment/db/d3/database3.db" PRIMARY_OBJECT_LIST_SIZE = 8 SECONDARY_OBJECT_LIST_SIZE = 8 DEFAULT_NUM_TASKS = 20 @@ -219,7 +220,6 @@ def onboarding_always_valid(onboarding_data): db, cfg = load_db_and_process_config(cfg) operator = Operator(db) - operator.validate_and_run_config(cfg.mephisto, shared_state) operator.wait_for_runs_then_shutdown(skip_input=True, log_rate=30) diff --git a/crowdsourcing/custom_world_interactions/collect_narrations/webapp/src/ViewRouter.js b/crowdsourcing/custom_world_interactions/collect_narrations/webapp/src/ViewRouter.js index 5b4487011..ed89e923c 100644 --- a/crowdsourcing/custom_world_interactions/collect_narrations/webapp/src/ViewRouter.js +++ b/crowdsourcing/custom_world_interactions/collect_narrations/webapp/src/ViewRouter.js @@ -71,7 +71,7 @@ const ViewRouter =({appData})=> { // if (blockedReason !== null) { // return ( //
-//
+//
//

{blockedExplanation}

{" "} //
//
@@ -84,7 +84,7 @@ const ViewRouter =({appData})=> { { (blockedReason !== null) ?
-
+

{blockedExplanation}

{" "}
diff --git a/crowdsourcing/custom_world_interactions/collect_narrations/webapp/src/Views/Task1/index.js b/crowdsourcing/custom_world_interactions/collect_narrations/webapp/src/Views/Task1/index.js index 54fdc1a79..ec5ef169a 100644 --- a/crowdsourcing/custom_world_interactions/collect_narrations/webapp/src/Views/Task1/index.js +++ b/crowdsourcing/custom_world_interactions/collect_narrations/webapp/src/Views/Task1/index.js @@ -88,7 +88,7 @@ console.log("TASK DATA: ", taskData)