harbor run -t LiteCoder/imdb-sentiment-classifierharbor download LiteCoder/imdb-sentiment-classifierBuild and train a binary sentiment classification model on the IMDB movie review dataset using PyTorch. The model must achieve at least 85% accuracy on the test set.
torch and torchvision or transformers library)/app/main.py — running python main.py must execute the full pipeline (data loading, preprocessing, training, evaluation, and output generation)datasets library (load_dataset("imdb")) or downloaded and extracted programmaticallytext field (the review string) and a label field (0 = negative, 1 = positive)transformers) or build a custom architecture (e.g., LSTM, CNN-based)Predictions file — /app/output.json
A JSON file with the following structure:
{
"metrics": {
"accuracy": 0.87,
"precision": 0.86,
"recall": 0.88,
"f1": 0.87
},
"num_test_samples": 25000,
"model_type": "<string describing the model used>"
}
accuracy must be ≥ 0.85model_type is a free-form string (e.g., "bert-base-uncased", "LSTM")Saved model artifacts — /app/saved_model/
Save the trained model weights and any necessary tokenizer/vocabulary files into this directory so the model can be reloaded for inference. The directory must exist and contain at least one file after execution.
python main.py from /app//app/output.json must be valid JSON and parseable by json.load()/app/saved_model/ directory must be created and non-empty after executionaccuracy, precision, recall, f1) must be present in the output and computed on the test split