class_docstr: Class for TabNet model.
class_docstr_tok: ["Class","for","TabNet","model","."]
docstr: Generate dataloaders for train and eval set.
  
  Parameters
  ----------
  X_train : np.array
      Train set.
  y_train : np.array
      Train targets.
  eval_set : list of tuple
      List of eval tuple set (X, y).
  
  Returns
  -------
  train_dataloader : `torch.utils.data.Dataloader`
      Training dataloader.
  valid_dataloaders : list of `torch.utils.data.Dataloader`
      List of validation dataloaders.
docstr_tok: ["Generate","dataloaders","for","train","and","eval","set",".","Parameters","--","--","--","--","--","X_train",":","np.array","Train","set",".","y_train",":","np.array","Train","targets",".","eval_set",":","list","of","tuple","List","of","eval","tuple","set","(","X",",","y",")",".","Returns","--","--","--","-","train_dataloader",":","`","torch.utils.data.Dataloader","`","Training","dataloader",".","valid_dataloaders",":","list","of","`","torch.utils.data.Dataloader","`","List","of","validation","dataloaders","."]
code: def _construct_loaders(self, X_train, y_train, eval_set):
      """Generate dataloaders for train and eval set.
  
      Parameters
      ----------
      X_train : np.array
          Train set.
      y_train : np.array
          Train targets.
      eval_set : list of tuple
          List of eval tuple set (X, y).
  
      Returns
      -------
      train_dataloader : `torch.utils.data.Dataloader`
          Training dataloader.
      valid_dataloaders : list of `torch.utils.data.Dataloader`
          List of validation dataloaders.
  
      """
      # all weights are not allowed for this type of model
      y_train_mapped = self.prepare_target(y_train)
      for i, (X, y) in enumerate(eval_set):
          y_mapped = self.prepare_target(y)
          eval_set[i] = (X, y_mapped)
  
      train_dataloader, valid_dataloaders = create_dataloaders(
          X_train,
          y_train_mapped,
          eval_set,
          self.updated_weights,
          self.batch_size,
          self.num_workers,
          self.drop_last,
          self.pin_memory,
      )
      return train_dataloader, valid_dataloaders
  
imports: from dataclasses import dataclass, field
  from typing import List, Any, Dict
  import torch
  from torch.nn.utils import clip_grad_norm_
  import numpy
  from scipy.sparse import csc_matrix
  from abc import abstractmethod
  from pytorch_tabnet import tab_network
  from pytorch_tabnet.utils import SparsePredictDataset, PredictDataset, create_explain_matrix, validate_eval_set, create_dataloaders, define_device, ComplexEncoder, check_input, check_warm_start, create_group_matrix, check_embedding_parameters
  from pytorch_tabnet.callbacks import CallbackContainer, History, EarlyStopping, LRSchedulerCallback
  from pytorch_tabnet.metrics import MetricContainer, check_metrics
  from sklearn.base import BaseEstimator
  from torch.utils.data import DataLoader
  import io
  import json
  from pathlib import Path
  import shutil
  import zipfile
  import warnings
  import copy
  import scipy
label_desc: Use image node_id 18 for calling the TabModel obj's underlying member method code with example usage: obj._construct_loaders(X_train, y_train, eval_set) and returns: train_dataloader,  valid_dataloaders