class_docstr: Log OpenAI fine-tunes to [Weights & Biases](https://wandb.me/openai-docs).
class_docstr_tok: ["Log","OpenAI","fine-tunes","to","[","Weights","&","Biases","]","(","https",":","\/\/wandb.me\/openai-docs",")","."]
code: def _get_config(cls, fine_tune: FineTuningJob) -> Dict[str, Any]:
      config = dict(fine_tune)
      config["result_files"] = config["result_files"][0]
      if config.get("created_at"):
          config["created_at"] = datetime.datetime.fromtimestamp(
              config["created_at"]
          ).strftime("%Y-%m-%d %H:%M:%S")
      if config.get("finished_at"):
          config["finished_at"] = datetime.datetime.fromtimestamp(
              config["finished_at"]
          ).strftime("%Y-%m-%d %H:%M:%S")
      if config.get("hyperparameters"):
          hyperparameters = config.pop("hyperparameters")
          hyperparams = cls._unpack_hyperparameters(hyperparameters)
          if hyperparams is None:
              # If unpacking fails, log the object which will render as string
              config["hyperparameters"] = hyperparameters
          else:
              # nested rendering on hyperparameters
              config["hyperparameters"] = hyperparams
  
      return config
  
imports: import datetime
  import io
  import json
  import re
  import time
  from typing import Any, Dict, Optional, Tuple
  from pkg_resources import parse_version
  import wandb
  from wandb import util
  from wandb.data_types import Table
  from wandb.sdk.lib import telemetry
  from wandb.sdk.wandb_run import Run
  from openai import OpenAI
  from openai.types.fine_tuning import FineTuningJob
  from openai.types.fine_tuning.fine_tuning_job import Hyperparameters
label_desc: Use image node_id 7 for calling the WandbLogger obj's underlying member method code with example usage: obj._get_config(cls, fine_tune) and returns: config