<commit_before>/* @flow */
import * as React from "react";

type Props = {
  data: string,
  models: Object,
  modelID: string
};

class ModelDebug extends React.Component<Props> {
  static MIMETYPE = "application/x-nteract-model-debug+json";

  shouldComponentUpdate(): boolean {
    return true;
  }

  render(): ?React$Element<any> {
    const { models, data, modelID } = this.props; // eslint-disable-line no-unused-vars
    // TODO: Provide model IDs on transient field
    // For now, if modelID is not provided (or model does not exist),
    // show all the models
    const model = models.modelID || models;
    return (<commit_msg>adapt nteract model debug to mediaType<commit_after>/* @flow */
import * as React from "react";

type Props = {
  data: string,
  mediaType: "application/x-nteract-model-debug+json",
  models: Object,
  modelID: string
};

const mediaType = "application/x-nteract-model-debug+json";

class ModelDebug extends React.Component<Props> {
  static MIMETYPE = mediaType;

  static defaultProps = {
    mediaType
  };

  shouldComponentUpdate(): boolean {
    return true;
  }

  render(): ?React$Element<any> {
    const { models, data, modelID } = this.props; // eslint-disable-line no-unused-vars
    // TODO: Provide model IDs on transient field
    // For now, if modelID is not provided (or model does not exist),
    // show all the models
    const model = models.modelID || models;
    return (
{'fraction_non_alphanumeric': 0.1190807799442897, 'fraction_numerical': 0.0, 'mean_word_length': 3.3283132530120483, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5990598', 'n_tokens_mistral': 448, 'n_tokens_neox': 442, 'n_words': 139}