class_docstr: Creates a model (with already learned weights) to be used inference time.
class_docstr_tok: ["Creates","a","model","(","with","already","learned","weights",")","to","be","used","inference","time","."]
docstr: Serialize the batching metadata to JSON, for ease of parsing with torch::deploy environments.
docstr_tok: ["Serialize","the","batching","metadata","to","JSON",",","for","ease","of","parsing","with","torch",":",":deploy","environments","."]
code: def batching_metadata_json(self) -> str:
      """
      Serialize the batching metadata to JSON, for ease of parsing with torch::deploy environments.
      """
      return json.dumps(
          {
              key: asdict(value)
              for key, value in self.batching_metadata().items()
          }
      )
  
imports: import abc
  import json
  from dataclasses import asdict, dataclass
  from typing import Any, Dict, List, Optional, Tuple, Type
  import torch
  import torch.nn
  import torch.quantization
  import torchrec
  import torchrec.quant
  from torchrec.modules.embedding_configs import QuantConfig
  from torchrec.modules.embedding_modules import EmbeddingBagCollectionInterface, EmbeddingCollectionInterface
label_desc: Use image node_id 3 for calling the PredictFactory obj's underlying member method code with example usage: obj.batching_metadata_json() and returns: json