class_docstr: MovieLens dataset used by GCMC model
  
  TODO(minjie): make this dataset more general
  
  The dataset stores MovieLens ratings in two types of graphs. The encoder graph
  contains rating value information in the form of edge types. The decoder graph
  stores plain user-movie pairs in the form of a bipartite graph with no rating
  information. All graphs have two types of nodes: "user" and "movie".
  
  The training, validation and test set can be summarized as follows:
  
  training_enc_graph : training user-movie pairs + rating info
  training_dec_graph : training user-movie pairs
  valid_enc_graph : training user-movie pairs + rating info
  valid_dec_graph : validation user-movie pairs
  test_enc_graph : training user-movie pairs + validation user-movie pairs + rating info
  test_dec_graph : test user-movie pairs
  
  Attributes
  ----------
  train_enc_graph : dgl.DGLGraph
      Encoder graph for training.
  train_dec_graph : dgl.DGLGraph
      Decoder graph for training.
  train_labels : torch.Tensor
      The categorical label of each user-movie pair
  train_truths : torch.Tensor
      The actual rating values of each user-movie pair
  valid_enc_graph : dgl.DGLGraph
      Encoder graph for validation.
  valid_dec_graph : dgl.DGLGraph
      Decoder graph for validation.
  valid_labels : torch.Tensor
      The categorical label of each user-movie pair
  valid_truths : torch.Tensor
      The actual rating values of each user-movie pair
  test_enc_graph : dgl.DGLGraph
      Encoder graph for test.
  test_dec_graph : dgl.DGLGraph
      Decoder graph for test.
  test_labels : torch.Tensor
      The categorical label of each user-movie pair
  test_truths : torch.Tensor
      The actual rating values of each user-movie pair
  user_feature : torch.Tensor
      User feature tensor. If None, representing an identity matrix.
  movie_feature : torch.Tensor
      Movie feature tensor. If None, representing an identity matrix.
  possible_rating_values : np.ndarray
      Available rating values in the dataset
  
  Parameters
  ----------
  name : str
      Dataset name. Could be "ml-100k", "ml-1m", "ml-10m"
  device : torch.device
      Device context
  mix_cpu_gpu : boo, optional
      If true, the ``user_feature`` attribute is stored in CPU
  use_one_hot_fea : bool, optional
      If true, the ``user_feature`` attribute is None, representing an one-hot identity
      matrix. (Default: False)
  symm : bool, optional
      If true, the use symmetric normalize constant. Otherwise, use left normalize
      constant. (Default: True)
  test_ratio : float, optional
      Ratio of test data
  valid_ratio : float, optional
      Ratio of validation data
class_docstr_tok: ["MovieLens","dataset","used","by","GCMC","model","TODO","(","minjie",")",":","make","this","dataset","more","general","The","dataset","stores","MovieLens","ratings","in","two","types","of","graphs",".","The","encoder","graph","contains","rating","value","information","in","the","form","of","edge","types",".","The","decoder","graph","stores","plain","user-movie","pairs","in","the","form","of","a","bipartite","graph","with","no","rating","information",".","All","graphs","have","two","types","of","nodes",":","``","user","''","and","``","movie","''",".","The","training",",","validation","and","test","set","can","be","summarized","as","follows",":","training_enc_graph",":","training","user-movie","pairs","+","rating","info","training_dec_graph",":","training","user-movie","pairs","valid_enc_graph",":","training","user-movie","pairs","+","rating","info","valid_dec_graph",":","validation","user-movie","pairs","test_enc_graph",":","training","user-movie","pairs","+","validation","user-movie","pairs","+","rating","info","test_dec_graph",":","test","user-movie","pairs","Attributes","--","--","--","--","--","train_enc_graph",":","dgl.DGLGraph","Encoder","graph","for","training",".","train_dec_graph",":","dgl.DGLGraph","Decoder","graph","for","training",".","train_labels",":","torch.Tensor","The","categorical","label","of","each","user-movie","pair","train_truths",":","torch.Tensor","The","actual","rating","values","of","each","user-movie","pair","valid_enc_graph",":","dgl.DGLGraph","Encoder","graph","for","validation",".","valid_dec_graph",":","dgl.DGLGraph","Decoder","graph","for","validation",".","valid_labels",":","torch.Tensor","The","categorical","label","of","each","user-movie","pair","valid_truths",":","torch.Tensor","The","actual","rating","values","of","each","user-movie","pair","test_enc_graph",":","dgl.DGLGraph","Encoder","graph","for","test",".","test_dec_graph",":","dgl.DGLGraph","Decoder","graph","for","test",".","test_labels",":","torch.Tensor","The","categorical","label","of","each","user-movie","pair","test_truths",":","torch.Tensor","The","actual","rating","values","of","each","user-movie","pair","user_feature",":","torch.Tensor","User","feature","tensor",".","If","None",",","representing","an","identity","matrix",".","movie_feature",":","torch.Tensor","Movie","feature","tensor",".","If","None",",","representing","an","identity","matrix",".","possible_rating_values",":","np.ndarray","Available","rating","values","in","the","dataset","Parameters","--","--","--","--","--","name",":","str","Dataset","name",".","Could","be","``","ml-100k","''",",","``","ml-1m","''",",","``","ml-10m","''","device",":","torch.device","Device","context","mix_cpu_gpu",":","boo",",","optional","If","true",",","the","``","user_feature","``","attribute","is","stored","in","CPU","use_one_hot_fea",":","bool",",","optional","If","true",",","the","``","user_feature","``","attribute","is","None",",","representing","an","one-hot","identity","matrix",".","(","Default",":","False",")","symm",":","bool",",","optional","If","true",",","the","use","symmetric","normalize","constant",".","Otherwise",",","use","left","normalize","constant",".","(","Default",":","True",")","test_ratio",":","float",",","optional","Ratio","of","test","data","valid_ratio",":","float",",","optional","Ratio","of","validation","data"]
docstr: In MovieLens, the rates have the following format
  
  ml-100k
  user id          movie id        rating          timestamp
  
  ml-1m/10m
  UserID::MovieID::Rating::Timestamp
  
  timestamp is unix timestamp and can be converted by pd.to_datetime(X, unit='s')
  
  Parameters
  ----------
  file_path : str
  
  Returns
  -------
  rating_info : pd.DataFrame
docstr_tok: ["In","MovieLens",",","the","rates","have","the","following","format","ml-100k","user","id","movie","id","rating","timestamp","ml-1m\/10m","UserID",":",":MovieID",":",":Rating",":",":Timestamp","timestamp","is","unix","timestamp","and","can","be","converted","by","pd.to_datetime","(","X",",","unit='s","'",")","Parameters","--","--","--","--","--","file_path",":","str","Returns","--","--","--","-","rating_info",":","pd.DataFrame"]
code: def _load_raw_rates(self, file_path, sep):
      """In MovieLens, the rates have the following format
  
      ml-100k
      user id \t movie id \t rating \t timestamp
  
      ml-1m/10m
      UserID::MovieID::Rating::Timestamp
  
      timestamp is unix timestamp and can be converted by pd.to_datetime(X, unit='s')
  
      Parameters
      ----------
      file_path : str
  
      Returns
      -------
      rating_info : pd.DataFrame
      """
      rating_info = pd.read_csv(
          file_path,
          sep=sep,
          header=None,
          names=["user_id", "movie_id", "rating", "timestamp"],
          dtype={
              "user_id": np.int32,
              "movie_id": np.int32,
              "ratings": np.float32,
              "timestamp": np.int64,
          },
          engine="python",
      )
      return rating_info
  
imports: import os
  import re
  import dgl
  import numpy
  import pandas
  import scipy.sparse
  import torch
  from dgl.data.utils import download, extract_archive, get_download_dir
  from utils import to_etype_name
label_desc: Use image node_id 9 for calling the MovieLens obj's underlying member method code with example usage: obj._load_raw_rates(file_path, sep) and returns: rating_info