class_docstr: Blueprint for model chat without images.
  
  This blueprint subclasses BaseModelChatBlueprint to provide logic for keeping track
  of how many more conversations are needed per model; this logic is not shared with
  other model-chat blueprints.
class_docstr_tok: ["Blueprint","for","model","chat","without","images",".","This","blueprint","subclasses","BaseModelChatBlueprint","to","provide","logic","for","keeping","track","of","how","many","more","conversations","are","needed","per","model",";","this","logic","is","not","shared","with","other","model-chat","blueprints","."]
code: def __init__(
      self,
      task_run: "TaskRun",
      args: "DictConfig",
      shared_state: "SharedTaskState",
  ):
      conversations_needed = self._process_conversations_needed(args)
      self.conversations_needed = conversations_needed
      shared_state.conversations_needed = conversations_needed
      args.blueprint.num_conversations = sum(
          conversations_needed.values()
      )
  
      super().__init__(
          task_run=task_run, args=args, shared_state=shared_state
      )
  
      if args.blueprint.get(
          "annotations_config_path", ""
      ) != "" and args.blueprint.get("onboarding_qualification", None):
          # We are going to do annotations, so load the onboarding data file that will
          # be used to onboard users into knowing how to do the annotations properly
          onboard_task_data_path = os.path.expanduser(
              args.blueprint.onboard_task_data_path
          )
          with open(
              onboard_task_data_path, "r"
          ) as onboard_task_data_file:
              self.onboard_task_data = json.load(onboard_task_data_file)
      else:
          self.onboard_task_data = None
  
      run_statistics = {
          r: 0 for (r, v) in self.conversations_needed.items()
      }
      shared_state.run_statistics = run_statistics
  
      if (
          args.blueprint.include_persona
          # 'hi' mode does not use a context generator and instead just displays "Hi!"
          # at the start of the conversation
          or args.blueprint.conversation_start_mode != "hi"
      ):
          if args.blueprint.conversation_start_mode == "hi":
              # Default to using the context from BlendedSkillTalk
              task = "blended_skill_talk"
          else:
              task = args.blueprint.conversation_start_mode
          context_generator = get_context_generator(
              override_opt=args.blueprint.override_opt, task=task
          )
      else:
          context_generator: Optional[ContextGenerator] = None
      shared_state.context_generator = context_generator
  
      # Lock for editing run statistics between threads
      statistics_condition = Condition()
  
      # Move shared state into the world and onboarding opts, such that these
      # can be used by the worlds
      shared_state.onboarding_world_opt.update(
          {
              "onboard_statistics": shared_state.onboard_statistics,
              "statistics_condition": statistics_condition,
              "max_onboard_time": args.blueprint.max_onboard_time,
              "onboard_task_data": self.onboard_task_data,
              "onboarding_qualification": args.blueprint.get(
                  "onboarding_qualification"
              ),
          }
      )
      shared_state.world_opt.update(
          {
              "conversations_needed": conversations_needed,
              "run_statistics": shared_state.run_statistics,
              "context_generator": context_generator,
              "statistics_condition": statistics_condition,
              "conversation_start_mode": args.blueprint.conversation_start_mode,
              "include_persona": args.blueprint.include_persona,
          }
      )
  
imports: import json
  import os
  import pickle
  import random
  from abc import ABC, abstractmethod
  from dataclasses import dataclass, field
  from threading import Semaphore, Condition
  from typing import Any, Dict, List, Optional, TYPE_CHECKING
  import numpy
  import torch
  import yaml
  from mephisto.operations.registry import register_mephisto_abstraction
  from mephisto.abstractions.blueprint import SharedTaskState
  from mephisto.abstractions.blueprints.parlai_chat.parlai_chat_blueprint import ParlAIChatBlueprint, SharedParlAITaskState, ParlAIChatBlueprintArgs
  from omegaconf import DictConfig, MISSING
  from parlai.crowdsourcing.tasks.model_chat.bot_agent import TurkLikeAgent
  from parlai.crowdsourcing.tasks.model_chat.utils import ImageStack, get_context_generator
  from parlai.tasks.blended_skill_talk.agents import ContextGenerator
label_desc: Use image node_id 2 to create a new ModelChatBlueprint object from inherited base classes: BaseModelChatBlueprint with example: obj = ModelChatBlueprint(task_run, args, shared_state)