I do not know why, but as soon as I removed the dataloader from the validation function and replace them above the training loop it worked fine.
In the beginning
#test and make the sentences
def validation(recommender_encoder,recommender_decoder,epoch,role):

        #only in the validation
        from Keras import evaluation

        #print("\n\n--------------------------- Loaded model from disk ---------------------------\n\n")
        
        ''' define the decay function in order to control the trade off between feeding the model with it's output or the real output | #initialize the decay '''
        teacher_forcing_ratio = 1 #because we want the decoder to feed itself only with it's own outputs       
        
        if (role=='Testing'):
                #define the datalodaer
                dataloader = dataset_loader.Dataset_yelp('data/testing.pkl', transform=None) #output_space = 8171
        elif (role=='Training'):
                #define the datalodaer
                dataloader = dataset_loader.Dataset_yelp('data/training.pkl', transform=None) #output_space = 8171
        elif (role=='Development'):      
                #define the datalodaer
                dataloader = dataset_loader.Dataset_yelp('data/development.pkl', transform=None) #output_space = 8171
        
        batch_size = 64
        train_sampler = ShuffleBatchSampler(SortedSampler(dataloader,sort_key=lambda i: len(i[4])),batch_size=batch_size,drop_last=False,shuffle=False)
        
        
        #define some proparties for the dataloader
        loader_params = {'num_workers':4, 'pin_memory':True, 'collate_fn':custom_collate, 'batch_sampler':train_sampler}
        dataloader = torch.utils.data.DataLoader(dataloader, **loader_params)

Fix it
#test and make the sentences
def validation(recommender_encoder,recommender_decoder,epoch,role,train_dataset_loader,dataloader_test,dataloader_development):

        teacher_forcing_ratio = 1 #because we want the decoder to feed itself only with it's own outputs

        if (role=='Testing'):
                #define the datalodaer
                dataloader = dataloader_test
        elif (role=='Training'):
                #define the datalodaer
                dataloader = train_dataset_loader
        elif (role=='Development'):      
                #define the datalodaer
                dataloader = dataloader_development