Hi, I got exact answer with expected output but the test not pass.

It depends how you have implememted that function and also if there are any dependencies that might be implemented wrong.

You can send me the code for that function only, in a private message and I will have a look at it.

Notice the below code after recalling the max_len function is using the length of the dataset

max_len = max_length(train_x, val_x)

print(f’The length of the longest tweet is {max_len} tokens.')

But in the max_len function code to calculate the longest tweet requires you to use arguments given the grader cell which is

training_x (list): The tweets in the training set.

validation_x (list): The tweets in the validation set.

So you need to use training_x and validation_x, and not train_x and val_x

Regards

DP

max_length = max_length(train_x, val_x) is come with the notebook (I didn’t write). I tried to change from train_x, val_x to training_x and validation_x when call max_length function. But the error shows up.

Hello @skinx.learning

The way you have recalled the function is incorrect

Probably this histogram plot image will guide you to do the correction

To calculate the max len of the longest tweet, you need to calculate max of length of tweet in the given sets of tweets in the assigned argument call of training_x and validation x

Regards

DP

Solved!! Appreciated for your help.

Best Regard,

Fai

made the same mistake! thanks for your help @Deepti_Prasad !