class_docstr: Blueprint for per turn evaluation method.
  
  This blueprint subclasses ModelChatBlueprint to provide logic for keeping track of
  how many more conversations are needed per model; this logic is not shared with
  other blueprints.
class_docstr_tok: ["Blueprint","for","per","turn","evaluation","method",".","This","blueprint","subclasses","ModelChatBlueprint","to","provide","logic","for","keeping","track","of","how","many","more","conversations","are","needed","per","model",";","this","logic","is","not","shared","with","other","blueprints","."]
docstr: Ensure that arguments are properly configured to launch this task.
docstr_tok: ["Ensure","that","arguments","are","properly","configured","to","launch","this","task","."]
code: def assert_task_args(
      cls, args: "DictConfig", shared_state: "SharedTaskState"
  ) -> None:
      """
      Ensure that arguments are properly configured to launch this task.
      """
  
      if (
          not isinstance(shared_state.conversations_needed, dict)
          or len(shared_state.conversations_needed) == 0
      ):
          assert (
              args.blueprint.get("conversations_needed_string", None)
              is not None
          ), (
              "Must provide a string of needed conversations per model if not providing "
              "a conversations needed dict"
          )
          try:
              conversations_needed = {}
              parts = args.blueprint.conversations_needed_string.split(
                  ","
              )
              for part in parts:
                  model1, model2, num_string = part.split(":")
                  models_alphabetize = [model1, model2]
                  models_alphabetize.sort()
                  conversations_needed[
                      f"{models_alphabetize[0]}:{models_alphabetize[1]}"
                  ] = int(num_string)
          except Exception as e:
              raise Exception(
                  "Could not create conversations needed dict from given string. "
                  f"Error was {e}.\n"
                  "Be sure the format is like modelA:modelB:50,modelC:modelD:20"
              )
      else:
          conversations_needed = shared_state.conversations_needed
      args.blueprint.num_conversations = sum(
          conversations_needed.values()
      )
      BaseModelChatBlueprint.assert_task_args(
          args=args, shared_state=shared_state
      )
  
      if args.blueprint.get("annotations_config_path", "") != "":
          # We are going to do annotations, so check for the presence of an onboarding
          # data file that will be used to onboard users into knowing how to do the
          # annotations properly
          assert (
              args.blueprint.get("onboard_task_data_path", None)
              is not None
          ), "Must provide an onboarding data file"
          full_path = os.path.expanduser(
              args.blueprint.onboard_task_data_path
          )
          assert os.path.exists(
              full_path
          ), f"Target onboarding data path {full_path} doesn't exist"
  
file_path: ParlAI/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/per_turn_eval_blueprint.py
imports: import os
  import yaml
  from dataclasses import dataclass, field
  from typing import Dict, TYPE_CHECKING
  from mephisto.abstractions.blueprint import SharedTaskState
  from mephisto.operations.registry import register_mephisto_abstraction
  from omegaconf import DictConfig
  from parlai.crowdsourcing.tasks.model_chat.model_chat_blueprint import ModelChatBlueprint, ModelChatBlueprintArgs, BaseModelChatBlueprint
  from parlai.crowdsourcing.tasks.pairwise_per_turn_eval.bot_agent import PerTurnEvalTurkLikeAgent
label_desc: Use image node_id 1 for calling the PerTurnEvalBlueprint obj's underlying member method code with example usage: obj.assert_task_args(cls, args, shared_state) without return types