This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Warning on unrecommended ACUTE-Eval value #3536
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,17 @@ | |
from dataclasses import dataclass, field | ||
from typing import ClassVar, List, Type, Any, Dict, Iterable, TYPE_CHECKING | ||
|
||
from mephisto.operations.registry import register_mephisto_abstraction | ||
from mephisto.abstractions.blueprint import Blueprint, BlueprintArgs, SharedTaskState | ||
from mephisto.data_model.assignment import InitializationData | ||
from mephisto.operations.registry import register_mephisto_abstraction | ||
from omegaconf import MISSING, DictConfig | ||
|
||
from parlai.crowdsourcing.tasks.acute_eval.acute_eval_agent_state import ( | ||
AcuteEvalAgentState, | ||
) | ||
from parlai.crowdsourcing.tasks.acute_eval.acute_eval_builder import AcuteEvalBuilder | ||
from parlai.crowdsourcing.tasks.acute_eval.acute_eval_runner import AcuteEvalRunner | ||
from parlai.utils.misc import warn_once | ||
|
||
if TYPE_CHECKING: | ||
from mephisto.abstractions.blueprint import AgentState, TaskRunner, TaskBuilder | ||
|
@@ -96,7 +97,10 @@ class AcuteEvalBlueprint(Blueprint): | |
@classmethod | ||
def assert_task_args(cls, args: DictConfig, shared_state: SharedTaskState) -> None: | ||
""" | ||
Ensure that the data can be properly loaded. | ||
ACUTE-Eval-specific argument checking. | ||
|
||
Ensure that the data can be properly loaded and that recommended worker settings | ||
are used. | ||
""" | ||
if args.blueprint.get("pairings_filepath", None) is not None: | ||
pairings_filepath = os.path.expanduser(args.blueprint.pairings_filepath) | ||
|
@@ -114,6 +118,13 @@ def assert_task_args(cls, args: DictConfig, shared_state: SharedTaskState) -> No | |
"Must provide `block_qualification` to use `block_on_onboarding_fail`" | ||
) | ||
|
||
if args.task.get('maximum_units_per_worker', None) != 1: | ||
warn_once( | ||
'It is *strongly* recommended to use a ' | ||
'args.task.maximum_units_per_worker value of 1, as was done in the ' | ||
'ACUTE-Eval paper! Go to GitHub Discussions for more information.' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A slight change suggestion:
I think the current wording implies we already have a discussion on it there. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, changed |
||
) | ||
|
||
def get_frontend_args(self) -> Dict[str, Any]: | ||
""" | ||
Specifies what options within a task_config should be forwarded to the client | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is super cool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@klshuster