Course3 Assignment1 - Section 1 Grading Issue

The grader shows:

Data channels dictionary setup 0/15

However there doesn’t seem to be anything wrong with the section as submitted. It is mostly given code. The rest of the sections are 100%. Please check the section grader expectations as compared to the given code.

Thank you,

Do you mind showing the code?

sorry, I thought you had access to it.

I have moved on, I just wanted to share in case there is a grading error somewhere, here is the code. Really enjoying the course, thank you.

from sagemaker.inputs import TrainingInput

data_channels = {
### BEGIN SOLUTION - DO NOT delete this comment for grading purposes
‘train’: processed_train_data_s3_uri, # Replace None
‘validation’: processed_validation_data_s3_uri # Replace None
### END SOLUTION - DO NOT delete this comment for grading purposes
}

max_seq_length=128 # maximum number of input tokens passed to BERT model
freeze_bert_layer=False # specifies the depth of training within the network
epochs=3
train_steps_per_epoch=50
validation_batch_size=64
validation_steps_per_epoch=50
seed=42

train_instance_count=1
train_instance_type=‘ml.c5.9xlarge’
train_volume_size=256
input_mode=‘File’
run_validation=True

hyperparameters_static={
‘freeze_bert_layer’: freeze_bert_layer,
‘max_seq_length’: max_seq_length,
‘epochs’: epochs,
‘train_steps_per_epoch’: train_steps_per_epoch,
‘validation_batch_size’: validation_batch_size,
‘validation_steps_per_epoch’: validation_steps_per_epoch,
‘seed’: seed,
‘run_validation’: run_validation
}

from sagemaker.tuner import IntegerParameter
from sagemaker.tuner import ContinuousParameter
from sagemaker.tuner import CategoricalParameter

hyperparameter_ranges = {
‘learning_rate’: ContinuousParameter(0.00001, 0.00005, scaling_type=‘Linear’), # specifying continuous variable type, the tuning job will explore the range of values
‘train_batch_size’: CategoricalParameter([128, 256]), # specifying categorical variable type, the tuning job will explore only listed values
}

metric_definitions = [
{‘Name’: ‘validation:loss’, ‘Regex’: ‘val_loss: ([0-9.]+)’},
{‘Name’: ‘validation:accuracy’, ‘Regex’: ‘val_acc: ([0-9.]+)’},
]

and how do you define:

processed_train_data_s3_uri?

that assignment is given code in previous cell - you can check the original notebook

@pedroantoniak @tbucci1 thank you for the messages, could you please send me your notebooks via the email elena.sanina@deeplearning.ai

@esanina I’ve already posted the relevant code. as mentioned, it is mostly given code, the student does not add but a couple of items to one or two cells. it’s already posted to this chain. you shouldn’t need the notebook. as a staff member, do you not have access to the notebook that is provided with this course? you should be able to do a compare between what is posted here and what is provided as the starting point.

Hello @tbucci1 , thank you for the message. In the Question 1 could you please try to construct the Amazon SageMaker channels for S3 input data sources using the function “TrainingInput(s3_data=…)”, it should work then.

1 Like

Yes, C3_W1 Exercise 1 is a little weird. You can do it ‘incorrectly’ (according to the grader), and still get 85/100 points on the C3_W1 lab.

If you use the TrainingInput object twice in the creation of the data_channels dictionary in Exercise 1 (as in: TrainingInput(s3_data=…)), you can achieve 100/100 points on the lab–at least that was my experience after I achieved 85 points on the lab and then returned to ‘fix’ just Exercise 1. (I did not re-run the whole notebook after fixing Exercise 1, because time would have run out before all the cells had run). Remember to save your notebook and run the last cell before you resubmit to the grader.