original_docstring: 
      Split the species into train, test, and validation sets.
  
      Args:
        summary_path (str): path to the JSON file that summarizes
          all of the information about the species, apart from their
          conformers.
        csv_folder (str): path to the folder in which we will save our
          csv files with the SMILES, properties and training splits.
        cp_folder (str): path to the ChemProp folder on your computer
        props (list[str]): list of property names that you want to predict
        split_sizes (list[float]): list of the form [train_split_size, val_split_size,
          test_split_size].
        split_type (str): how to split the data. Options can be found in the Chemprop
          script `split_data.py`. A good choice is usually `scaffold_balanced`, which splits
          in such a way that similar scaffolds are in the same split. 
        max_specs (int): maximum number of species allowed in dataset
        max_atoms (int): Maximum number of atoms allowed in a species
        dataset_type (str): type of problem, e.g. "classification" or 
          "regression".
        seed (int): random seed for split
      Returns:
        None
  
      
docstring: Split the species into train, test, and validation sets.
docstring_tokens: Split the species into train test and validation sets .
code: def make_split(summary_path,
                 csv_folder,
                 cp_folder,
                 props,
                 split_sizes,
                 split_type,
                 max_specs,
                 max_atoms,
                 dataset_type,
                 seed):
      """
      Split the species into train, test, and validation sets.
  
      Args:
        summary_path (str): path to the JSON file that summarizes
          all of the information about the species, apart from their
          conformers.
        csv_folder (str): path to the folder in which we will save our
          csv files with the SMILES, properties and training splits.
        cp_folder (str): path to the ChemProp folder on your computer
        props (list[str]): list of property names that you want to predict
        split_sizes (list[float]): list of the form [train_split_size, val_split_size,
          test_split_size].
        split_type (str): how to split the data. Options can be found in the Chemprop
          script `split_data.py`. A good choice is usually `scaffold_balanced`, which splits
          in such a way that similar scaffolds are in the same split. 
        max_specs (int): maximum number of species allowed in dataset
        max_atoms (int): Maximum number of atoms allowed in a species
        dataset_type (str): type of problem, e.g. "classification" or 
          "regression".
        seed (int): random seed for split
      Returns:
        None
  
      """
  
      with open(summary_path, "r") as f:
          summary_dic = json.load(f)
  
      # apply any transformations to the data, e.g. wanting a
      # dataset that has the log of a value instead of the
      # value itself
      apply_transfs(props, summary_dic)
  
      # filter based on props, max species and max number of atoms
      summary_dic = subsample(summary_dic=summary_dic,
                              props=props,
                              max_specs=max_specs,
                              max_atoms=max_atoms,
                              dataset_type=dataset_type,
                              seed=seed)
  
      # path csv file with SMILES and properties
      all_csv = os.path.join(csv_folder, "all.csv")
      if not os.path.isdir(csv_folder):
          os.makedirs(csv_folder)
      # write the contents of `summary_dic` to the csv
      to_csv(summary_dic, props, all_csv)
  
      # run the chemprop script `split_data.py` to make the splits
      # from `all.csv`
  
      script = os.path.join(cp_folder, "scripts", "split_data.py")
      split_str = " ".join(np.array(split_sizes).astype("str"))
      cmd = (f"source activate chemprop && "
             f"python {script} --split_type {split_type} "
             f"--split_sizes {split_str} "
             f"--data_path {all_csv} "
             f"--save_dir {csv_folder} "
             f"--seed {seed}")
      p = bash_command(cmd)
      p.wait()
code_tokens: def make_split ( summary_path , csv_folder , cp_folder , props , split_sizes , split_type , max_specs , max_atoms , dataset_type , seed ) : with open ( summary_path , "r" ) as f : summary_dic = json . load ( f ) apply_transfs ( props , summary_dic ) summary_dic = subsample ( summary_dic = summary_dic , props = props , max_specs = max_specs , max_atoms = max_atoms , dataset_type = dataset_type , seed = seed ) all_csv = os . path . join ( csv_folder , "all.csv" ) if not os . path . isdir ( csv_folder ) : os . makedirs ( csv_folder ) to_csv ( summary_dic , props , all_csv ) script = os . path . join ( cp_folder , "scripts" , "split_data.py" ) split_str = " " . join ( np . array ( split_sizes ) . astype ( "str" ) ) cmd = ( f"source activate chemprop && " f"python {script} --split_type {split_type} " f"--split_sizes {split_str} " f"--data_path {all_csv} " f"--save_dir {csv_folder} " f"--seed {seed}" ) p = bash_command ( cmd ) p . wait ( )
short_docstring: Split the species into train, test, and validation sets.
short_docstring_tokens: Split the species into train test and validation sets .
comment: """
      Split the species into train, test, and validation sets.
  
      Args:
        summary_path (str): path to the JSON file that summarizes
          all of the information about the species, apart from their
          conformers.
        csv_folder (str): path to the folder in which we will save our
          csv files with the SMILES, properties and training splits.
        cp_folder (str): path to the ChemProp folder on your computer
        props (list[str]): list of property names that you want to predict
        split_sizes (list[float]): list of the form [train_split_size, val_split_size,
          test_split_size].
        split_type (str): how to split the data. Options can be found in the Chemprop
          script `split_data.py`. A good choice is usually `scaffold_balanced`, which splits
          in such a way that similar scaffolds are in the same split. 
        max_specs (int): maximum number of species allowed in dataset
        max_atoms (int): Maximum number of atoms allowed in a species
        dataset_type (str): type of problem, e.g. "classification" or 
          "regression".
        seed (int): random seed for split
      Returns:
        None
  
      """$SEP$# apply any transformations to the data, e.g. wanting a$SEP$# dataset that has the log of a value instead of the$SEP$# value itself$SEP$# filter based on props, max species and max number of atoms$SEP$# path csv file with SMILES and properties$SEP$# write the contents of `summary_dic` to the csv$SEP$# run the chemprop script `split_data.py` to make the splits$SEP$# from `all.csv`