initial setupt
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
python 3.11
|
||||||
@@ -0,0 +1,582 @@
|
|||||||
|
# Fine-Tune Task: NLP Pipeline Framework
|
||||||
|
|
||||||
|
A comprehensive framework for fine-tuning NLP models with organized YAML configurations, supporting multiple tasks (classification, completion, styling, matching).
|
||||||
|
|
||||||
|
## 🎯 Supported Tasks
|
||||||
|
|
||||||
|
This framework supports multiple NLP tasks with organized configurations:
|
||||||
|
|
||||||
|
- **Classification**: Text classification, sentiment analysis, topic classification
|
||||||
|
- **Completion**: Text generation, code completion, story generation
|
||||||
|
- **Styling**: Style transfer, tone classification, writing style adaptation
|
||||||
|
- **Matching**: Semantic matching, entity matching, similarity scoring
|
||||||
|
|
||||||
|
### Current Implementation Status
|
||||||
|
|
||||||
|
- ✅ **Classification**: Fully implemented with emotion classification example
|
||||||
|
- 🔄 **Completion**: Planned for future updates
|
||||||
|
- 🔄 **Styling**: Planned for future updates
|
||||||
|
- 🔄 **Matching**: Planned for future updates
|
||||||
|
|
||||||
|
**Note**: Currently only classification task is supported. Other tasks (completion, styling, matching) are planned for future updates.
|
||||||
|
|
||||||
|
## 🏗️ Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
fine-tune-task/
|
||||||
|
├── configs/ # YAML configuration files
|
||||||
|
│ ├── classification/ # ✅ Implemented
|
||||||
|
│ │ ├── emotion.yaml # Emotion classification
|
||||||
|
│ │ └── custom.yaml # Custom dataset
|
||||||
|
│ ├── completion/ # 🔄 Planned for future updates
|
||||||
|
│ ├── styling/ # 🔄 Planned for future updates
|
||||||
|
│ └── matching/ # 🔄 Planned for future updates
|
||||||
|
├── data/ # Data directories
|
||||||
|
│ ├── raw/ # Raw input data
|
||||||
|
│ │ ├── classification/ # ✅ Implemented
|
||||||
|
│ │ ├── completion/ # 🔄 Planned for future updates
|
||||||
|
│ │ ├── styling/ # 🔄 Planned for future updates
|
||||||
|
│ │ └── matching/ # 🔄 Planned for future updates
|
||||||
|
│ └── processed/ # Processed data
|
||||||
|
│ ├── classification/ # ✅ Implemented
|
||||||
|
│ ├── completion/ # 🔄 Planned for future updates
|
||||||
|
│ ├── styling/ # 🔄 Planned for future updates
|
||||||
|
│ └── matching/ # 🔄 Planned for future updates
|
||||||
|
├── pipelines/ # Core pipeline scripts
|
||||||
|
│ ├── classification/ # ✅ Implemented
|
||||||
|
│ │ ├── data_processor.py # Data processing
|
||||||
|
│ │ ├── train.py # Training
|
||||||
|
│ │ └── inference.py # Inference
|
||||||
|
│ ├── completion/ # 🔄 Framework ready
|
||||||
|
│ ├── styling/ # 🔄 Framework ready
|
||||||
|
│ └── matching/ # 🔄 Framework ready
|
||||||
|
├── scripts/ # User-friendly scripts
|
||||||
|
│ ├── classification/ # ✅ Implemented
|
||||||
|
│ │ ├── data_processor.py # Data processing script
|
||||||
|
│ │ ├── trainer.py # Training script
|
||||||
|
│ │ └── inference.py # Inference script
|
||||||
|
│ ├── completion/ # 🔄 Framework ready
|
||||||
|
│ ├── styling/ # 🔄 Framework ready
|
||||||
|
│ └── matching/ # 🔄 Framework ready
|
||||||
|
├── results/ # Model outputs
|
||||||
|
│ ├── classification/ # ✅ Implemented
|
||||||
|
│ ├── completion/ # 🔄 Ready
|
||||||
|
│ ├── styling/ # 🔄 Ready
|
||||||
|
│ └── matching/ # 🔄 Ready
|
||||||
|
└── utils/ # Shared utility modules
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🚀 Quick Start (Classification Task)
|
||||||
|
|
||||||
|
### 1. Setup Environment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
# Set Python path
|
||||||
|
export PYTHONPATH=.
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Data Processing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Process emotion dataset
|
||||||
|
python scripts/classification/data_processor.py --config configs/classification/emotion.yaml
|
||||||
|
|
||||||
|
# Process with custom parameters
|
||||||
|
python scripts/classification/data_processor.py --config configs/classification/emotion.yaml --max-samples 1000
|
||||||
|
|
||||||
|
# Check output location
|
||||||
|
ls -la ./data/processed/classification/emotion/classification/
|
||||||
|
```
|
||||||
|
|
||||||
|
**Expected Output:**
|
||||||
|
```
|
||||||
|
✅ Data processing completed successfully!
|
||||||
|
Data source: huggingface
|
||||||
|
Dataset: dair-ai/emotion
|
||||||
|
Total samples: 2999
|
||||||
|
Unique labels: 6
|
||||||
|
Split sizes: {'train': 1000, 'validation': 999, 'test': 1000}
|
||||||
|
Output directory: ./data/processed/classification/emotion
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Model Training
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Train using processed data
|
||||||
|
python scripts/classification/trainer.py --config configs/classification/emotion.yaml
|
||||||
|
|
||||||
|
# Train with custom parameters
|
||||||
|
python scripts/classification/trainer.py --config configs/classification/emotion.yaml --num-epochs 5 --batch-size 32
|
||||||
|
|
||||||
|
# Check model output
|
||||||
|
ls -la ./results/classification/emotion_model/
|
||||||
|
```
|
||||||
|
|
||||||
|
**Expected Output:**
|
||||||
|
```
|
||||||
|
✅ Training completed successfully!
|
||||||
|
Model: bert-base-uncased
|
||||||
|
Data directory: ./data/processed/classification/emotion
|
||||||
|
Training for 3 epochs with batch size 16
|
||||||
|
Model saved to: ./results/classification/emotion_model
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Model Inference
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run inference
|
||||||
|
python scripts/classification/inference.py --config configs/classification/emotion.yaml --input-text "I love this product!"
|
||||||
|
|
||||||
|
# File-based inference
|
||||||
|
python scripts/classification/inference.py --config configs/classification/emotion.yaml --input-file input.txt --output-file predictions.jsonl
|
||||||
|
```
|
||||||
|
|
||||||
|
**Expected Output:**
|
||||||
|
```
|
||||||
|
✅ Inference completed successfully!
|
||||||
|
Loading model from: ./results/classification/emotion_model
|
||||||
|
Predicted label: joy
|
||||||
|
Confidence: 0.8542
|
||||||
|
Top 3 predictions:
|
||||||
|
- joy: 0.8542
|
||||||
|
- love: 0.1234
|
||||||
|
- surprise: 0.0224
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🔧 Adding New Tasks
|
||||||
|
|
||||||
|
To add a new task (e.g., completion, styling, matching), follow these steps:
|
||||||
|
|
||||||
|
### Step 1: Create Task Directory Structure
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Create task directories
|
||||||
|
mkdir -p configs/completion
|
||||||
|
mkdir -p data/raw/completion data/processed/completion
|
||||||
|
mkdir -p pipelines/completion
|
||||||
|
mkdir -p scripts/completion
|
||||||
|
mkdir -p results/completion
|
||||||
|
mkdir -p tasks/completion
|
||||||
|
mkdir -p models/completion
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 2: Create Task Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Create YAML configuration for new task
|
||||||
|
cat > configs/completion/text_generation.yaml << 'EOF'
|
||||||
|
# Text Generation Task Configuration
|
||||||
|
task:
|
||||||
|
name: "completion"
|
||||||
|
type: "text_generation"
|
||||||
|
|
||||||
|
# Data Processing Configuration
|
||||||
|
data:
|
||||||
|
source: "huggingface"
|
||||||
|
dataset_name: "your-dataset-name"
|
||||||
|
output_dir: "./data/processed/completion/text_generation"
|
||||||
|
max_samples: 1000
|
||||||
|
# ... other data parameters
|
||||||
|
|
||||||
|
# Model Configuration
|
||||||
|
model:
|
||||||
|
name: "gpt2" # Different model for completion
|
||||||
|
max_length: 1024
|
||||||
|
# ... model parameters
|
||||||
|
|
||||||
|
# Training Configuration
|
||||||
|
training:
|
||||||
|
num_epochs: 3
|
||||||
|
batch_size: 8 # Smaller batch for generation
|
||||||
|
learning_rate: 5e-5
|
||||||
|
data_dir: "./data/processed/completion/text_generation"
|
||||||
|
output_dir: "./results/completion/text_generation_model"
|
||||||
|
|
||||||
|
# Inference Configuration
|
||||||
|
inference:
|
||||||
|
model_path: "./results/completion/text_generation_model"
|
||||||
|
device: "auto"
|
||||||
|
batch_size: 1 # Generation is typically one at a time
|
||||||
|
max_length: 100
|
||||||
|
temperature: 0.7
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 3: Create Pipeline Scripts
|
||||||
|
|
||||||
|
Copy and modify the classification pipeline scripts:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Copy classification scripts as templates
|
||||||
|
cp pipelines/classification/data_processor.py pipelines/completion/
|
||||||
|
cp pipelines/classification/train.py pipelines/completion/
|
||||||
|
cp pipelines/classification/inference.py pipelines/completion/
|
||||||
|
|
||||||
|
# Copy task scripts
|
||||||
|
cp scripts/classification/data_processor.py scripts/completion/
|
||||||
|
cp scripts/classification/trainer.py scripts/completion/
|
||||||
|
cp scripts/classification/inference.py scripts/completion/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 4: Modify Pipeline Code
|
||||||
|
|
||||||
|
Update the pipeline scripts for your specific task:
|
||||||
|
|
||||||
|
1. **Data Processor** (`pipelines/completion/data_processor.py`):
|
||||||
|
- Update data loading logic for completion datasets
|
||||||
|
- Modify preprocessing for text generation
|
||||||
|
- Adjust output format for completion tasks
|
||||||
|
|
||||||
|
2. **Trainer** (`pipelines/completion/train.py`):
|
||||||
|
- Change model type to generation models (GPT, T5, etc.)
|
||||||
|
- Update training loop for text generation
|
||||||
|
- Modify evaluation metrics
|
||||||
|
|
||||||
|
3. **Inference** (`pipelines/completion/inference.py`):
|
||||||
|
- Update inference for text generation
|
||||||
|
- Add generation parameters (temperature, top-k, etc.)
|
||||||
|
- Modify output format
|
||||||
|
|
||||||
|
### Step 5: Update Task Scripts
|
||||||
|
|
||||||
|
Modify the task scripts to use your new pipeline:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# scripts/completion/data_processor.py
|
||||||
|
def run_with_yaml_config(config_path: str, **cli_overrides):
|
||||||
|
cmd = [
|
||||||
|
"python", "pipelines/completion/data_processor.py", # Updated path
|
||||||
|
"--config", config_path
|
||||||
|
]
|
||||||
|
# ... rest of the function
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 6: Create Task-Specific Models
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Create model directory
|
||||||
|
mkdir -p models/completion
|
||||||
|
|
||||||
|
# Add task-specific model classes
|
||||||
|
cat > models/completion/text_generator.py << 'EOF'
|
||||||
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
|
|
||||||
|
class TextGenerator:
|
||||||
|
def __init__(self, model_name):
|
||||||
|
self.model = AutoModelForCausalLM.from_pretrained(model_name)
|
||||||
|
self.tokenizer = AutoTokenizer.from_pretrained(model_name)
|
||||||
|
|
||||||
|
def generate(self, prompt, max_length=100, temperature=0.7):
|
||||||
|
# Implementation for text generation
|
||||||
|
pass
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 7: Test Your New Task
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Test data processing
|
||||||
|
python scripts/completion/data_processor.py --config configs/completion/text_generation.yaml
|
||||||
|
|
||||||
|
# Test training
|
||||||
|
python scripts/completion/trainer.py --config configs/completion/text_generation.yaml
|
||||||
|
|
||||||
|
# Test inference
|
||||||
|
python scripts/completion/inference.py --config configs/completion/text_generation.yaml --input-text "Once upon a time"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📋 YAML Configuration Guide
|
||||||
|
|
||||||
|
### Configuration Structure
|
||||||
|
|
||||||
|
Each YAML file is organized into clear sections:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Task Configuration
|
||||||
|
task:
|
||||||
|
name: "classification" # or "completion", "styling", "matching"
|
||||||
|
type: "sequence_classification" # or "text_generation", "style_transfer", "semantic_matching"
|
||||||
|
|
||||||
|
# Data Processing Configuration
|
||||||
|
data:
|
||||||
|
source: "huggingface" # "huggingface" or "custom"
|
||||||
|
dataset_name: "dair-ai/emotion" # HuggingFace dataset name
|
||||||
|
output_dir: "./data/processed/classification/emotion"
|
||||||
|
max_samples: 1000 # Limit dataset size
|
||||||
|
# ... other data parameters
|
||||||
|
|
||||||
|
# Model Configuration
|
||||||
|
model:
|
||||||
|
name: "bert-base-uncased" # Model from HuggingFace Hub
|
||||||
|
max_length: 512 # Sequence length
|
||||||
|
num_labels: 6 # Number of classes
|
||||||
|
|
||||||
|
# Training Configuration
|
||||||
|
training:
|
||||||
|
num_epochs: 3 # Training epochs
|
||||||
|
batch_size: 16 # Batch size
|
||||||
|
learning_rate: 2e-5 # Learning rate
|
||||||
|
data_dir: "./data/processed/classification/emotion"
|
||||||
|
output_dir: "./results/classification/emotion_model"
|
||||||
|
|
||||||
|
# Inference Configuration
|
||||||
|
inference:
|
||||||
|
model_path: "./results/classification/emotion_model"
|
||||||
|
device: "auto" # "auto", "cuda", "cpu"
|
||||||
|
batch_size: 32 # Inference batch size
|
||||||
|
return_top_k: 3 # Top K predictions
|
||||||
|
```
|
||||||
|
|
||||||
|
### Available Configuration Files
|
||||||
|
|
||||||
|
- `configs/classification/emotion.yaml` - Emotion classification with HuggingFace dataset
|
||||||
|
- `configs/classification/custom.yaml` - Custom dataset processing
|
||||||
|
|
||||||
|
## 🔧 Usage Examples
|
||||||
|
|
||||||
|
### Data Processing Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Use YAML config only
|
||||||
|
python scripts/classification/data_processor.py --config configs/classification/emotion.yaml
|
||||||
|
|
||||||
|
# 2. Override YAML values
|
||||||
|
python scripts/classification/data_processor.py --config configs/classification/emotion.yaml --max-samples 500
|
||||||
|
|
||||||
|
# 3. Use CLI only (backward compatibility)
|
||||||
|
python scripts/classification/data_processor.py --data-source huggingface --dataset-name dair-ai/emotion
|
||||||
|
|
||||||
|
# 4. Run examples
|
||||||
|
python scripts/classification/data_processor.py examples
|
||||||
|
```
|
||||||
|
|
||||||
|
### Training Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Use YAML config only
|
||||||
|
python scripts/classification/trainer.py --config configs/classification/emotion.yaml
|
||||||
|
|
||||||
|
# 2. Override YAML values
|
||||||
|
python scripts/classification/trainer.py --config configs/classification/emotion.yaml --num-epochs 5
|
||||||
|
|
||||||
|
# 3. Use CLI only
|
||||||
|
python scripts/classification/trainer.py --model-name bert-base-uncased --num-epochs 3
|
||||||
|
|
||||||
|
# 4. Run examples
|
||||||
|
python scripts/classification/trainer.py examples
|
||||||
|
```
|
||||||
|
|
||||||
|
### Inference Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Single text prediction
|
||||||
|
python scripts/classification/inference.py --config configs/classification/emotion.yaml --input-text "I love this product!"
|
||||||
|
|
||||||
|
# 2. File-based prediction
|
||||||
|
python scripts/classification/inference.py --config configs/classification/emotion.yaml --input-file input.txt --output-file predictions.jsonl
|
||||||
|
|
||||||
|
# 3. Interactive mode
|
||||||
|
python scripts/classification/inference.py --config configs/classification/emotion.yaml
|
||||||
|
|
||||||
|
# 4. Run examples
|
||||||
|
python scripts/classification/inference.py examples
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🐛 Troubleshooting Common Errors
|
||||||
|
|
||||||
|
### 1. ModuleNotFoundError: No module named 'utils'
|
||||||
|
|
||||||
|
**Error:**
|
||||||
|
```
|
||||||
|
ModuleNotFoundError: No module named 'utils'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Solution:**
|
||||||
|
```bash
|
||||||
|
# Set Python path before running scripts
|
||||||
|
export PYTHONPATH=.
|
||||||
|
python scripts/classification/data_processor.py --config configs/classification/emotion.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Model Path Not Found
|
||||||
|
|
||||||
|
**Error:**
|
||||||
|
```
|
||||||
|
❌ Model path not found: ./results/classification/emotion_model
|
||||||
|
```
|
||||||
|
|
||||||
|
**Solution:**
|
||||||
|
```bash
|
||||||
|
# Train the model first
|
||||||
|
python scripts/classification/trainer.py --config configs/classification/emotion.yaml
|
||||||
|
|
||||||
|
# Then run inference
|
||||||
|
python scripts/classification/inference.py --config configs/classification/emotion.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Data Directory Not Found
|
||||||
|
|
||||||
|
**Error:**
|
||||||
|
```
|
||||||
|
❌ Data directory not found: ./data/processed/classification/emotion
|
||||||
|
```
|
||||||
|
|
||||||
|
**Solution:**
|
||||||
|
```bash
|
||||||
|
# Process data first
|
||||||
|
python scripts/classification/data_processor.py --config configs/classification/emotion.yaml
|
||||||
|
|
||||||
|
# Then train
|
||||||
|
python scripts/classification/trainer.py --config configs/classification/emotion.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. YAML Configuration Errors
|
||||||
|
|
||||||
|
**Error:**
|
||||||
|
```
|
||||||
|
data_processor.py: error: --data-source is required (either in YAML config or CLI)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Solution:**
|
||||||
|
Check your YAML file structure. It should have:
|
||||||
|
```yaml
|
||||||
|
data:
|
||||||
|
source: "huggingface" # Not data_source
|
||||||
|
dataset_name: "dair-ai/emotion"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. HuggingFace Download Issues
|
||||||
|
|
||||||
|
**Error:**
|
||||||
|
```
|
||||||
|
KeyboardInterrupt during model download
|
||||||
|
```
|
||||||
|
|
||||||
|
**Solution:**
|
||||||
|
```bash
|
||||||
|
# Use smaller dataset for testing
|
||||||
|
python scripts/classification/data_processor.py --config configs/classification/emotion.yaml --max-samples 100
|
||||||
|
|
||||||
|
# Or use cached models
|
||||||
|
export HF_HOME=./cache
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. CUDA/GPU Issues
|
||||||
|
|
||||||
|
**Error:**
|
||||||
|
```
|
||||||
|
RuntimeError: CUDA out of memory
|
||||||
|
```
|
||||||
|
|
||||||
|
**Solution:**
|
||||||
|
```bash
|
||||||
|
# Reduce batch size
|
||||||
|
python scripts/classification/trainer.py --config configs/classification/emotion.yaml --batch-size 8
|
||||||
|
|
||||||
|
# Or use CPU
|
||||||
|
python scripts/classification/trainer.py --config configs/classification/emotion.yaml --device cpu
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📊 Monitoring and Logs
|
||||||
|
|
||||||
|
### Check Processing Status
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check data processing output
|
||||||
|
ls -la ./data/processed/classification/emotion/classification/
|
||||||
|
|
||||||
|
# Check training output
|
||||||
|
ls -la ./results/classification/emotion_model/
|
||||||
|
|
||||||
|
# Check logs
|
||||||
|
tail -f logs/training.log
|
||||||
|
```
|
||||||
|
|
||||||
|
### Expected File Structure After Processing
|
||||||
|
|
||||||
|
```
|
||||||
|
./data/processed/classification/emotion/classification/
|
||||||
|
├── train.jsonl # Training data
|
||||||
|
├── validation.jsonl # Validation data
|
||||||
|
└── test.jsonl # Test data
|
||||||
|
|
||||||
|
./results/classification/emotion_model/
|
||||||
|
├── config.json # Model configuration
|
||||||
|
├── pytorch_model.bin # Model weights
|
||||||
|
├── tokenizer.json # Tokenizer
|
||||||
|
└── label_info.json # Label mappings
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🔄 Workflow Summary
|
||||||
|
|
||||||
|
1. **Setup**: Install dependencies and set PYTHONPATH
|
||||||
|
2. **Data Processing**: Process raw data into organized splits
|
||||||
|
3. **Training**: Train model using processed data
|
||||||
|
4. **Inference**: Use trained model for predictions
|
||||||
|
5. **Monitoring**: Check logs and outputs for errors
|
||||||
|
|
||||||
|
## 📝 Creating Custom Configurations
|
||||||
|
|
||||||
|
### For New Datasets
|
||||||
|
|
||||||
|
1. Copy existing config:
|
||||||
|
```bash
|
||||||
|
cp configs/classification/emotion.yaml configs/classification/my_dataset.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Modify parameters:
|
||||||
|
```yaml
|
||||||
|
data:
|
||||||
|
source: "huggingface"
|
||||||
|
dataset_name: "your-dataset-name"
|
||||||
|
output_dir: "./data/processed/classification/my_dataset"
|
||||||
|
# ... other parameters
|
||||||
|
|
||||||
|
training:
|
||||||
|
data_dir: "./data/processed/classification/my_dataset"
|
||||||
|
output_dir: "./results/classification/my_dataset_model"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Run pipeline:
|
||||||
|
```bash
|
||||||
|
python scripts/classification/data_processor.py --config configs/classification/my_dataset.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
### For Custom Data
|
||||||
|
|
||||||
|
1. Use custom config:
|
||||||
|
```yaml
|
||||||
|
data:
|
||||||
|
source: "custom"
|
||||||
|
data_path: "./data/raw/my_data.jsonl"
|
||||||
|
output_dir: "./data/processed/classification/my_custom_dataset"
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Run processing:
|
||||||
|
```bash
|
||||||
|
python scripts/classification/data_processor.py --config configs/classification/custom.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🎯 Best Practices
|
||||||
|
|
||||||
|
1. **Always check output directories** before running next step
|
||||||
|
2. **Use small datasets for testing** before full runs
|
||||||
|
3. **Monitor logs** for errors and warnings
|
||||||
|
4. **Backup configurations** before major changes
|
||||||
|
5. **Use version control** for YAML files
|
||||||
|
6. **Test with CLI overrides** for quick experiments
|
||||||
|
|
||||||
|
## 📞 Support
|
||||||
|
|
||||||
|
For issues and questions:
|
||||||
|
1. Check the troubleshooting section above
|
||||||
|
2. Review logs in the output directories
|
||||||
|
3. Verify YAML configuration structure
|
||||||
|
4. Test with smaller datasets first
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Happy fine-tuning! 🚀**
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
# Base configuration for all tasks
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
# Comprehensive Custom Dataset Classification Configuration
|
||||||
|
# This file defines all parameters for processing custom classification datasets
|
||||||
|
# Organized by level: data processing, model, training, and inference
|
||||||
|
|
||||||
|
# Task Configuration
|
||||||
|
task:
|
||||||
|
name: "classification" # Task type: classification, completion, styling, matching
|
||||||
|
type: "sequence_classification" # Model type: sequence_classification, token_classification, etc.
|
||||||
|
|
||||||
|
# Data Processing Configuration
|
||||||
|
data:
|
||||||
|
source: "custom" # Data source: "huggingface" or "custom"
|
||||||
|
dataset_name: null # HuggingFace dataset name (not used for custom data)
|
||||||
|
data_path: "./data/classification/train.jsonl" # Path to custom data file (required for custom source)
|
||||||
|
data_format: "jsonl" # Data format: "jsonl", "csv", "json"
|
||||||
|
|
||||||
|
# Field Mapping
|
||||||
|
input_field: "text" # Field name containing input text
|
||||||
|
label_field: "label" # Field name containing labels
|
||||||
|
id_field: "id" # Optional ID field name (set to null if not available)
|
||||||
|
|
||||||
|
# Processing Parameters
|
||||||
|
max_samples: 1000 # Maximum samples to process (null for all samples)
|
||||||
|
train_split: 0.8 # Training split ratio (0.0 to 1.0)
|
||||||
|
validation_split: 0.1 # Validation split ratio (0.0 to 1.0)
|
||||||
|
test_split: 0.1 # Test split ratio (0.0 to 1.0)
|
||||||
|
|
||||||
|
# Text Preprocessing
|
||||||
|
clean_text: true # Clean and normalize text
|
||||||
|
remove_special_chars: false # Remove special characters from text
|
||||||
|
lowercase: true # Convert text to lowercase
|
||||||
|
min_length: 10 # Minimum text length (filter out shorter texts)
|
||||||
|
max_length: 1000 # Maximum text length (truncate longer texts)
|
||||||
|
|
||||||
|
# Label Processing
|
||||||
|
label_encoding: "auto" # Label encoding: "auto", "numeric", "string"
|
||||||
|
multilabel: false # Enable multilabel classification
|
||||||
|
label_separator: "," # Separator for multilabel datasets
|
||||||
|
|
||||||
|
# Output Configuration
|
||||||
|
output_format: "classification" # Output format: "classification", "instruction", "conversation", "qa"
|
||||||
|
output_dir: "./data/processed/classification/custom_dataset" # Specific output directory for custom dataset
|
||||||
|
|
||||||
|
# HuggingFace Specific (not used for custom data)
|
||||||
|
hf_split: "train" # HuggingFace dataset split to use
|
||||||
|
hf_cache_dir: null # HuggingFace cache directory (null for default)
|
||||||
|
|
||||||
|
# Split Configuration (Advanced)
|
||||||
|
test_split_from: "train" # Source for test split: "train", "use_test_if_available", "use_val_if_available"
|
||||||
|
val_split_from: "train" # Source for validation split: "train", "use_val_if_available"
|
||||||
|
|
||||||
|
# Custom Data Specific
|
||||||
|
encoding: "utf-8" # File encoding for custom data
|
||||||
|
delimiter: "," # Delimiter for CSV files
|
||||||
|
|
||||||
|
# Model Configuration
|
||||||
|
model:
|
||||||
|
name: "bert-base-uncased" # Model name from HuggingFace Hub
|
||||||
|
max_length: 512 # Maximum sequence length for tokenization
|
||||||
|
num_labels: 3 # Number of classification labels (adjust based on your data)
|
||||||
|
|
||||||
|
# Training Configuration
|
||||||
|
training:
|
||||||
|
num_epochs: 3 # Number of training epochs
|
||||||
|
batch_size: 16 # Training batch size
|
||||||
|
learning_rate: 2e-5 # Learning rate (typical range: 1e-5 to 5e-5)
|
||||||
|
weight_decay: 0.01 # Weight decay for optimizer (typical range: 0.01 to 0.1)
|
||||||
|
lr_scheduler_type: "linear" # Scheduler type: "linear", "cosine", "polynomial"
|
||||||
|
warmup_ratio: 0.1 # Warmup ratio for scheduler (0.0 to 1.0)
|
||||||
|
data_dir: "./data/processed/classification/custom_dataset" # Directory containing train/validation/test JSONL files
|
||||||
|
output_dir: "./results/classification/custom_model" # Output directory for saved model
|
||||||
|
|
||||||
|
# Inference Configuration
|
||||||
|
inference:
|
||||||
|
model_path: "./results/classification/custom_model" # Path to saved model directory
|
||||||
|
device: "auto" # Device: "auto", "cuda", "cpu"
|
||||||
|
batch_size: 32 # Batch size for inference
|
||||||
|
return_probabilities: true # Return all class probabilities
|
||||||
|
return_top_k: 3 # Return top K predictions
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
# Comprehensive Classification Configuration
|
||||||
|
# This file defines all parameters for emotion classification using the dair-ai/emotion dataset
|
||||||
|
# Organized by level: data processing, model, training, and inference
|
||||||
|
|
||||||
|
# Task Configuration
|
||||||
|
task:
|
||||||
|
name: "classification" # Task type: classification, completion, styling, matching
|
||||||
|
type: "sequence_classification" # Model type: sequence_classification, token_classification, etc.
|
||||||
|
|
||||||
|
# Data Processing Configuration
|
||||||
|
data:
|
||||||
|
source: "huggingface" # Data source: "huggingface" or "custom"
|
||||||
|
dataset_name: "dair-ai/emotion" # HuggingFace dataset name (required for huggingface source)
|
||||||
|
data_path: null # Path to custom data file (required for custom source)
|
||||||
|
data_format: "jsonl" # Data format: "jsonl", "csv", "json" (for custom data)
|
||||||
|
|
||||||
|
# Field Mapping
|
||||||
|
input_field: "text" # Field name containing input text
|
||||||
|
label_field: "label" # Field name containing labels
|
||||||
|
id_field: null # Optional ID field name
|
||||||
|
|
||||||
|
# Processing Parameters
|
||||||
|
max_samples: 1000 # Maximum samples to process (null for all samples)
|
||||||
|
train_split: 0.8 # Training split ratio (0.0 to 1.0)
|
||||||
|
validation_split: 0.1 # Validation split ratio (0.0 to 1.0)
|
||||||
|
test_split: 0.1 # Test split ratio (0.0 to 1.0)
|
||||||
|
|
||||||
|
# Text Preprocessing
|
||||||
|
clean_text: true # Clean and normalize text
|
||||||
|
remove_special_chars: false # Remove special characters from text
|
||||||
|
lowercase: true # Convert text to lowercase
|
||||||
|
min_length: 10 # Minimum text length (filter out shorter texts)
|
||||||
|
max_length: 1000 # Maximum text length (truncate longer texts)
|
||||||
|
|
||||||
|
# Label Processing
|
||||||
|
label_encoding: "auto" # Label encoding: "auto", "numeric", "string"
|
||||||
|
multilabel: false # Enable multilabel classification
|
||||||
|
label_separator: "," # Separator for multilabel datasets
|
||||||
|
|
||||||
|
# Output Configuration
|
||||||
|
output_format: "classification" # Output format: "classification", "instruction", "conversation", "qa"
|
||||||
|
output_dir: "./data/processed/classification/emotion" # Specific output directory for this dataset
|
||||||
|
|
||||||
|
# HuggingFace Specific
|
||||||
|
hf_split: "train" # HuggingFace dataset split to use
|
||||||
|
hf_cache_dir: null # HuggingFace cache directory (null for default)
|
||||||
|
|
||||||
|
# Split Configuration (Advanced)
|
||||||
|
test_split_from: "train" # Source for test split: "train", "use_test_if_available", "use_val_if_available"
|
||||||
|
val_split_from: "train" # Source for validation split: "train", "use_val_if_available"
|
||||||
|
|
||||||
|
# Custom Data Specific
|
||||||
|
encoding: "utf-8" # File encoding for custom data
|
||||||
|
delimiter: "," # Delimiter for CSV files
|
||||||
|
|
||||||
|
# Model Configuration
|
||||||
|
model:
|
||||||
|
name: "bert-base-uncased" # Model name from HuggingFace Hub
|
||||||
|
max_length: 512 # Maximum sequence length for tokenization
|
||||||
|
num_labels: 6 # Number of classification labels
|
||||||
|
|
||||||
|
# Training Configuration
|
||||||
|
training:
|
||||||
|
num_epochs: 3 # Number of training epochs
|
||||||
|
batch_size: 16 # Training batch size
|
||||||
|
learning_rate: 2e-5 # Learning rate (typical range: 1e-5 to 5e-5)
|
||||||
|
weight_decay: 0.01 # Weight decay for optimizer (typical range: 0.01 to 0.1)
|
||||||
|
lr_scheduler_type: "linear" # Scheduler type: "linear", "cosine", "polynomial"
|
||||||
|
warmup_ratio: 0.1 # Warmup ratio for scheduler (0.0 to 1.0)
|
||||||
|
data_dir: "./data/processed/classification/emotion" # Directory containing train/validation/test JSONL files
|
||||||
|
output_dir: "./results/classification/emotion_model" # Output directory for saved model
|
||||||
|
|
||||||
|
# Inference Configuration
|
||||||
|
inference:
|
||||||
|
model_path: "./results/classification/emotion_model" # Path to saved model directory
|
||||||
|
device: "auto" # Device: "auto", "cuda", "cpu"
|
||||||
|
batch_size: 32 # Batch size for inference
|
||||||
|
return_probabilities: true # Return all class probabilities
|
||||||
|
return_top_k: 3 # Return top K predictions
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
task:
|
||||||
|
name: "completion"
|
||||||
|
type: "text_generation"
|
||||||
|
|
||||||
|
data:
|
||||||
|
source: "huggingface"
|
||||||
|
dataset_name: "wikitext-2-raw-v1"
|
||||||
|
input_field: "text"
|
||||||
|
max_length: 512
|
||||||
|
train_split: 0.8
|
||||||
|
validation_split: 0.1
|
||||||
|
test_split: 0.1
|
||||||
|
|
||||||
|
model:
|
||||||
|
name: "gpt2"
|
||||||
|
max_length: 512
|
||||||
|
|
||||||
|
training:
|
||||||
|
num_epochs: 3
|
||||||
|
batch_size: 8
|
||||||
|
learning_rate: 5e-5
|
||||||
|
weight_decay: 0.01
|
||||||
|
warmup_ratio: 0.1
|
||||||
|
lr_scheduler_type: "linear"
|
||||||
|
|
||||||
|
inference:
|
||||||
|
batch_size: 16
|
||||||
|
max_new_tokens: 100
|
||||||
|
temperature: 0.7
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
task:
|
||||||
|
name: "matching"
|
||||||
|
type: "semantic_matching"
|
||||||
|
|
||||||
|
data:
|
||||||
|
source: "huggingface"
|
||||||
|
dataset_name: "sentence-transformers/paraphrase-MiniLM-L3-v2"
|
||||||
|
input_field: "sentence1"
|
||||||
|
target_field: "sentence2"
|
||||||
|
label_field: "label"
|
||||||
|
max_length: 128
|
||||||
|
train_split: 0.8
|
||||||
|
validation_split: 0.1
|
||||||
|
test_split: 0.1
|
||||||
|
|
||||||
|
model:
|
||||||
|
name: "sentence-transformers/all-MiniLM-L6-v2"
|
||||||
|
max_length: 128
|
||||||
|
|
||||||
|
training:
|
||||||
|
num_epochs: 3
|
||||||
|
batch_size: 32
|
||||||
|
learning_rate: 2e-5
|
||||||
|
weight_decay: 0.01
|
||||||
|
warmup_ratio: 0.1
|
||||||
|
lr_scheduler_type: "linear"
|
||||||
|
|
||||||
|
inference:
|
||||||
|
batch_size: 64
|
||||||
|
similarity_threshold: 0.5
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
task:
|
||||||
|
name: "styling"
|
||||||
|
type: "style_transfer"
|
||||||
|
|
||||||
|
data:
|
||||||
|
source: "custom"
|
||||||
|
input_field: "text"
|
||||||
|
style_field: "style"
|
||||||
|
max_length: 256
|
||||||
|
train_split: 0.8
|
||||||
|
validation_split: 0.1
|
||||||
|
test_split: 0.1
|
||||||
|
|
||||||
|
model:
|
||||||
|
name: "t5-base"
|
||||||
|
max_length: 256
|
||||||
|
|
||||||
|
training:
|
||||||
|
num_epochs: 3
|
||||||
|
batch_size: 16
|
||||||
|
learning_rate: 3e-5
|
||||||
|
weight_decay: 0.01
|
||||||
|
warmup_ratio: 0.1
|
||||||
|
lr_scheduler_type: "linear"
|
||||||
|
|
||||||
|
inference:
|
||||||
|
batch_size: 32
|
||||||
|
max_new_tokens: 128
|
||||||
|
temperature: 0.8
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,999 @@
|
|||||||
|
{"text": "i still feel the longing to be with you inspite of you sitting in front of me", "label": "2"}
|
||||||
|
{"text": "i do give up at times when i feel there s no point in a friendship when one cant be bothered", "label": "3"}
|
||||||
|
{"text": "i was so proud of him and i feel so hopeful i realise this is the nature of asd if he is motivated he will let us have a small glimpse of his abilities and it seems toy story lego is the motivator at the moment", "label": "1"}
|
||||||
|
{"text": "im not joking we had the feeling they were either extremely friendly or they hadnt seen a westerner before", "label": "1"}
|
||||||
|
{"text": "i feel betrayed where i serve and fellowship by no fault of my beloved pastor and c pastor", "label": "2"}
|
||||||
|
{"text": "i used to work he feels so needy and this just screams for attention so to please him i felt obligated to give him some", "label": "0"}
|
||||||
|
{"text": "i feel less threatened by the world", "label": "4"}
|
||||||
|
{"text": "i party wah wah wah nationalism blah yay aryans wah boo jews with there stupid brown hair blah blah should feel appreciative that we even talk to them because it makes them cool by association blah blah", "label": "1"}
|
||||||
|
{"text": "i do know that i am feeling fabulous and having more energy then i have had in a long time even if my clothes are still a little snug", "label": "1"}
|
||||||
|
{"text": "i used to down a large mushroom pizza and a pitcher of beer and feel positively virtuous afterward", "label": "1"}
|
||||||
|
{"text": "i guess the man knows how to make each and every one of them feel special", "label": "1"}
|
||||||
|
{"text": "i do feel has conditions it hurts deeply and it is not pleasant", "label": "1"}
|
||||||
|
{"text": "i feeling dangerous at wimbledon width", "label": "3"}
|
||||||
|
{"text": "i dont know why i feel so frantic about this but i really want to have this particular song for my little girl to be", "label": "4"}
|
||||||
|
{"text": "im feeling a bit sentimental", "label": "0"}
|
||||||
|
{"text": "im still feeling pretty gloomy if truth be told", "label": "0"}
|
||||||
|
{"text": "i stepped outside of the house feeling glad to be home again", "label": "1"}
|
||||||
|
{"text": "i personally feel they are doomed to finish dead last in the nl central without this key cog to any championship team", "label": "0"}
|
||||||
|
{"text": "i feel accepted as long as i am real and am not pious uppity and religious for the sake of religion", "label": "1"}
|
||||||
|
{"text": "i have a sense of both in my mind s eye i feel that divine energy way up aloft and i experience its reflection in me sometimes like a rare sunny day in a rainy climate", "label": "1"}
|
||||||
|
{"text": "i feel devastated betrayed and abandoned i ask for peace and comfort and a new direction", "label": "0"}
|
||||||
|
{"text": "i feel bad listing the movies becasue i like them so much", "label": "0"}
|
||||||
|
{"text": "i feel this is a very truthful parable because it s so evident in all aspects of life", "label": "1"}
|
||||||
|
{"text": "i am feeling generous and seasonal", "label": "1"}
|
||||||
|
{"text": "ive been feeling an aching loss a void in my life in the place that she filled", "label": "0"}
|
||||||
|
{"text": "i feel like all she wants is his parents fortune which is unfortunate", "label": "0"}
|
||||||
|
{"text": "i dare not say i feel ecstatic now but hey", "label": "1"}
|
||||||
|
{"text": "i feel a surge of adrenaline and excitement as i immediately recognize these two birds to be a gorgeous pair of marbled murrelets", "label": "1"}
|
||||||
|
{"text": "im feeling generous ill give you a story as well", "label": "2"}
|
||||||
|
{"text": "i was feeling a bit disheartened until one of our black belt instructors at the dojo richard and i own asked why let anyone else set your destiny", "label": "0"}
|
||||||
|
{"text": "i must not be left to feel foolish lost unhappy and with distaste", "label": "0"}
|
||||||
|
{"text": "i feel naughty a href http www", "label": "2"}
|
||||||
|
{"text": "i may be starting to feel paranoid or maybe insecure but im just a mere human being who yearns to be loved to be cared of and to be noticed", "label": "4"}
|
||||||
|
{"text": "i simply feel it is important to be presented well in front of others and when one is asked about himself there should be evident support in why he thinks so of himself as for any type of discussions during which perspectives on a topic are being exchanged", "label": "1"}
|
||||||
|
{"text": "i feel that this is a very important subject to discuss", "label": "1"}
|
||||||
|
{"text": "i remember feeling annoyed but also wondering if i shouldn t stop and buy something", "label": "3"}
|
||||||
|
{"text": "i feel pain even when i see an unfortunate person in street begging why does my mind race and think why is that person there", "label": "0"}
|
||||||
|
{"text": "i am not feeling very clever or creative", "label": "1"}
|
||||||
|
{"text": "i feel angry at him for being so selfish and giving me absolutely nothing to go on", "label": "3"}
|
||||||
|
{"text": "i asked him what was making him feel so fabulous and he said i m healthy my family is healthy and we live in a free country", "label": "1"}
|
||||||
|
{"text": "i just didnt feel thrilled let alone excited", "label": "1"}
|
||||||
|
{"text": "im feeling reluctant to change anything because it is all working so well", "label": "4"}
|
||||||
|
{"text": "i swear is releasing my neighbors inner crazy weve had cops called on our block like out of days this week im feeling inspired", "label": "1"}
|
||||||
|
{"text": "i hate feeling that a day got away from me and nothing not one thing productive got done", "label": "1"}
|
||||||
|
{"text": "i feel so dumb talking about this i feel like a whiny emo teenager who has so many problems and who is far too in love with her temporary boyfriend", "label": "0"}
|
||||||
|
{"text": "i mustered up energy to feel christmassy i remember feeling kind of pissed off at the bad timing of everything", "label": "3"}
|
||||||
|
{"text": "i was feeling apprehensive about my life as a student i felt like i couldnt succeed wouldnt succeed could never succeed", "label": "4"}
|
||||||
|
{"text": "i had grand plans of baking through my two days off but i mostly ended up just curled up on the couch pouting about not feeling well", "label": "1"}
|
||||||
|
{"text": "im not sure theyre right to feel triumphant but they certainly got a lot of comfort from the way the arguments went", "label": "1"}
|
||||||
|
{"text": "i feel we have a wonderful thing called a minute breathing space you can stop any time in the day even when you are driving along the motorway or in the middle of an important telephone call", "label": "1"}
|
||||||
|
{"text": "i could only see and feel the poison in my veins which deprived me of the strength and the ability to feel the joy i knew held me", "label": "0"}
|
||||||
|
{"text": "i can just remember that when im feeling ungrateful that would be great", "label": "0"}
|
||||||
|
{"text": "i love feeling productive and getting things cleaned out an sorted through", "label": "1"}
|
||||||
|
{"text": "i had climbed on a cherry tree alone and there was a thick caterpillar beside my fingers i feel disgusted by caterpillars and snakes i was terribly afraid of the caterpillar crawling on my fingers out of the fear i was almost unable to climb down", "label": "4"}
|
||||||
|
{"text": "i feel so neglectful of lj", "label": "0"}
|
||||||
|
{"text": "i feel resigned to what i have brought myself to and docile", "label": "0"}
|
||||||
|
{"text": "i cant get wrapped up in that kind of crap tv because my brain starts getting mushy and i feel feverishly hostile", "label": "3"}
|
||||||
|
{"text": "i find myself feeling irritable or depleted i run through a mental checklist have i worked out", "label": "3"}
|
||||||
|
{"text": "i feel like i ve lost some of my main roots i feel less secure emotionally financially and socially", "label": "0"}
|
||||||
|
{"text": "i could not help feeling thatrupert meant to be rude to my father though his words were quite polite", "label": "3"}
|
||||||
|
{"text": "i hold it for a day my arm will feel numb and paralysed", "label": "0"}
|
||||||
|
{"text": "i feel so shitty about wearing you out", "label": "0"}
|
||||||
|
{"text": "i am feeling rather delicate due to alot of white wine and a considerable amount of dancing one of my best friends ended up in a amp e due to a fractured wrist caused by excessive dancing", "label": "2"}
|
||||||
|
{"text": "i do however want you to know that if something someone is causing you to feel less then your splendid self step away from them", "label": "1"}
|
||||||
|
{"text": "i have to say it is making me feel very tender inside like a wound that has scabbed over on the surface but is still raw and unhealed underneath", "label": "2"}
|
||||||
|
{"text": "i feel sentimental i close my eyes and look up i feel powerful if i do that", "label": "0"}
|
||||||
|
{"text": "i feel as though my sub arguments are stronger and i support my claims better than i did in the beginning", "label": "1"}
|
||||||
|
{"text": "i quickly trotted off he added i feel embarrassed to ask hoping i would enter into some kind of conversation with him", "label": "0"}
|
||||||
|
{"text": "when an alcoholic stood dribbling over a food counter", "label": "3"}
|
||||||
|
{"text": "i feel like itd be strange at the least and possibly offensive to tell a gay friend id like to experiment or something like that", "label": "5"}
|
||||||
|
{"text": "i feel accepted for who i am", "label": "2"}
|
||||||
|
{"text": "i was feeling shaken walking along the streets and less able to concentrate on not having an accident while simultaneously worrying about having one due to not concentrating", "label": "4"}
|
||||||
|
{"text": "i fear that because i suffer from depression the people i care about feel inhibited when they are going through hard times", "label": "0"}
|
||||||
|
{"text": "i was feeling excited and motivated", "label": "1"}
|
||||||
|
{"text": "i feel many petty people have judged me simply because i may be one", "label": "3"}
|
||||||
|
{"text": "i have a feeling this will be a good soap for january", "label": "1"}
|
||||||
|
{"text": "i feel pretty confident giving endless opinons about", "label": "1"}
|
||||||
|
{"text": "i feel that way about popular culture", "label": "1"}
|
||||||
|
{"text": "i was okay but thats an awful feeling to be falling with no way to stop it maybe thats why to this day im so afraid of falling", "label": "4"}
|
||||||
|
{"text": "i think i confuse my feelings of longing with feeling good", "label": "2"}
|
||||||
|
{"text": "i feel very awkward", "label": "0"}
|
||||||
|
{"text": "i feel like i am part of a team now and far from the isolated feeling i have had for so many months now", "label": "0"}
|
||||||
|
{"text": "i can feel that the two girls are shocked with what i m saying", "label": "5"}
|
||||||
|
{"text": "im days post op and i am feeling fantastic", "label": "1"}
|
||||||
|
{"text": "i kind of feel more violent after having watched the non violence video", "label": "3"}
|
||||||
|
{"text": "i love my increased intense feeling of connection to the divine", "label": "1"}
|
||||||
|
{"text": "i do feel devastated", "label": "0"}
|
||||||
|
{"text": "i know both of them feel threatened by the job i do even after long years but i get really tired of the ganging up i get from them", "label": "4"}
|
||||||
|
{"text": "i feel very resolved yet somehow very depressed", "label": "1"}
|
||||||
|
{"text": "i feel so carefree nowwwwww", "label": "1"}
|
||||||
|
{"text": "i feel like as much as it was an unfortunate situation that i wasnt with my father i was in a great place", "label": "0"}
|
||||||
|
{"text": "i remember feeling more amused than sensing that i was in any real danger however i must have been experiencing a little bit of shock", "label": "1"}
|
||||||
|
{"text": "i love autumn and everything that comes with it although i feel i am getting excited for christmas way too early this year me and my friends including a href http andthenwear", "label": "1"}
|
||||||
|
{"text": "i sensed he had so much to offer but there were also many many times where his behaviour made me doubt myself did not make me feel special and at times frankly just rude and immature", "label": "1"}
|
||||||
|
{"text": "i haven t quite figured out and whenever i can t find the time or ability or money to take care of each side equally i end up feeling disappointed", "label": "0"}
|
||||||
|
{"text": "i was definitely feeling nostalgic and was a bit sad when one of my favorite exhibitions the hall of ocean life was closed", "label": "2"}
|
||||||
|
{"text": "ive been feeling the desire for a romantic interest even with my circumstances i feel as though im emotionally ready for a special someone in my life", "label": "2"}
|
||||||
|
{"text": "i feel not surprised by where i ended up i m happy with a lot of what i ve achieved the positions i ve put myself in", "label": "5"}
|
||||||
|
{"text": "i begin to have these doubts my stomach clenches my heart races and i feel fearful", "label": "4"}
|
||||||
|
{"text": "i feel even more determined to educate about self breast exams and to get your yearly check ups they can and will save your life", "label": "1"}
|
||||||
|
{"text": "i feel that he has lost the game", "label": "0"}
|
||||||
|
{"text": "i follow through with the feelings that have been repressed for years months or days", "label": "0"}
|
||||||
|
{"text": "i knew it would feel empty and there would be the potential to feel like i wasnt doing well as i wasnt passing folks", "label": "0"}
|
||||||
|
{"text": "im feeling a little discouraged as i realize its going to be impossible for me to meet my goal of miles this year", "label": "0"}
|
||||||
|
{"text": "i am feeling very eager for what my darling has in store for us", "label": "1"}
|
||||||
|
{"text": "i feel very contented and happy upon seeing him", "label": "1"}
|
||||||
|
{"text": "i feel the less successful pieces were my two front covers as the images i used here were taken from movie stills", "label": "1"}
|
||||||
|
{"text": "im most afraid of i already feel slightly out of place at cru because while most of them will say they are my friend very few of them bothered to reach out and ask how things were going in australia", "label": "3"}
|
||||||
|
{"text": "i feel less assured that my basic rights are being protected by our political system especially as a woman and every time im disappointed i feel more personal responsibility to produce change", "label": "1"}
|
||||||
|
{"text": "i feel in my bones like nobody cares if im here nobody cares if im gone here i am again saying im feeling so lonely people either say its ok to be alone or just go home it kills me and i dont know why it doesnt mean i dont try i try and try but people just treat me like im a ghost", "label": "0"}
|
||||||
|
{"text": "i have struggled to fit all the work in for this module and have felt frustrated at times feeling that my blogs were rushed and although i have read with great interested fellow students blogs i feel i havent interacted as much as i could have done this is a definite area for development", "label": "3"}
|
||||||
|
{"text": "i thought this was a good idea in that it gave you time to recover if you were feeling nervous or overwhelmed and also gave you the opportunity to make your escape if you felt so inclined", "label": "4"}
|
||||||
|
{"text": "i do feel blamed for everything i", "label": "0"}
|
||||||
|
{"text": "i feel idiotic and wierd in this class", "label": "0"}
|
||||||
|
{"text": "im not saying cut everyone out of your life but i feel its important to find comfort in solitude meditation or working on projects alone", "label": "1"}
|
||||||
|
{"text": "i do however feel a bit envious of people who have different perfumes for different seasons", "label": "3"}
|
||||||
|
{"text": "i was fascinated by the ebb and flow of the water and stood there feeling content watching the waves", "label": "1"}
|
||||||
|
{"text": "i would sometimes feel awkward talking to my brothers or mum if i dont see them for awhile", "label": "0"}
|
||||||
|
{"text": "i feel its a reminder that im taking care of something so precious and need to treat myself better", "label": "1"}
|
||||||
|
{"text": "i do know what it feels like when no one seems to be supporting your vision and just admiring it from the outside when you not only invest your time but your personal money that should be feeding your family and still not seeing anything", "label": "2"}
|
||||||
|
{"text": "i love the latter for their smooth feel and delicious flavours not to mention their awesome glossy appearance", "label": "1"}
|
||||||
|
{"text": "i feel sort of appreciative", "label": "1"}
|
||||||
|
{"text": "i said earlier he was feeling ignored ever since the baby came but is now getting back to normal as attention is given to him as well", "label": "0"}
|
||||||
|
{"text": "im feeling increasingly comfortable with the return of laddies marking skills", "label": "1"}
|
||||||
|
{"text": "i also feel proud of her", "label": "1"}
|
||||||
|
{"text": "i was coming out of a lengthy illness and i was feeling lousy groundless indecisive and without any direction", "label": "0"}
|
||||||
|
{"text": "i feel most apprehensive about each week probably because it is the one most likely to unavoidably show me my shortcomings as a runner", "label": "4"}
|
||||||
|
{"text": "i was sent home still feeling a bit shaky and dizzy", "label": "4"}
|
||||||
|
{"text": "im feeling generous with my words", "label": "1"}
|
||||||
|
{"text": "i had to choose the sleek and smoother feel of the sweet revenge made drawing and handling the blaster a bit nicer", "label": "2"}
|
||||||
|
{"text": "i started feeling a bit alarmed but i was not afraid for some reason", "label": "4"}
|
||||||
|
{"text": "i still feel that i expect pieces of the world from him but im afraid to come close and place those expectations upon him again in fear that hell disappoint me", "label": "4"}
|
||||||
|
{"text": "im feeling pretty hopeful about the future of the public service", "label": "1"}
|
||||||
|
{"text": "i feel very strongly passionate about when some jerk off decides to poke and make fun of us", "label": "1"}
|
||||||
|
{"text": "i feel angry because i have led myself to leading people to believe i couldnt do this", "label": "3"}
|
||||||
|
{"text": "im in a place right now where i feel safe and peaceful", "label": "1"}
|
||||||
|
{"text": "i longed for that feeling i once knew the feeling i treasured once and forgot because of pain", "label": "2"}
|
||||||
|
{"text": "when the paramilitary was sent to the unza and it started using tear gas and started intimidating the students without any provocation", "label": "3"}
|
||||||
|
{"text": "i thought i should be excited that im starting work but im feeling reluctant as ever", "label": "4"}
|
||||||
|
{"text": "i use it i envision how it would work if i had long thick lashes and i just have this strong feeling that it would provide me the perfect amount of lift definition and separation", "label": "1"}
|
||||||
|
{"text": "im going to say is that i know my activities are out of balance when i start feeling burdened by something that is supposed to be fun", "label": "0"}
|
||||||
|
{"text": "i found out that someone that i knew had someone else taking tests for her", "label": "3"}
|
||||||
|
{"text": "i feel like i should go for a run to expend all this idiotic energy but iv decided to do some homework now instead and store the energy for a social event im going to this evening", "label": "0"}
|
||||||
|
{"text": "i guess sometimes you arent aware of your true feelings until a playful kiss exposes them", "label": "1"}
|
||||||
|
{"text": "i feel like a rockette and i also feel like im glad its over", "label": "1"}
|
||||||
|
{"text": "i did get up to go and see the gp who told me i had probably been over confident that i should have rested for longer that this time i was to go to bed and not get up until hours after i feel better", "label": "1"}
|
||||||
|
{"text": "i told my boss at around weeks because i was feeling incredibly guilty", "label": "0"}
|
||||||
|
{"text": "i tell the people closest to me things that i am feeling and its as if they arent surprised because theyd known it all along", "label": "5"}
|
||||||
|
{"text": "i feel a remembrance of the strange by justin aryiku falls into the latter category", "label": "5"}
|
||||||
|
{"text": "i went to him personally and started talking about the way i feel and why i broke it off with him", "label": "0"}
|
||||||
|
{"text": "i feel tremendously lonely", "label": "0"}
|
||||||
|
{"text": "i feel that i don t have anything to contribute to the conversation about books and that my writing is boring shallow bunk", "label": "0"}
|
||||||
|
{"text": "i cannot speak for others but all i know is i feel i am the most successful prettiest version of myself when i walk out of my starbucks with my red cup holiday cup in hand", "label": "1"}
|
||||||
|
{"text": "i feel honoured to be friends with you", "label": "1"}
|
||||||
|
{"text": "i feel increasingly fond of coppers", "label": "2"}
|
||||||
|
{"text": "i know at least one other person besides myself was feeling nervous and anxious about getting started", "label": "4"}
|
||||||
|
{"text": "i kept having this strong feeling of moving into something i stayed and i was punished for not stepping out when i should", "label": "0"}
|
||||||
|
{"text": "i feel totally comfortable without being wealthy and like the feeling to work hardly and a long time for every single wish in my mind that i want to become true", "label": "1"}
|
||||||
|
{"text": "i wanna scream out my feelings that i keep until it bleeds the life is sometimes prejudiced it kills happiness thus it becomes even worst feeling like the life is now meaningless why should i be the victim", "label": "0"}
|
||||||
|
{"text": "i felt overly hopeful last week and now i feel like i am more resigned to waiting the next week or potentially longer", "label": "0"}
|
||||||
|
{"text": "i actually have been in china for some time and i feel that the people were quite friendly", "label": "1"}
|
||||||
|
{"text": "i have teamed it with a slouchy studded jacket that i picked up from warehouse in the sale and feel nicely smart", "label": "1"}
|
||||||
|
{"text": "i am not working i can cope with but days like today when i am i just feel awful", "label": "0"}
|
||||||
|
{"text": "i don t need to though i must admit i kept comparing myself to the skinny japanese girls i see everyday on the street and just writing that here makes me feel ludicrous", "label": "0"}
|
||||||
|
{"text": "i feel so often when i roll through my beloved new york that so little is done for so many if i start to write about race colour religion and sexual preference and gender identity my readers will say hey mia what s up are you confused", "label": "2"}
|
||||||
|
{"text": "i feel so humiliated at failing to achieve what i should have", "label": "0"}
|
||||||
|
{"text": "i really feel like this year will be a mellow one", "label": "1"}
|
||||||
|
{"text": "im feeling irritable and sick", "label": "3"}
|
||||||
|
{"text": "i feel some kind of sincere connection to everyone i talk to while im working", "label": "1"}
|
||||||
|
{"text": "i had hernia surgery on friday night and i still feel awful even though lots of people said i d be as good as new in a few days so now i feel shitty because i hurt and also shitty because i hurt", "label": "0"}
|
||||||
|
{"text": "i feel disturbed by the more and more unreasonable lie my life is taking towards", "label": "0"}
|
||||||
|
{"text": "i feel a strange sensation course through my limbs", "label": "5"}
|
||||||
|
{"text": "i have some great friends who help me deal with my issues because you cant always leave your baggage at the door see offspring feelings you guys know who you are and thanks again for being supportive", "label": "2"}
|
||||||
|
{"text": "im feeling a bit gloomy today because of the weather and because ive got no money to get on the tube to go anywhere pretty like columbia road", "label": "0"}
|
||||||
|
{"text": "ill be thirty next year and im feeling positive about my life and the choices im making and the things that im putting out there into the world", "label": "1"}
|
||||||
|
{"text": "i feel that i have lived long enough i am leaving you with your worries in this sweet cesspool", "label": "1"}
|
||||||
|
{"text": "i feel like a tortured artist when i talk to her", "label": "3"}
|
||||||
|
{"text": "i feel troubled lord and i honestly don t know why", "label": "0"}
|
||||||
|
{"text": "i feel glad to have had someone so fine burying their face in my crotch", "label": "1"}
|
||||||
|
{"text": "i feel grumpy i m going to dig out my xl mens pajama s grab a bar of chocolate put my favorite chick flick in the dvd player and treat myself not like a failure of some kind but like a person who is feeling grumpy who maybe just needs some time to herself", "label": "3"}
|
||||||
|
{"text": "i have lately been feeling very productive with my time at home and happy with my life in general and happy with my children and my husband", "label": "1"}
|
||||||
|
{"text": "i know my good friends are biking through tulip fields i feel a little regretful", "label": "0"}
|
||||||
|
{"text": "i do feel a bit guilty about the mean things ive said about jahmene as i heard his brother committed suicide so i think that abuse by their dad must have been pretty hardcore", "label": "0"}
|
||||||
|
{"text": "i really thought that after we had her i would stop feeling pained when i heard about other people getting pregnant", "label": "0"}
|
||||||
|
{"text": "i feel left alone", "label": "0"}
|
||||||
|
{"text": "i feel like im getting barely as much free time here as i do at oxford", "label": "1"}
|
||||||
|
{"text": "my sister once stole my mothers money and made her very angry after this my mother would beat her up for unreasonable reasons one day my sister lent her book to a friend without telling my mother about it when my mother learnt this she beat her up and even threatened her with a pair of scissors", "label": "3"}
|
||||||
|
{"text": "im lying in bed writing this feeling exceptionally smug about the fact ive got two more days off cos ive got lots of lovely plans", "label": "1"}
|
||||||
|
{"text": "i wish that my family and i didnt feel this need to keep her constantly entertained when shes around because shes always bored out of her mind irregardless of what we do with her and doesnt remotely appreciate our efforts to tolerate everything about her but whatever", "label": "1"}
|
||||||
|
{"text": "i realized what i am passionate about helping women feel accepted and appreciated", "label": "2"}
|
||||||
|
{"text": "i still didnt start feeling contractions but it was a tender mercy for me because she would have come on the st no matter what", "label": "2"}
|
||||||
|
{"text": "i feel defeated loss and confused", "label": "0"}
|
||||||
|
{"text": "i cant decide how i feel about some of the supporting roles particularly the girlfriend and alfred molina both quite funny but were they one dimensional caricatures or legitimate characters simply overshadowed by a fantastic lead", "label": "2"}
|
||||||
|
{"text": "i feel defeated like a lion s prey", "label": "0"}
|
||||||
|
{"text": "i feel like i missed out not being born into any particular religion", "label": "0"}
|
||||||
|
{"text": "i read in one horrific sitting made me feel ashamed of the world we live in", "label": "0"}
|
||||||
|
{"text": "i sat on a windy beach feeling thoroughly annoyed i vowed id be back and i would climb scafell", "label": "3"}
|
||||||
|
{"text": "i am feeling anxious that im not out watching this important game that im avoiding a bar because of an asshole who broke my heart and that im missing out meeting cute boys", "label": "4"}
|
||||||
|
{"text": "i feel it is equally important that you know i do have a passionate side that gets lit up every now and then and you are bound to see it", "label": "1"}
|
||||||
|
{"text": "i am sorry to hear that the assessment procedure conducted by atoshealthcare left you feeling humiliated and poorly represented", "label": "0"}
|
||||||
|
{"text": "i feel vulnerable and alone", "label": "4"}
|
||||||
|
{"text": "im feeling less generous i call her psychotic", "label": "2"}
|
||||||
|
{"text": "i go while feeling foolish so many times", "label": "0"}
|
||||||
|
{"text": "i hate or love or feel complacent about what i am working on", "label": "1"}
|
||||||
|
{"text": "i spent so much of this year waiting for these summer moments and it feels like i ve resigned summer to a certain extent just waiting to get on with life and start a new chapter in st paul", "label": "0"}
|
||||||
|
{"text": "i also like to listen to jazz whilst painting it makes me feel more artistic and ambitious actually look to the rainbow", "label": "1"}
|
||||||
|
{"text": "ive been feeling so bothered lately", "label": "3"}
|
||||||
|
{"text": "i feel it in every cell of my being god really really loves him intensely and is being faithful in fulfilling all his promises to him to us as he is also doing for you and yours", "label": "2"}
|
||||||
|
{"text": "i feel angry or resentful all i need do is remind myself that each day sober has been made possible by a fellowship which supports me all the way", "label": "3"}
|
||||||
|
{"text": "i vividly remember feeling so offended that she would even dream such a thing could be a choice", "label": "3"}
|
||||||
|
{"text": "i dont forget it i embrace it i dont feel pity i feel proud", "label": "1"}
|
||||||
|
{"text": "i feel so horny in these thigh high nylons", "label": "2"}
|
||||||
|
{"text": "i am feeling terrified anxious excited and apprehensive among a million other things", "label": "4"}
|
||||||
|
{"text": "i feel melancholy about the past as my parents have passed and i never really told them how thankful i am", "label": "0"}
|
||||||
|
{"text": "i feel slightly dazed and tired and angry but that is a normal emotion and mood for me to experience from day to day or week to week", "label": "5"}
|
||||||
|
{"text": "i feel that im fine without him", "label": "1"}
|
||||||
|
{"text": "i will not say much because chanel always speaks for its self and i feel that chanel makes sure they have something for every age group", "label": "1"}
|
||||||
|
{"text": "i will not feel so alone anymore", "label": "0"}
|
||||||
|
{"text": "i am afraid that once again i will feel hopeless and lose all of the peace that i gained after my last episode", "label": "0"}
|
||||||
|
{"text": "i added muas primer to mine and it makes my skin feel lovely", "label": "2"}
|
||||||
|
{"text": "i said though i am feeling gloomy", "label": "0"}
|
||||||
|
{"text": "i feel like ive become to complacent with the old and im ready to make some changes for the year", "label": "1"}
|
||||||
|
{"text": "i feel so thankful i have been able to figure out ways to get around or deal with most of these minor side effects and that i have not dealt with anything too serious", "label": "1"}
|
||||||
|
{"text": "i fought back the blush on his cheeks one hand resting over his heart feeling the frantic beating almost positive kai could hear it", "label": "4"}
|
||||||
|
{"text": "i feel stressed always", "label": "0"}
|
||||||
|
{"text": "i liked the feeling of being scared and jumping in my seat grabbing the arm of my preferably male companion", "label": "4"}
|
||||||
|
{"text": "i can totally sympathize with everyone here who doesn t speak native english as i feel like a brain damaged five year old whenever i try to speak japanese for any length of time", "label": "0"}
|
||||||
|
{"text": "i could feel the delicate pressure of her fingers searching to feel my arm beneath the course fabric", "label": "2"}
|
||||||
|
{"text": "im not feeling violent im feeling creative with weapons", "label": "3"}
|
||||||
|
{"text": "im just gonna end here cause i feel stupid lying on my bed typing non stop for the past mins", "label": "0"}
|
||||||
|
{"text": "i was feeling a bit annoyed but it didnt really affect me very much", "label": "3"}
|
||||||
|
{"text": "i feel uncomfortable with the fact i am so powerless at the moment", "label": "4"}
|
||||||
|
{"text": "i ask that before you dump millions of dollars into your party which you have rightfully earned perhaps consider that as the leader of the free world you should be feeling the crunch as well", "label": "1"}
|
||||||
|
{"text": "i feel fine which is good enough on a sunday evening", "label": "1"}
|
||||||
|
{"text": "i possibly understand what she was feeling i ignored her words ignored my feelings of uneasiness", "label": "0"}
|
||||||
|
{"text": "i feel permanently unimportant and i feel stupid", "label": "0"}
|
||||||
|
{"text": "im coming to have a full ransom as good as im feeling graceful good as it stands", "label": "1"}
|
||||||
|
{"text": "i feel like a savage when i eat meat but i wouldve eaten my own hand if i couldnt have some of that turkey", "label": "3"}
|
||||||
|
{"text": "im feeling awfully spiteful right now", "label": "3"}
|
||||||
|
{"text": "i am feeling very unsure of my future", "label": "4"}
|
||||||
|
{"text": "im not sure why today i feel so horrible", "label": "0"}
|
||||||
|
{"text": "i feel like this service is at its core relatively useless", "label": "0"}
|
||||||
|
{"text": "i sometimes feel hated but i am not it is all in my head", "label": "3"}
|
||||||
|
{"text": "i don t think i could feel more idiotic if i tried", "label": "0"}
|
||||||
|
{"text": "i can tell you that i feel oddly vulnerable and disjointed and like i just dont want to come out and play a lot of the time", "label": "4"}
|
||||||
|
{"text": "i start feeling overwhelmed and i just want to run away and hide in the back of my closet", "label": "4"}
|
||||||
|
{"text": "i feel like i have to pee already just thinking about this thing poking at my g spot but i m determined to find a stimulation method i enjoy", "label": "1"}
|
||||||
|
{"text": "i cant help but feel somehow he was punished in heather mills divorce settlement he is he does have a good sense of hum", "label": "0"}
|
||||||
|
{"text": "i have to be honest with a grandmother that passed away at i dread the idea that if i die young i wont get to do all of these things i really feel passionate about", "label": "2"}
|
||||||
|
{"text": "i feel peaceful secure and independent", "label": "1"}
|
||||||
|
{"text": "i hate feeling this loyal to this damned company", "label": "2"}
|
||||||
|
{"text": "im feeling quite adventurous and tried out those drinks that i just normally read through the pages of pocketbooks", "label": "1"}
|
||||||
|
{"text": "im super pumped to have crossed the nano finish line my novel is far from finished but im feeling optimistic", "label": "1"}
|
||||||
|
{"text": "i feel really comfortable in them", "label": "1"}
|
||||||
|
{"text": "i only will uploading photos which i feel so sweet to share with all of you lovers", "label": "2"}
|
||||||
|
{"text": "i really lose a lot of my nesting homemaking instinct and desire when i am pregnant and the longer im pregnant the worse it gets though i do get about a month reprieve where i feel creative again around the six month mark and youll notice that is when i did a post for halloween", "label": "1"}
|
||||||
|
{"text": "i was just wondering if that is common and why some girls feel the need to seem less intelligent than they really are", "label": "1"}
|
||||||
|
{"text": "i feel all hot and bothered and most of all i worry and worry some more and boy do i worry", "label": "2"}
|
||||||
|
{"text": "i feel less bothered of things happening around me", "label": "3"}
|
||||||
|
{"text": "i feel as rich as solomon", "label": "1"}
|
||||||
|
{"text": "i feel so deeply honoured to be able to offer these activations and i have made extra times available for sessions after the full moon next week as we move into the dark moon and then build up to the eclipse a natural time of bringing what needs to be examined to the surface of our lives", "label": "1"}
|
||||||
|
{"text": "i feel slightly emotional watching it", "label": "0"}
|
||||||
|
{"text": "i have a feeling that the smell is not going to be pleasant", "label": "1"}
|
||||||
|
{"text": "i feel but is ultimately just ok", "label": "1"}
|
||||||
|
{"text": "i said i feel incredibly thankful on the whole", "label": "1"}
|
||||||
|
{"text": "i finally realise the feeling of being hated and its after effects are so big", "label": "0"}
|
||||||
|
{"text": "ive noticed this week that im not the only one who struggles with feeling a little depressed after mothers day", "label": "0"}
|
||||||
|
{"text": "i have an ironic feel i dont feel anything special but i still smile broadly whenever he tells me something", "label": "1"}
|
||||||
|
{"text": "i thought i was ready for commitment for a relationship with someone but when it happens i just feel numb", "label": "0"}
|
||||||
|
{"text": "i have been a procrastinator i have endless potential and passion inside yet im stuck in the cage of my own soul the unresolved feelings hurt resentment that i hold inside has built up even do i try to build myself back up again", "label": "0"}
|
||||||
|
{"text": "i feel alan clay who is rather pathetic has a huge mass on the back of his neck that he is convinced is cancer", "label": "0"}
|
||||||
|
{"text": "i wake up feeling triumphant", "label": "1"}
|
||||||
|
{"text": "i feel someone has been wronged when i feel i have been wronged or when i get riled up against an action i find offensive i unsheathe my sword and good lord you better look out", "label": "3"}
|
||||||
|
{"text": "i can feel him kick and move and know that it will be ok", "label": "1"}
|
||||||
|
{"text": "i feel without being disturbed by it", "label": "0"}
|
||||||
|
{"text": "i feel even more alone although i have him", "label": "0"}
|
||||||
|
{"text": "im the solo follower at the moment but i have a feeling theres going to be some terrific stuff on there in no time", "label": "1"}
|
||||||
|
{"text": "i woke up on the sofa feeling extremely agitated around pm", "label": "4"}
|
||||||
|
{"text": "i just need to find ways to feel pretty", "label": "1"}
|
||||||
|
{"text": "i feel like ive hated on this series a lot since ive started blogging so a little honesty is in order", "label": "0"}
|
||||||
|
{"text": "i feel like hiding to prevent others from exposure to my decidedly unpleasant expression of anti christmas cheer or the bah humbugs as i like to call it", "label": "0"}
|
||||||
|
{"text": "i dunno how else to describe how great i feel i swear ive been giggly all day", "label": "1"}
|
||||||
|
{"text": "i have had a few days off work and i am feeling very relaxed and lucky to share and enjoy them with my hubby", "label": "1"}
|
||||||
|
{"text": "i was feeling very festive i decided to paint my nails for the holiday events", "label": "1"}
|
||||||
|
{"text": "i write on this space i feel quite nostalgic and my mind races back to the good old days when i used this as a daily haven to park my learnings and memories", "label": "2"}
|
||||||
|
{"text": "i go to pt i feel like a defective bum", "label": "0"}
|
||||||
|
{"text": "i feel useful giving in what i do", "label": "1"}
|
||||||
|
{"text": "i feel pleasantly mellow regardless", "label": "1"}
|
||||||
|
{"text": "i sat there in our living room feeling the sun come through the window cuddling my gorgeous puppy and cried", "label": "1"}
|
||||||
|
{"text": "i feel like i was aching for the summer to come and now it is slipping away so fast but doesnt it always", "label": "0"}
|
||||||
|
{"text": "i want to feel pain in my chest when something terrible happens and i want to cry happy tears when something good happens", "label": "0"}
|
||||||
|
{"text": "i was able to identify the speed in which f could get work done without feeling burdened by the work load", "label": "0"}
|
||||||
|
{"text": "i feel nervous but hes in control pretty soon", "label": "4"}
|
||||||
|
{"text": "i realized that i m feeling artistic in the extreme because the justice center has not been very kind to me lately", "label": "1"}
|
||||||
|
{"text": "i feel like how i m pissed that i have to spend an entire extra year in school because of stupid biochem", "label": "3"}
|
||||||
|
{"text": "i want to tell you what im feeling but i dont know where to start i want to tell you everything but im afraid youll break my heart why would something easy be so hard to do", "label": "4"}
|
||||||
|
{"text": "i feel discouraged that im never going to get on a good schedule because another big life change is going to happen again", "label": "0"}
|
||||||
|
{"text": "i feel stupid or overly awkward or less than them", "label": "0"}
|
||||||
|
{"text": "im feeling defeated or doubtful", "label": "0"}
|
||||||
|
{"text": "im feeling virtuous ill make do with a rich tea or hobnob but if money and calories are no object it has to be a k", "label": "1"}
|
||||||
|
{"text": "i woke up feeling positive i was totally in the mood for doing this and this evening i feel the same i had a banana shake for breakfast a chocolate shake for dinner and a sunday roast for tea", "label": "1"}
|
||||||
|
{"text": "i am feeling a little stressed but seriously i have no one or nothing to blame but myself", "label": "3"}
|
||||||
|
{"text": "i had a real life pet hamster when i was little so i really like this little family sylvanian families are great for role play learning about animals creating your own stories and their flocked fur makes them feel very special", "label": "1"}
|
||||||
|
{"text": "i went i was amazed at what i have and i began to feel when the woman canal spoke about the divine hierarchies and they wanted us to do for a new era of spiritual evolution", "label": "1"}
|
||||||
|
{"text": "i think we all feel very passionate about our favorite workout gear and i love seeing what other people love need have to have can t live without so i am hoping you will share your favorites in the comments", "label": "2"}
|
||||||
|
{"text": "i feel really strange without my bangs and sometimes i want just to cut my hair", "label": "4"}
|
||||||
|
{"text": "i feel completely blessed to have such wonderful family and friends", "label": "1"}
|
||||||
|
{"text": "im feeling a little groggy with a mild headache after a non wild and crazy evening", "label": "0"}
|
||||||
|
{"text": "i had just begun to feel like teaching was my metier but am now resigned to the fact that i likely wont teach at university ever again", "label": "0"}
|
||||||
|
{"text": "im feeling like a shitty person right now because i just did or worse", "label": "0"}
|
||||||
|
{"text": "i feel i was wronged", "label": "3"}
|
||||||
|
{"text": "i feel so horny just thinking about this", "label": "2"}
|
||||||
|
{"text": "i start to feel really awkward about the tubelight reflecting on the glossy paper with a picture of a red laced bra", "label": "0"}
|
||||||
|
{"text": "i will definitely be passing on my thanks to these wonderfully gifted people but words alone are difficult to express their awesomness and the feeling of safety when they are caring for us", "label": "2"}
|
||||||
|
{"text": "id actually been feeling less hostile towards ms than a lot of my linux using brethren lately", "label": "3"}
|
||||||
|
{"text": "i agree it looks gorgeous and feels amazing but i have only worn it out on the town one time on new years eve", "label": "1"}
|
||||||
|
{"text": "i mean that it feels to me that she feels that everyfuckingthing is my fault which fucking makes me irritated because im neither passive enough to tolerate it nor is it my fault", "label": "3"}
|
||||||
|
{"text": "i didn t allow myself to feel the emotional depths of my sorrow", "label": "0"}
|
||||||
|
{"text": "i feel like i ve been distracted all day or i ve been dealing more with fiddly necessities than actual creative work then i ll feel like the day s been wasted", "label": "3"}
|
||||||
|
{"text": "ive been feeling a little bit anxious of late as far as my relations or lack thereof with some of the ward and some of the investigators go so im excited to be able to ponder that in the temple and see if i can come up with a plan with the lords help", "label": "4"}
|
||||||
|
{"text": "i will give proper praise to the amish for being punctual but feel that i should point out that they have never had to finish a game or tv show before they rushed out the door", "label": "3"}
|
||||||
|
{"text": "i feel like a letdown and i feel like i allow myself to be hurt", "label": "0"}
|
||||||
|
{"text": "i have been on a roller coaster of emotions over these supposed feelings that something unpleasant was coming", "label": "0"}
|
||||||
|
{"text": "i was sitting in class on tuesday afternoon and all of a sudden that same feeling came over me a delicious feeling of being slightly out of control and out of my depth a thrill of adrenaline that left me weak and drained yet excited and inquisitive all at once", "label": "1"}
|
||||||
|
{"text": "i didnt feel i had put in half the effort or time and well quite frankly didnt feel like the pressure of it all", "label": "1"}
|
||||||
|
{"text": "im feeling generous im going to share them on my blog too", "label": "1"}
|
||||||
|
{"text": "i feel sure the majority would go for ios on a galaxy sii or a lumia", "label": "1"}
|
||||||
|
{"text": "i am feeling much more like myself but experiencing strange head and neck twinges", "label": "4"}
|
||||||
|
{"text": "i am your friend then why do i sometime feel so insulted around you", "label": "3"}
|
||||||
|
{"text": "i wanna talk tell you about sycf it stands for singapore youth chinese forum btw and although theres a singapore word inside i feel like the minority there p ok but thats beside the point", "label": "1"}
|
||||||
|
{"text": "i am feeling fine apart from being a little tired from being rudley woken up by some noisy drivers", "label": "1"}
|
||||||
|
{"text": "i do now as compared with years ago is that i no longer feel i have to be accepted by others only those who matter to me", "label": "2"}
|
||||||
|
{"text": "i feel so blessed just to be her mom", "label": "1"}
|
||||||
|
{"text": "i was sitting right next to him and i had a strong feeling that i liked him", "label": "2"}
|
||||||
|
{"text": "i feel so bitchy talking about myself this way ahaha i sound less retarded telling this story in person i swear and said if i were a boy i would fall in love with you", "label": "3"}
|
||||||
|
{"text": "i ignore her once shell keep trying and trying and trying till i break down and feel horrible about myself", "label": "0"}
|
||||||
|
{"text": "i feel humiliated when mistress watches me mince into bed wearing my frilly pink bloomers and pink babydoll", "label": "0"}
|
||||||
|
{"text": "im also feeling pretty paranoid a lot and no i dont take drugs", "label": "4"}
|
||||||
|
{"text": "i feel like i can and have accepted that but will others", "label": "2"}
|
||||||
|
{"text": "im told by horsey people that they are a rare find so i feel quite lucky", "label": "1"}
|
||||||
|
{"text": "i feel a little isolated being in my house all the time", "label": "0"}
|
||||||
|
{"text": "i don t want to go all very special episode of blossom on you but i am feeling a little melancholy about the final episode of rock", "label": "0"}
|
||||||
|
{"text": "i will be able to lay on my bed in the dark and not feel terrified at least for a while", "label": "4"}
|
||||||
|
{"text": "i get to feel all virtuous when i do something like whip out my cloth napkin or reusable shopping bag", "label": "1"}
|
||||||
|
{"text": "i want to feel like i m important", "label": "1"}
|
||||||
|
{"text": "i feel so ungrateful for the things he does regularly for me for i sin daily in everyday living", "label": "0"}
|
||||||
|
{"text": "i always feel a bit personally assaulted", "label": "0"}
|
||||||
|
{"text": "i just do it to keep up with ian but really i feel shitty about it and wish i could just date ian", "label": "0"}
|
||||||
|
{"text": "i not feel the tension that permeates the air in the calm before the storm", "label": "1"}
|
||||||
|
{"text": "i am feeling somewhat satisfied with myself for finally finishing an apron that i started making for my sisters birthday months ago", "label": "1"}
|
||||||
|
{"text": "i think of how much time we spent just doing fun childhood stuff together as a family i feel amazed", "label": "5"}
|
||||||
|
{"text": "i understand because of what but even towards the end when she starts going outside again i feel like she ll never be truly happy again", "label": "1"}
|
||||||
|
{"text": "i know the feeling will fade away in a day or two or even in a few hours when the cute hairstyle starts to droop and frizz", "label": "1"}
|
||||||
|
{"text": "i know suicide is selfish but right now i feel like i am worthless and that in the long run it would be better for everybody else", "label": "0"}
|
||||||
|
{"text": "i feel delighted be rice er si the young lady understand me", "label": "1"}
|
||||||
|
{"text": "i can feel his impatient and i can t stop my body from giving him positive response", "label": "3"}
|
||||||
|
{"text": "i feel that i was a girl that always being foolish and annoyed by boys", "label": "0"}
|
||||||
|
{"text": "i slowly realised that the intruder was actually dad and griff began to retreat a safe distance in case there were any repercussions after pulling dad through the roof but dad was feeling very groggy and disorientated", "label": "0"}
|
||||||
|
{"text": "i feel so uncertain all i did was crying over the phone saying i cant finish the reading", "label": "4"}
|
||||||
|
{"text": "i don t doubt that i m right in this case because i feel that you are a faithful gamer", "label": "2"}
|
||||||
|
{"text": "i feel innocent and free again", "label": "1"}
|
||||||
|
{"text": "i mean i could literally feel him feeling content", "label": "1"}
|
||||||
|
{"text": "i miller production dialog new media feeling generous", "label": "2"}
|
||||||
|
{"text": "i thought made the room feel playful and kid friendly", "label": "1"}
|
||||||
|
{"text": "i dont want her to beg at my feet but a how are you courtney or a hows your new project coming courtney would give me some affirmation that i dont feel like a submissive slug", "label": "0"}
|
||||||
|
{"text": "i feel like my brain is going to expload and its going to be messy and painful", "label": "0"}
|
||||||
|
{"text": "i feel empty and dim if i miss that", "label": "0"}
|
||||||
|
{"text": "i feel i am pretty smart raising three boys on my on and they are turning out to be great but my question myself and anyone who reads my blog whats wrong with be wiser", "label": "1"}
|
||||||
|
{"text": "i i have all the predictable feelings loki is that guy i know from many many other fandoms im not impressed with me for my loki feelings", "label": "5"}
|
||||||
|
{"text": "im feeling like life is fairly sweet", "label": "2"}
|
||||||
|
{"text": "i feel like i should be thrilled and i am but at the same time i feel like crap", "label": "1"}
|
||||||
|
{"text": "i also hope you understand why i feel so angry with you when you dont support the hat rule or when you turn up at a school event sans hat yourself", "label": "3"}
|
||||||
|
{"text": "i get the nasty feeling that my posts are boring the pants off everyone", "label": "0"}
|
||||||
|
{"text": "i used to feel rejected and like it was my fault as i am overweight", "label": "0"}
|
||||||
|
{"text": "i hate to feel threatened totally", "label": "4"}
|
||||||
|
{"text": "i want to have a job where i am permanent and where i feel like i am valued", "label": "1"}
|
||||||
|
{"text": "i know karen wouldnt see it that way if i addressed these things with her it would open a whole miserable can of worms she wouldnt see that shes doing anything wrong and wouldnt be open to hearing how i feel it would turn into an ugly confrontation and i hate confrontation", "label": "0"}
|
||||||
|
{"text": "i had to choose the sleek and smoother feel of the sweet revenge made drawing and handling the blaster a bit nicer", "label": "1"}
|
||||||
|
{"text": "i am feeling positive about it", "label": "1"}
|
||||||
|
{"text": "ive been at the lowest ive ever been feeling really shitty about myself", "label": "0"}
|
||||||
|
{"text": "i only share what i feel is valuable information", "label": "1"}
|
||||||
|
{"text": "i finally found this afternoon and i wear it feeling like a vicious lurker", "label": "3"}
|
||||||
|
{"text": "i just didnt feel they got me which meant i was reluctant to open up and really share what was going on", "label": "4"}
|
||||||
|
{"text": "i know shes right because i feel more energetic awake patient and happy when im running daily but i still feel a little bad too because i believe breast milk is so much better for babies than formula", "label": "1"}
|
||||||
|
{"text": "i care about but i feel unimportant to because they have their shit together enough so that they dont need me anymore", "label": "0"}
|
||||||
|
{"text": "i found myself feeling lousy which is pretty unusual for me", "label": "0"}
|
||||||
|
{"text": "i feel more confident already a href http johnnykaje", "label": "1"}
|
||||||
|
{"text": "im feeling a little more convinced", "label": "1"}
|
||||||
|
{"text": "i woke up yesterday morning wondering if i had hurt my mommys feelings and just had this horrible feeling in my stomach and horrible chest pains", "label": "0"}
|
||||||
|
{"text": "i have been feeling for quite a while that i am just not satisfied with my stash when it comes to blushes", "label": "1"}
|
||||||
|
{"text": "i seriously have no feeling when i got rejected in a sense i am neither happy sad or average", "label": "0"}
|
||||||
|
{"text": "i feel valued by just contributing what i know of and share what id discovered with others", "label": "1"}
|
||||||
|
{"text": "i feel heartbroken for the people of north carolina", "label": "0"}
|
||||||
|
{"text": "i have switched songs as that one was beginning to make me feel a little melancholy and who the fuck needs that", "label": "0"}
|
||||||
|
{"text": "i feel very unfortunate to have only in the last couple days have even discovered that seventy times seven even existed and hearing the twosongs together brought somewhat of a closure to a certain part of my musical life", "label": "0"}
|
||||||
|
{"text": "i feel a cold coming on or drink a little extra xango juice when i am stiff and sore", "label": "3"}
|
||||||
|
{"text": "i seriously feel talented now", "label": "1"}
|
||||||
|
{"text": "i feel thrilled i feel blessed i feel honored light who s boss", "label": "1"}
|
||||||
|
{"text": "i feel like i deserve to be punished in some way amp search out ways to do that self harm non lethal overdose etc", "label": "0"}
|
||||||
|
{"text": "i got to know more about the three movies i feel sincere respect to the director richard linklater and the whole team of crew of creating this love story", "label": "1"}
|
||||||
|
{"text": "i feel blessed to be able to see that we didn t do anything", "label": "1"}
|
||||||
|
{"text": "i feel like my fear of end times is gone and i am honestly longing for home more than i ever have in my life", "label": "2"}
|
||||||
|
{"text": "ive feeling a bit morose as of late", "label": "0"}
|
||||||
|
{"text": "i feel like i m a very very dangerous human being right now", "label": "3"}
|
||||||
|
{"text": "i am here to update my blog just found out that my blog looks feels dull when there are no updates", "label": "0"}
|
||||||
|
{"text": "i feel like there is a fragment sweet scent hang on my tongue it instantly disappear as if saying i was paranoid", "label": "2"}
|
||||||
|
{"text": "i believe the most readers feel impressed by the individual journey", "label": "5"}
|
||||||
|
{"text": "i feel very clearly now and am reassured that in leaving we did the thing that we needed to do the thing that god was leading us to do", "label": "1"}
|
||||||
|
{"text": "im feeling gloomy as i have completed nothing though im supposed to complete many things", "label": "0"}
|
||||||
|
{"text": "i dunno how it feels to be completely happy the real world has taught me about struggle but what i m going thru is nothing close to struggle", "label": "1"}
|
||||||
|
{"text": "id like to write something interesting right now but unfortunately i feel deprived of inspiration", "label": "0"}
|
||||||
|
{"text": "i think since im compelled to act all meek and asian in front of my own kind i feel a tad inhibited to the extent that i cant even be myself", "label": "4"}
|
||||||
|
{"text": "i sometimes feel quite isolated as we live in a regional area so i often think", "label": "0"}
|
||||||
|
{"text": "i think about talking to a lawyer and finishing this i feel anxious", "label": "4"}
|
||||||
|
{"text": "i was left feeling bothered by it for a long time afterwards", "label": "3"}
|
||||||
|
{"text": "i feel very much the tragic side of life but my endings are always happy somehow", "label": "0"}
|
||||||
|
{"text": "i listen to people explain their frustrations with dating or how they re feeling rejected after a possible date didn t materialise or not getting pas", "label": "0"}
|
||||||
|
{"text": "i alive i feel so defeated with this issue", "label": "0"}
|
||||||
|
{"text": "i took part in a football match the referee was extremely partial to the opposite team this stirred up my discontent and anger", "label": "3"}
|
||||||
|
{"text": "i keep forgetting but shouldnt is no matter what happens i should not hesitate or feel too ashamed to come back to allah and get back on my feet", "label": "0"}
|
||||||
|
{"text": "i am plagued by awkward feelings the charming tale of a not so charming gal named me", "label": "1"}
|
||||||
|
{"text": "i try to only buy fabrics that i would use in a project or that i feel are really fab", "label": "1"}
|
||||||
|
{"text": "i remember just knowing you were crazy in love with me without a shadow of a doubt and you made me feel gorgeous always", "label": "1"}
|
||||||
|
{"text": "i feel pretty in transition", "label": "1"}
|
||||||
|
{"text": "i feel like i ought to be working on casual activism but that construes something that is potentially stressful so there wont be any update tomorrow", "label": "1"}
|
||||||
|
{"text": "i am this thing i have these feelings and i m not afraid to express them and to stand up for what i believe in", "label": "4"}
|
||||||
|
{"text": "i feel so rotten for them but there is nothing i can do to change that", "label": "0"}
|
||||||
|
{"text": "i want to say that i feel vulnerable writing and sharing this info", "label": "4"}
|
||||||
|
{"text": "i die wont some man make me feel that lifes worthwhile", "label": "1"}
|
||||||
|
{"text": "i feel like this vile thing brooding gnawing deeper in spirit", "label": "3"}
|
||||||
|
{"text": "i appreciate when i open up to the universe and i feel and receive gentle nudges both through small happenstances and clues that present themselves and also through dreams", "label": "2"}
|
||||||
|
{"text": "i often feel like im drowning as i try to come up with valuable content and write engaging posts", "label": "1"}
|
||||||
|
{"text": "i always flashback to her talking about feeling burdened appearing on a radio show alone on lee jaeryong jungeuns good morning", "label": "0"}
|
||||||
|
{"text": "i feel useful again and serves as a reminder that ive come a long way since the first days of vertigo", "label": "1"}
|
||||||
|
{"text": "i feel so relaxed amp light since i emptied myself of this burden that had controlled me for so long", "label": "1"}
|
||||||
|
{"text": "i feel guilty for not having made any blog entries for months", "label": "0"}
|
||||||
|
{"text": "i still feel sleep deprived she is almost sleeping through the night giving us", "label": "0"}
|
||||||
|
{"text": "i am feeling shamed like i should not be enjoying this and i certainly should not have sex kissing is so far enough", "label": "0"}
|
||||||
|
{"text": "i feel the matter has been resolved", "label": "1"}
|
||||||
|
{"text": "i once read that when we feel nostalgia we are actually longing for heaven", "label": "2"}
|
||||||
|
{"text": "i feel so shaken and guilty for not being a better mother and shielding my offspring from this health problem", "label": "4"}
|
||||||
|
{"text": "i still feel shaky is because in the worst hit areas the damage and destruction is so complete", "label": "4"}
|
||||||
|
{"text": "im feeling a bit melancholy for some reason so im not going to post further for now but hopefully this re discovery of my old thoughts and goals will help me to re align my focus a bit", "label": "0"}
|
||||||
|
{"text": "i just feel so disgusted with myself", "label": "3"}
|
||||||
|
{"text": "i guess ive heard enough over the two months because each time i hear such comments i honestly feel offended", "label": "3"}
|
||||||
|
{"text": "i was feeling rebellious because of what was happening to us as a family", "label": "3"}
|
||||||
|
{"text": "i feel a bit strange saying it", "label": "5"}
|
||||||
|
{"text": "im happy to report that i didnt feel that angered urge to smack olivia today the way ive felt it before", "label": "3"}
|
||||||
|
{"text": "i could put a full thought together and didnt feel so lethargic", "label": "0"}
|
||||||
|
{"text": "i feel like such a vital part of the branch as a missionary and its a lot different in a big ward", "label": "1"}
|
||||||
|
{"text": "ive been feeling jealous lately of bloggers going off to author readings and book si", "label": "3"}
|
||||||
|
{"text": "i just feel more enraged and that my life has been taken advantage of yet again", "label": "3"}
|
||||||
|
{"text": "i feel disgusted to even be associated with this woman by my race and nationality", "label": "3"}
|
||||||
|
{"text": "i spontaneously come up with a new tune or when i am taking a solo and feel myself in that creative flow just going for it not knowing what i am going to play next and surprising myself he answers indisputably", "label": "1"}
|
||||||
|
{"text": "i feel a bit strange publishing these beautiful photos", "label": "4"}
|
||||||
|
{"text": "i feel like im tortured like years ago", "label": "4"}
|
||||||
|
{"text": "i sound feeling ballroom cd rel nofollow target blank va prandi sound feeling ballroom cd", "label": "0"}
|
||||||
|
{"text": "i feel that i have to justify this behavior to you my faithful blog reader", "label": "1"}
|
||||||
|
{"text": "i hope you can feel glad that she gave you so many things including memories that you can cherish", "label": "1"}
|
||||||
|
{"text": "ive been studying really hard for it and discovering pretty words that never crossed my mind and how they portray the exact meaning and i feel like ive missed out a lot", "label": "0"}
|
||||||
|
{"text": "i feel me better cuz i listen to this song img src http ifyouwanttoknow", "label": "1"}
|
||||||
|
{"text": "i feel this way about all relationships romantic platonic and friend zoned friends that dissolve", "label": "2"}
|
||||||
|
{"text": "i feel petty moaning about it but its annoying me so from now on im keeping my stuff in a bag in my room if they ask i can always say im keeping it there to stop the bathroom getting cluttered", "label": "3"}
|
||||||
|
{"text": "im feeling terrible i couldnt feel worse", "label": "0"}
|
||||||
|
{"text": "i feel pretty lame typing that but my upper body is so weak", "label": "0"}
|
||||||
|
{"text": "ive left my job i feel a lot less stressed in general and i had a really good time just observing how much the kids enjoy the process of creating something new", "label": "0"}
|
||||||
|
{"text": "i am slowly paying off my debts and i feel generally happy about where i am and what im doing", "label": "1"}
|
||||||
|
{"text": "i feel completely numb emotionless lost", "label": "0"}
|
||||||
|
{"text": "i buy books about people i feel are equally fucked up as i am or books about zen approaches to shitty situations", "label": "3"}
|
||||||
|
{"text": "i was feeling particularly glamorous in my charlies angel on the weekend travel outfit and comfortably passed three hours in the zoo that is gates by reading fashion mags", "label": "1"}
|
||||||
|
{"text": "i could feel myself moving slower and being generally more lethargic than our last ride on the same trail", "label": "0"}
|
||||||
|
{"text": "i hate getting behind because then i feel pressured to get it all back up to date so i can move on to other projects", "label": "4"}
|
||||||
|
{"text": "i feel like a haiku is a pleasant note to end on", "label": "1"}
|
||||||
|
{"text": "i know is that it s better for me as a teacher i feel the lesson is more pleasant that the language work is less artificial and it feels good that what i teach is closer to what they need instead of what someone else who is not even there thinks they need", "label": "1"}
|
||||||
|
{"text": "i was on to stop labor made me feel terrible", "label": "0"}
|
||||||
|
{"text": "im feeling shades of foolish", "label": "0"}
|
||||||
|
{"text": "i admit i walked into third wave cafe feeling a little apprehensive but what appeared to be a run of the mill cafe turned out to be a restaurant with great personality and even greater food", "label": "4"}
|
||||||
|
{"text": "i have to say however is that is is awfully difficult to feel glamorous and sensational in all this heat ash stench greasy hair and your basic post yeast infection mode", "label": "1"}
|
||||||
|
{"text": "im feeling as though this is all pretty boring", "label": "0"}
|
||||||
|
{"text": "i begin to feel a dull ache in my left side", "label": "0"}
|
||||||
|
{"text": "i feel pretty good about that", "label": "1"}
|
||||||
|
{"text": "i feel like i am being punished for something that i didn t even do", "label": "0"}
|
||||||
|
{"text": "i am feeling nostalgic more than anything", "label": "2"}
|
||||||
|
{"text": "i end up feeling exhausted for all the rest of the day", "label": "0"}
|
||||||
|
{"text": "i think his uniform and glove make him feel very important too", "label": "1"}
|
||||||
|
{"text": "i feel like these words from today s passage send the church of today a warning just as much as jesus was sending his beloved disciples a warning", "label": "1"}
|
||||||
|
{"text": "i cannot see and help me to feel more confident that my god is exactly who he says he is and that i can trust him", "label": "1"}
|
||||||
|
{"text": "im feeling a little tender in my wood works", "label": "2"}
|
||||||
|
{"text": "i almost feel hated by everyone", "label": "3"}
|
||||||
|
{"text": "im feeling generous and you can have two top tips", "label": "1"}
|
||||||
|
{"text": "i love what i do and i feel so blessed and lucky to be able to travel and be creative and meet amazing people and wake up every day loving my job", "label": "2"}
|
||||||
|
{"text": "i save recipes to springpad and when im feeling adventurous i might try something new", "label": "1"}
|
||||||
|
{"text": "i started feeling dazed", "label": "5"}
|
||||||
|
{"text": "i am pleased that only pgce qualified teachers can work here it makes the effort expense to gain mine feel worthwhile", "label": "1"}
|
||||||
|
{"text": "i write these words i feel sweet baby kicks from within and my memory is refreshed i would do anything for this boy", "label": "1"}
|
||||||
|
{"text": "i kept staring at her quivering flower feeling that it was like a violent flower in time lapse photography a flower shivering with vigorous growth as it accelerated out to the flickering sun racing sky heralding the end of our relationship before it had even started", "label": "3"}
|
||||||
|
{"text": "i could at least count it i didnt feel as frantic while the group followed the bird as it moved north through the trees", "label": "4"}
|
||||||
|
{"text": "im feeling at one of my calmer states over the past month which is more than pleasant", "label": "1"}
|
||||||
|
{"text": "i feel numb jun nd", "label": "0"}
|
||||||
|
{"text": "i feel very triumphant another personal mini goal accomplished", "label": "1"}
|
||||||
|
{"text": "i end up feeling very rushed and exhausted by the time we sit down to eat and i don t take the time to really think about what i am thankful for much less take time express that to god", "label": "3"}
|
||||||
|
{"text": "im feeling a bit dazed and out of sorts like someone needs to poke me to really wake me up", "label": "5"}
|
||||||
|
{"text": "i wonder if they ever feel any pain or sadness because they always seem lively", "label": "1"}
|
||||||
|
{"text": "i feel fearless when i am right", "label": "1"}
|
||||||
|
{"text": "i feel like i am being deprived of oxygen", "label": "0"}
|
||||||
|
{"text": "i it did not feel sincere", "label": "1"}
|
||||||
|
{"text": "i still feel so agitated", "label": "3"}
|
||||||
|
{"text": "i feel virtuous for going to spin class then driving all the way to blackburn in the manual unsupervised and sucessfully handbrake starting", "label": "1"}
|
||||||
|
{"text": "i am feeling and how much i am trusting god varies enormously", "label": "1"}
|
||||||
|
{"text": "i feel myself being very indecisive about how i see my work life playing out", "label": "4"}
|
||||||
|
{"text": "i certainly get worked up about feminist and other issues at times i also have periods of feeling fairly mellow", "label": "1"}
|
||||||
|
{"text": "i feel like it was a bit rushed", "label": "3"}
|
||||||
|
{"text": "i feel like i liked my hair much better before i was using a sulfate free brand and i believe i am using a reputable brand", "label": "2"}
|
||||||
|
{"text": "i hate asking myself why i feel so reluctant when he tries to kiss me", "label": "4"}
|
||||||
|
{"text": "i feel reluctant to leave", "label": "4"}
|
||||||
|
{"text": "i feel like i should be more bothered by this topic but for some reason im sor", "label": "3"}
|
||||||
|
{"text": "im feeling pretty contented too having an instructor to assist me with higher level math again for a while is very helpful", "label": "1"}
|
||||||
|
{"text": "i make some of those cracks by the age old system of not sleeping and driving myself insane but i dont have the energy and i dont have that feeling because it feels like ive already devoted my life to working and hacking systems and fucking with numbers for people", "label": "2"}
|
||||||
|
{"text": "i got some good feedback from my summary of uganda i still feel as though i missed out on a lot of things i had wanted to say that i hope ill be able to come back to later on", "label": "0"}
|
||||||
|
{"text": "i will feel shy and won t be able to talk to her", "label": "4"}
|
||||||
|
{"text": "i could feel myself getting weepy strangely my left axilla also ached", "label": "0"}
|
||||||
|
{"text": "i feel pleased about this issue there are a lot of beautiful pieces in it for example maggie lees poem titled a href http vol", "label": "1"}
|
||||||
|
{"text": "i still feel embarrassed when i think about it", "label": "0"}
|
||||||
|
{"text": "i feel lonely at work im not a social bird as i usually am when i was in school", "label": "0"}
|
||||||
|
{"text": "i also feel that too much content is contained in the vocref top ontology", "label": "1"}
|
||||||
|
{"text": "i really like him he has good morals and is very nice to me and respectful but its like i feel like i still belong to brad and i couldnt picture myself with eric because hes too innocent", "label": "1"}
|
||||||
|
{"text": "i dont have a yeast infection in the vagina i could be feeling irritated by yeast due to my diet so i should stop eating lots of sugary foods if i can", "label": "3"}
|
||||||
|
{"text": "i feel like him try to stay as faithful as possible to what he perceives as the real events that happened in that mountain", "label": "1"}
|
||||||
|
{"text": "i admit to feeling slightly alarmed that her book was also based on olden sarawak and there seemed to be parallel plot lines to the jugra chronicles", "label": "4"}
|
||||||
|
{"text": "i dont know that i am feeling fearful", "label": "4"}
|
||||||
|
{"text": "i feel like im almost uh afraid of everything so to speak", "label": "4"}
|
||||||
|
{"text": "ive been a bad bad lazy girl i can feel my muscle aching", "label": "0"}
|
||||||
|
{"text": "i went to bed late last night and feel sort of groggy this morning", "label": "0"}
|
||||||
|
{"text": "i wont face these obstacles and feel like a stressed out mess or worse a mommy failure", "label": "0"}
|
||||||
|
{"text": "i know all art animals are lame and i feel particularly violent about the crabs", "label": "3"}
|
||||||
|
{"text": "i feel excited about something that is soley for me here is the video about it", "label": "1"}
|
||||||
|
{"text": "im going to putter on the computer till i feel less violent and down", "label": "3"}
|
||||||
|
{"text": "i feel jealous with them why they can", "label": "3"}
|
||||||
|
{"text": "im packing up to leave the school and feeling sentimental", "label": "0"}
|
||||||
|
{"text": "i feel so clever to have done that", "label": "1"}
|
||||||
|
{"text": "i feel my desire to learn or explore the truth as they say in spirituality leads me to useful sources", "label": "1"}
|
||||||
|
{"text": "i feel weird if i just do completely nothing", "label": "5"}
|
||||||
|
{"text": "i just go into these modes where i want to write then feel disgusted and do not what to write at all", "label": "3"}
|
||||||
|
{"text": "i feel ashamed afraid to let people come over to see my messy house afraid i ll be pulled over and my car towed for my unpaid ticket afraid that blood work will come back with a diagnosis of imminent death", "label": "0"}
|
||||||
|
{"text": "i don t spew my desperation all over these situations that already feel uncertain to me", "label": "4"}
|
||||||
|
{"text": "i feel selfish as i read back to my former posts how i have never asked for prayers for others how i never considered that there may be others out there that deserve their prayers answered before my own", "label": "3"}
|
||||||
|
{"text": "i feel artistic", "label": "1"}
|
||||||
|
{"text": "i started feeling this job was worthwhile", "label": "1"}
|
||||||
|
{"text": "i feel amazing after every thrift trip i got on and to have some many in a small amount of time if my idea of bliss once i am earning again i will re claim my crown of thrift princess", "label": "5"}
|
||||||
|
{"text": "i know a lot of people are whining that a first boot cant possibly be a favourite but you guys know how i feel about my beloved a href http winterpaysforsummer", "label": "1"}
|
||||||
|
{"text": "i like to pull out when i ever i feel like being snobbish about my musical tastes", "label": "3"}
|
||||||
|
{"text": "i was able to guess or pick up on a lot of the plot twists in this episode from the first hints we were given and whether thats moffat using really obvious foreshadowing or me having a solid grasp of his narrative logic im not sure but i like it it both builds suspense and makes me feel clever", "label": "1"}
|
||||||
|
{"text": "im feeling a bit bitchy tonight so i will be", "label": "3"}
|
||||||
|
{"text": "i feel creative right now and it makes me happy", "label": "1"}
|
||||||
|
{"text": "i feel anger and love and failure i totally dont get an a in mothering friends and grief and loss and captivity and wonder and awe cannot be ignored", "label": "0"}
|
||||||
|
{"text": "i feel a little abused about this whole situation", "label": "0"}
|
||||||
|
{"text": "i also hate feeling aggravated when i dont know how i am supposed to eat because when i feel that way i often sound that way", "label": "3"}
|
||||||
|
{"text": "i feel there is a shortage of loyal people whom you can trust", "label": "2"}
|
||||||
|
{"text": "i look at myself and feel dissatisfied", "label": "3"}
|
||||||
|
{"text": "i didn t know it was possible to feel more terrified", "label": "4"}
|
||||||
|
{"text": "i hauled it i feel dumb i got my lock and key i paid a man his fee now i wait and see frank black amp the catholics devils workshop released simultaneously with black letter days i initially felt this was the better of the two", "label": "0"}
|
||||||
|
{"text": "i feel very low already", "label": "0"}
|
||||||
|
{"text": "i feel like im not the only whos fed up with the world and im glad they trust their watchers with this kind of information", "label": "1"}
|
||||||
|
{"text": "i have mishandled things alongside the rest and im feeling remorseful about it right now as opposed to my very initial reaction of not wanting to care because maybe somewhere deep down in me im hoping things might be like before", "label": "0"}
|
||||||
|
{"text": "i get the feeling they genuinely liked being out here and appreciated the place", "label": "2"}
|
||||||
|
{"text": "i would then plunge into the icy depths feeling invigorated and invincible", "label": "1"}
|
||||||
|
{"text": "im feeling lonely while scott is at work", "label": "0"}
|
||||||
|
{"text": "i feel like im the bitter old lady who has had such a long life and just cant deal with it anymore", "label": "3"}
|
||||||
|
{"text": "i realised how sick i was of working and feeling and being alone", "label": "0"}
|
||||||
|
{"text": "i think beaches are my favorite places although i get the feeling i would be quite fond of the desert also", "label": "2"}
|
||||||
|
{"text": "i feel quite surprised that i have a fairly significant amount of blog readers", "label": "5"}
|
||||||
|
{"text": "i often feel like i am punished for the strengths i do have which is almost worse than no one even noticing my value", "label": "0"}
|
||||||
|
{"text": "i feel pretty insecure about my current relationship", "label": "4"}
|
||||||
|
{"text": "i start feeling really lousy but figure it was pregnancy stuff", "label": "0"}
|
||||||
|
{"text": "i saw the pair of them walk out of the gates i couldnt help it the months of suppressed feelings of not being homesick came out for a few seconds anyways", "label": "0"}
|
||||||
|
{"text": "i feel guilty that i dont have the need to constantly check in on her", "label": "0"}
|
||||||
|
{"text": "i wish to feel your tender bites", "label": "2"}
|
||||||
|
{"text": "i am at a point where i dread anyone asking me for anything because i feel like it is just one more opportunity for me to fail at something and that is a very horrible place for me to be", "label": "0"}
|
||||||
|
{"text": "i feel like it wasnt that bad but i probably wouldnt have told you that in the moment", "label": "0"}
|
||||||
|
{"text": "i feel like ive ever perfectly captured this beauty this perfect girl", "label": "1"}
|
||||||
|
{"text": "i have been absolutely useless written about nothing at all and feel like im neglecting my faithful followers by failing to update the blog today", "label": "1"}
|
||||||
|
{"text": "i can understand that you may feel youd rather not do your bit for the vulnerable and homeless in london in that precise way", "label": "4"}
|
||||||
|
{"text": "i dont know why but i had started to feel the weird pressure of a largely silent audience and with it a falsely inflated sense of importance in expressing myself and my ever so articulate opinions to said audience", "label": "5"}
|
||||||
|
{"text": "finding out that i am not an as able student as i thought", "label": "4"}
|
||||||
|
{"text": "i feel like im the mad hatter rather than alice", "label": "3"}
|
||||||
|
{"text": "i am feeling so excited for many of the bloggers i follow who are anxiously bearing through a ww of the first few weeks of pregnancy", "label": "1"}
|
||||||
|
{"text": "i feel that we did a fantastic job of showcasing the impact affirmative action has had on higher education", "label": "1"}
|
||||||
|
{"text": "i feel like my casual nonchalant attitude is easi", "label": "1"}
|
||||||
|
{"text": "i feel blessed and lucky to have gone so many places and seen so many things", "label": "1"}
|
||||||
|
{"text": "i feel i was successful in doing that for the waxing moon it s quite a bit different than the hidden sun", "label": "1"}
|
||||||
|
{"text": "i would feel joyful", "label": "1"}
|
||||||
|
{"text": "i just feel so irritable which i guess is a classic symptom of depression", "label": "3"}
|
||||||
|
{"text": "i woke up feeling very disturbed", "label": "0"}
|
||||||
|
{"text": "i wasn t feeling hot i knew that i needed to cool my body temperature and drink more fluids", "label": "2"}
|
||||||
|
{"text": "i can almost feel your delicate heart breaking", "label": "2"}
|
||||||
|
{"text": "i is so brave to express her feelings for tomoe despite being rejected", "label": "0"}
|
||||||
|
{"text": "i feel drained of energy", "label": "0"}
|
||||||
|
{"text": "i feel like i should have actively hated every single second rather than just borne it all", "label": "3"}
|
||||||
|
{"text": "id fancy or feel particularly delicious about either", "label": "1"}
|
||||||
|
{"text": "ive done all my usual workouts and so i feel confident that i worked hard on that front", "label": "1"}
|
||||||
|
{"text": "im not emo ing no no no haha i am feeling happy instead for being able to meet up with them", "label": "1"}
|
||||||
|
{"text": "i feel stunningly elegant tonight darling", "label": "1"}
|
||||||
|
{"text": "im feeling playful google doodle of pac man game", "label": "1"}
|
||||||
|
{"text": "i will rest in the knowledge that even when im feeling isolated i am never alone", "label": "0"}
|
||||||
|
{"text": "im feeling damn fantastic", "label": "1"}
|
||||||
|
{"text": "i feel like when ever i start to feel happy for a consistent amount of time it all has to end", "label": "1"}
|
||||||
|
{"text": "i feel more relaxed improvising in front of a group of other dancers as opposed to myself", "label": "1"}
|
||||||
|
{"text": "i will sit there for a month while rich and carol go home for christmas by the way they did not put any lights on me this year i am not feeling very festive right now", "label": "1"}
|
||||||
|
{"text": "i didnt feel like i missed out one bit", "label": "0"}
|
||||||
|
{"text": "i know that i still feel kind of agitated but i also switch from feeling hot to feeling cold when i lay down", "label": "3"}
|
||||||
|
{"text": "i feel the longing for the way things used to be makes the ride a bit of an emotional roller coaster", "label": "2"}
|
||||||
|
{"text": "day i received my te score and acceptance into my chosen course", "label": "1"}
|
||||||
|
{"text": "i feel dumb but happy", "label": "0"}
|
||||||
|
{"text": "i left feeling triumphant that i had taken the challenge on and saved money", "label": "1"}
|
||||||
|
{"text": "i are another reason why foreign tourists feel reluctant to drive in this island", "label": "4"}
|
||||||
|
{"text": "i feel so bitchy suddenly", "label": "3"}
|
||||||
|
{"text": "i feel that they were just as surprised to be sharing my dream as i was to have them sharing it", "label": "5"}
|
||||||
|
{"text": "i really enjoy having the weekend off i feel naughty for not doing but i am still getting results and it is a really nice treat", "label": "2"}
|
||||||
|
{"text": "i was feeling restless no one was home and it was sunny outside", "label": "4"}
|
||||||
|
{"text": "i love you and i feel so blessed to spend another year with you", "label": "2"}
|
||||||
|
{"text": "i cant help but feel so helpless", "label": "0"}
|
||||||
|
{"text": "im going to sleep now while i still feel triumphant", "label": "1"}
|
||||||
|
{"text": "i hate that feeling and its making me antsy and irritable", "label": "3"}
|
||||||
|
{"text": "i feel so foolish for resisting what was obviously meant to be", "label": "0"}
|
||||||
|
{"text": "i am feeling it and it s really ok", "label": "1"}
|
||||||
|
{"text": "i was reading through my old messages from knight and feeling very sentimental so i texted him back", "label": "0"}
|
||||||
|
{"text": "i had to preform a few poems to the class so i will feel confident when i preform", "label": "1"}
|
||||||
|
{"text": "i did see some things that i would never have done myself for the movie adaption but feel that if i did not read the book it would not have bothered me", "label": "3"}
|
||||||
|
{"text": "im feeling this longing for this endless love that maybe we could have if we let ourselves", "label": "2"}
|
||||||
|
{"text": "i feel there are other options that not as violent probably more costly yet equally futile so whats the problem with keeping our men and women out of harms way", "label": "3"}
|
||||||
|
{"text": "i am feeling a little uncertain about my skills in the birthday party arena", "label": "4"}
|
||||||
|
{"text": "i feel this way i withdraw become irritable", "label": "3"}
|
||||||
|
{"text": "i feel tortured by this thought but it feels so true", "label": "4"}
|
||||||
|
{"text": "i know i haven t posted anything for months and i feel kind of guilty big thanks to the exams tests and assignments and all but so far so good", "label": "0"}
|
||||||
|
{"text": "i really feel cute when i wear them", "label": "1"}
|
||||||
|
{"text": "i still feel a little dazed and high which is alarming since its been hours or so", "label": "5"}
|
||||||
|
{"text": "i was feeling overwhelmed", "label": "5"}
|
||||||
|
{"text": "i feel this product deserves a positive review i do want to leave you with a somewhat contradictory final thought", "label": "1"}
|
||||||
|
{"text": "i plan on making another post all about that but ive had some progress and i feel fucking fantastic", "label": "1"}
|
||||||
|
{"text": "i leave his words feeling doubtful of the naight ever ending", "label": "4"}
|
||||||
|
{"text": "ive always been a giver not a taker i feel selfish in considering this idea", "label": "3"}
|
||||||
|
{"text": "i didnt think he could honestly feel this way about himself and if he did he had no reason to because again he was popular and incredibly hot", "label": "1"}
|
||||||
|
{"text": "i feel so blessed to have met each and every one of them", "label": "2"}
|
||||||
|
{"text": "i reali feel glad", "label": "1"}
|
||||||
|
{"text": "i laced my shoes and pounded out those feelings on the hot black pavement before me", "label": "2"}
|
||||||
|
{"text": "i go to sleep as soon as my head hits the pillow i sleep deeply all night and i wake up feeling a lot less lethargic then usual", "label": "0"}
|
||||||
|
{"text": "i feel so blessed for my husband and my family supporting me on my mission of health and happiness and spreading it to my community and the world", "label": "1"}
|
||||||
|
{"text": "i beg and crave a particular something that im convinced will bring happiness and yet when it arrives im left feeling jaded and used", "label": "0"}
|
||||||
|
{"text": "i sometimes feel so vulnerable and so lost", "label": "4"}
|
||||||
|
{"text": "i now feel less doubtful towards that person about his her sincerity in rebuilding our relationship", "label": "4"}
|
||||||
|
{"text": "i mean really really hard works to obtain such a high technical skill in wushu feel kinda ashamed but somehow motivated when i saw kids doing wushu performances whole heartedly despite their tiredness", "label": "0"}
|
||||||
|
{"text": "i feel pathetic to report that i know about as much korean after these three months as i did italian after a three week vacation in italy", "label": "0"}
|
||||||
|
{"text": "i continued to feel very submissive and continued to be aroused as well", "label": "0"}
|
||||||
|
{"text": "i feel which usually very few people may easily subdue the longing of ones or even", "label": "2"}
|
||||||
|
{"text": "i always feel convinced that there is a grimacing flip handled knife or one of those small pearl handled pistols in there", "label": "1"}
|
||||||
|
{"text": "i suppose i am a bit on occasion but now ive become this horrible annoying person and i feel so strange about it", "label": "4"}
|
||||||
|
{"text": "i dont want to sound cocky or full of myself but alhamdulillah so far i dont feel troubled by breastfeeding even after i start working", "label": "0"}
|
||||||
|
{"text": "i bought some eggs and because i was feeling adventurous i also got a whole chicken and an oxtail", "label": "1"}
|
||||||
|
{"text": "i know is that i feel fantastic", "label": "1"}
|
||||||
|
{"text": "ive just been feeling so submissive recently", "label": "0"}
|
||||||
|
{"text": "i want people to feel brave and i want society to accept us as disabled people amongst us who deserve dignity and respect not to be shunned and laughed at", "label": "1"}
|
||||||
|
{"text": "im slow about this but it does feel weird returning to a home without your mum anymore", "label": "4"}
|
||||||
|
{"text": "i thought of that feeling of delicious isolation i feel when i am absorbed in a quest each revelation leading to questions then answers then more questions a cave came to mind at first lined with ancient and wisdom filled tomes a deep comfortable chair and large paper strewn table in the centre", "label": "1"}
|
||||||
|
{"text": "i grieve my losses and then feel ashamed because the little way has the essential component of my life well lived i get to tell someone about jesus love", "label": "0"}
|
||||||
|
{"text": "i am so trying to understand why my feelings should be ignored", "label": "0"}
|
||||||
|
{"text": "i sometimes feel resentful that this has come into our lives at this time", "label": "3"}
|
||||||
|
{"text": "i apologise as a tank if we have a big pull and it all feels messy", "label": "0"}
|
||||||
|
{"text": "i feel a little stressed and lost just waiting for an idea to come", "label": "0"}
|
||||||
|
{"text": "i would veer from feeling utterly terrified to utterly disorientated to utterly queasy", "label": "4"}
|
||||||
|
{"text": "i feel like someone s strange uncle trying to break the ice at a party by showing this amazing talent thinking that guests will be impressed but in turn just made everything a hundred times more awkward", "label": "4"}
|
||||||
|
{"text": "i hide this secret inside of me away from everyone because i feel ashamed and like i have no assistance in making it better", "label": "0"}
|
||||||
|
{"text": "i was tired of feeling like a helpless victim and stuck in my circumstances and slowly started making changes", "label": "4"}
|
||||||
|
{"text": "i among other things it was one of those days when i got up feeling low", "label": "0"}
|
||||||
|
{"text": "i didnt use to feel embarrassed walking by people in it at the pool", "label": "0"}
|
||||||
|
{"text": "i feel it s so obnoxious another vocab word", "label": "3"}
|
||||||
|
{"text": "i really feel like an idiotic", "label": "0"}
|
||||||
|
{"text": "i talked with the zone leader this morning he listened carefully as i explained what i was feeling and then reassured me that everything i was feeling was okay and normal and that in fact im supposed to be feeling this way right now", "label": "1"}
|
||||||
|
{"text": "i was warming up starting feeling a little lethargic", "label": "0"}
|
||||||
|
{"text": "i still feel very very disheartened", "label": "0"}
|
||||||
|
{"text": "i get another call from a frantic junior for my file and i obviously refused ta help her and now im feeling like i was too rude i mean i jz went like yeah sorry i just dont do that", "label": "3"}
|
||||||
|
{"text": "i feel a little loyal toward her because her father used to work with mine until they both retired", "label": "2"}
|
||||||
|
{"text": "ill feel a little more sympathetic towards them but until that day", "label": "2"}
|
||||||
|
{"text": "i feel like i shouldn t be that amazed with a degree in biology i was blown away", "label": "5"}
|
||||||
|
{"text": "i was feeling pleased with the manuscript reporting the results of my fellowship research annoyed at the ridiculous requirements for for", "label": "1"}
|
||||||
|
{"text": "i feel like i am the most creative and talented person ever okay well maybe not but i do feel pretty good about myself", "label": "1"}
|
||||||
|
{"text": "when my mother kept me in leadingstrings", "label": "3"}
|
||||||
|
{"text": "im feeling so pissed off that i wanna scream and shout at the wall facing me right now", "label": "3"}
|
||||||
|
{"text": "i didn t really know many other ill people but nowadays i do and i m so glad that i do knowing other people in a similar position people who truly get how you feel is a wonderful thing", "label": "1"}
|
||||||
|
{"text": "i feel drained or do i feel energized", "label": "0"}
|
||||||
|
{"text": "i do find myself confused when i feel no pain and when my pain becomes resigned understanding a warm memory of a beautiful girl locked away for no one to ruin to taint", "label": "0"}
|
||||||
|
{"text": "i started feeling shaky hungry", "label": "4"}
|
||||||
|
{"text": "i and will be pleasantly surprised and vote heavily for him but i have a feeling a dignified comeback will have to make do for mr johnson this time around", "label": "1"}
|
||||||
|
{"text": "i give you some tips on overcoming the feelings of being overwhelmed", "label": "4"}
|
||||||
|
{"text": "i am already feeling frantic", "label": "4"}
|
||||||
|
{"text": "i started feeling better towards the afternoon and now i still intend to finish off some things in my to do list", "label": "1"}
|
||||||
|
{"text": "i just feel as though somehow shes become less likeable", "label": "1"}
|
||||||
|
{"text": "i feel like i know i m troubled and that s why i give myself an excuse", "label": "0"}
|
||||||
|
{"text": "i got this amazing news from tracy today the final covers only chapters no wonder we were feeling so rushed and it seemed we didnt have enough time", "label": "3"}
|
||||||
|
{"text": "i know first hand and all too well those feelings of pain hurt embarrassment and even shame over self image body shape physical features weight etc because of what i have let my body become", "label": "0"}
|
||||||
|
{"text": "i feel threatened i feel fear", "label": "4"}
|
||||||
|
{"text": "i was also given several shiny presents because my friends are really rather cool i actually prefer late birthday presents to early ones as it extends the period of feeling beloved significant segments of all and sundry and is more unexpected", "label": "1"}
|
||||||
|
{"text": "i am feeling needy needing you so needing your love by the grove", "label": "0"}
|
||||||
|
{"text": "i feel foolish for all these long runs and extra miles if the best i can muster is nearly seconds per mile slower than i was a year ago", "label": "0"}
|
||||||
|
{"text": "i feel cold spots", "label": "3"}
|
||||||
|
{"text": "i honestly feel envious", "label": "3"}
|
||||||
|
{"text": "ive been taking or milligrams or times recommended amount and ive fallen asleep a lot faster but i also feel like so funny", "label": "5"}
|
||||||
|
{"text": "i ignored my feelings i ignored myself", "label": "0"}
|
||||||
|
{"text": "i especially feel this way because someone who i thought was my friend rejected me and joined the clique", "label": "0"}
|
||||||
|
{"text": "i want the girl i love to feel loved and be loved", "label": "2"}
|
||||||
|
{"text": "i always feel i always understand that the people who are being the most hateful and harmful towards me are hurting themselves and taught wrongly and i hurt for them because i want to go back and undo the pain and childhood bigotry that binds their lives into this path", "label": "3"}
|
||||||
|
{"text": "i feel rather pathetic", "label": "0"}
|
||||||
|
{"text": "i want to capture this feeling and put it into words so i can again gain the sweet taste in my mouth right now", "label": "2"}
|
||||||
|
{"text": "i feel so unloved lately like i dont get given enough attention", "label": "0"}
|
||||||
|
{"text": "i can t believe i feel so petrified", "label": "4"}
|
||||||
|
{"text": "i feel slightly embarrassed that i keep telling myself and trying to make myself believe that life is actually to enjoy just to be let down harder and harder each time", "label": "0"}
|
||||||
|
{"text": "i was pregnant with emily and therefore always feeling exhausted it wasn t that hard to sleep when walter slept if i needed the extra rest", "label": "0"}
|
||||||
|
{"text": "i feel so pretty and glamorous", "label": "1"}
|
||||||
|
{"text": "i was feeling especially disillusioned and unhappy allowing the last lines to make the most difference but most this is especially telling of how much my life has changed since i was fourteen how my experiences have altered my perceptions", "label": "0"}
|
||||||
|
{"text": "i use the noticer to discover the source of my feelings it allows me to understand and realize that there is no solution for these past feelings i am grappling with only compassionate awareness", "label": "2"}
|
||||||
|
{"text": "i feel a despairing sadness because after so much time working on this we have to cut ties", "label": "0"}
|
||||||
|
{"text": "i feel that i no longer have to do things to look cool", "label": "1"}
|
||||||
|
{"text": "i am yelling at my kids at the drop of a hat for no reason possess no energy to do anything just feeling irritable and sad about everything", "label": "3"}
|
||||||
|
{"text": "i don t recall ever feeling carefree", "label": "1"}
|
||||||
|
{"text": "i feel like im being greedy when i say i want more money", "label": "3"}
|
||||||
|
{"text": "i had suppressed my homosexual feelings so much that i replaced them with what i thought would be socially acceptable", "label": "1"}
|
||||||
|
{"text": "i feel enormously honoured to be included in this list", "label": "1"}
|
||||||
|
{"text": "i feel like im craving it and then no matter what i order i just really am not that impressed", "label": "5"}
|
||||||
|
{"text": "i am really looking forward to feel like in europe again although somehow i m fond of this place", "label": "2"}
|
||||||
|
{"text": "i was feeling pretty hateful towards my refrigerator as i cleaned it", "label": "3"}
|
||||||
|
{"text": "i ought not come for i stipulation them to feel sorrowful for their skeered rupees which they re assert to the field but i will console for i allusion massou to live", "label": "0"}
|
||||||
|
{"text": "i got home i started to feel weird", "label": "4"}
|
||||||
|
{"text": "i feel quite lucky to have stumbled upon it", "label": "1"}
|
||||||
|
{"text": "i cannot thank you enough for always finding a way to make me feel better", "label": "1"}
|
||||||
|
{"text": "i never thought id feel comfortable in but im just going to go for it and make bold fashion choices", "label": "1"}
|
||||||
|
{"text": "i couldnt help but feel that all these people had missed the best of the day", "label": "0"}
|
||||||
|
{"text": "i may feel stress unhappy", "label": "0"}
|
||||||
|
{"text": "i am afrade for his life as some people feel quite hostile towards him", "label": "3"}
|
||||||
|
{"text": "i feel as if her call was not a sincere apology", "label": "1"}
|
||||||
|
{"text": "ive had two shots of lupron and im feeling fine", "label": "1"}
|
||||||
|
{"text": "i have survived the low part of the crash im starting to feel hopeful again", "label": "1"}
|
||||||
|
{"text": "i feel my own heart a lot to make sure i am still there", "label": "1"}
|
||||||
|
{"text": "i feel foolish for thinking this would work", "label": "0"}
|
||||||
|
{"text": "i feel like my trust is being abused the less i feel like theres a future for us", "label": "0"}
|
||||||
|
{"text": "i feel the need to blog pagetitle from flab to fab", "label": "1"}
|
||||||
|
{"text": "i was feeling so overwhelmed that i asked my bqff to keep of them at her house until theyre ready to be loaded so i dont feel so behind", "label": "5"}
|
||||||
|
{"text": "i do feel a little needy", "label": "0"}
|
||||||
|
{"text": "i feel very unhappy and incomplete", "label": "0"}
|
||||||
|
{"text": "i feel like the emotional fog is finally starting to lift", "label": "0"}
|
||||||
|
{"text": "i aint feeling it this is where been carefree deffinately is worrying in its self", "label": "1"}
|
||||||
|
{"text": "i will continue to struggle with experiencing normal feelings and the sense theyre chipping away at precious time", "label": "1"}
|
||||||
|
{"text": "i kind of feel like he is sincere", "label": "1"}
|
||||||
|
{"text": "i feel extremely jealous when ranbir works with other directors ayan mukerji filmfare", "label": "3"}
|
||||||
|
{"text": "im not crossing things off ever growing to do list i feel like i keep making stupid silly mistakes in all areas of my life amp im just tired", "label": "0"}
|
||||||
|
{"text": "i feel very reluctant to blog during my free period even when my hp is plugged to my laptop for charging making it easy to upload photos online", "label": "4"}
|
||||||
|
{"text": "i am just feeling too rotten to put on a happy face for the night", "label": "0"}
|
||||||
|
{"text": "i prefer to feel valued than just save money i prefer to work with people i know personally", "label": "1"}
|
||||||
|
{"text": "i did that at the recent french open with the claret jug so i now feel somewhat reluctant i got close to the claret jug in france as i felt afterwards i want to be able to do that till hopefully win the open and then get to bond it for the next twelve months", "label": "4"}
|
||||||
|
{"text": "i was feeling a little annoyed at some people", "label": "3"}
|
||||||
|
{"text": "i feel is defective", "label": "0"}
|
||||||
|
{"text": "i know not all women feel this way but i have felt very unimportant int the church and almost dare i say second class citizen im not trying to bash the church but i think some women are so thirsty for knowlege about her to reinforce their own place and importance in the world", "label": "0"}
|
||||||
|
{"text": "i was feeling all resentful that id been given such a boring assignment and", "label": "3"}
|
||||||
|
{"text": "i admits to feeling remorseful after her outbursts width height", "label": "0"}
|
||||||
|
{"text": "i feel terrific and i m starting to put weight on", "label": "1"}
|
||||||
|
{"text": "i started to open up about it i started to feel more like myself the stephanie who isn t embarrassed by life s setbacks who tackles difficult situations with humor and honesty", "label": "0"}
|
||||||
|
{"text": "i need when i feel beaten down", "label": "0"}
|
||||||
|
{"text": "i feel dirty if i dont", "label": "0"}
|
||||||
|
{"text": "i feel valued scores tracking terribly low", "label": "1"}
|
||||||
|
{"text": "i feel so repressed when compared to dear a href http eurodancemix", "label": "0"}
|
||||||
|
{"text": "i wont be so sure to feel optimistic about this either", "label": "1"}
|
||||||
|
{"text": "i feel smart yet comfortable in it i feel good when i wear it", "label": "1"}
|
||||||
|
{"text": "i mean it didnt feel like one it felt like a casual outing just meeting up to catch up and all", "label": "1"}
|
||||||
|
{"text": "im feeling generous i am gonna tell you about another cool blogger", "label": "2"}
|
||||||
|
{"text": "im grateful for the cozy feeling of hot cocoa and flannel nighties", "label": "2"}
|
||||||
|
{"text": "i feel honored or insulted", "label": "1"}
|
||||||
|
{"text": "i was down feeling greedy and depressed", "label": "3"}
|
||||||
|
{"text": "i feel bothered", "label": "3"}
|
||||||
|
{"text": "im feeling adventurous i get the philips better lemon chicken", "label": "1"}
|
||||||
|
{"text": "i feel to be the most popular right now", "label": "1"}
|
||||||
|
{"text": "i feel so hopeless and strange and all i really want is to actually disappear", "label": "0"}
|
||||||
|
{"text": "i have reached the conclusion that what i feel is most important is what i think will most likely make me feel good or and keep away bad or unhappy feelings", "label": "1"}
|
||||||
|
{"text": "i feel a little disheartened with like im making an effort and getting nothing in return", "label": "0"}
|
||||||
|
{"text": "i am feeling some divine intervention at work here", "label": "1"}
|
||||||
|
{"text": "i also were able to get appointment with the osteopath on the which is freaking awesome as it feels like i am caring a boulder in my stomach", "label": "2"}
|
||||||
|
{"text": "i started to feel discouraged at the thought of being there more than one day", "label": "0"}
|
||||||
|
{"text": "i was so stubborn and that it took you getting hurt for me to admit even to myself how i feel i haven t been very considerate of you in that respect", "label": "2"}
|
||||||
|
{"text": "i feel sad donna summer dead at a href http jtwoo", "label": "0"}
|
||||||
|
{"text": "i don t ever have to fully feel any unpleasant emotion", "label": "0"}
|
||||||
|
{"text": "i feel aching andangry", "label": "0"}
|
||||||
|
{"text": "i feel that way but yeah i do have a problem in trusting especially guys", "label": "1"}
|
||||||
|
{"text": "i know if i go to crossroads or thrift stores i can find something roughly like what im wishing for if i search hard enough and theres no feeling quite so delicious as something awesome for a good bargain", "label": "1"}
|
||||||
|
{"text": "i feel frustrated or impatient", "label": "3"}
|
||||||
|
{"text": "i feel so numb f", "label": "0"}
|
||||||
|
{"text": "i feel sorry gary today pm a href", "label": "0"}
|
||||||
|
{"text": "i love they way they feel in my hand im sort of shocked i dont have some psycho fetish", "label": "5"}
|
||||||
|
{"text": "i feel our children are caught up in these unfortunate situations by no fault of their own and they so deserve to have a voice and someone to be there just for them and their best interests", "label": "0"}
|
||||||
|
{"text": "i feel as one with the trail without being totally punished by it", "label": "0"}
|
||||||
|
{"text": "i begged my husband for it last year as if i thought once having it id lose weight and feel amazing", "label": "1"}
|
||||||
|
{"text": "i hate being so hungry and weak that i feel stubborn and dont want to do anything productive", "label": "3"}
|
||||||
|
{"text": "i am no fan of the current president i am a conservative and it made me feel unwelcome", "label": "0"}
|
||||||
|
{"text": "i appreciate the mix of modern hard rock and classic heavy metal on faithsedge s new album the answer of insanity i also feel the album lack of strong melodies", "label": "1"}
|
||||||
|
{"text": "i woke up the morning of our hike feeling jubilant", "label": "1"}
|
||||||
|
{"text": "i was so excited to try it considering i havent before and so many people rave about it but i didnt feel like it did anything special for my lashes i dont really like drier formula type mascaras but i prefer the wet formula ones more", "label": "1"}
|
||||||
|
{"text": "i function best with a lot on my plate and feel very uncomfortable with my life if i have nothing to do", "label": "4"}
|
||||||
|
{"text": "i feel like ive got the content down i print my work and read it through", "label": "1"}
|
||||||
|
{"text": "i am made to feel embarrassed about my injuries but in my circle of horse friends i am supported we all are", "label": "0"}
|
||||||
|
{"text": "im feeling very frustrated with my novel in progress right now and i cant even decide why", "label": "3"}
|
||||||
|
{"text": "i feel like i get blamed for all his stress sometimes", "label": "0"}
|
||||||
|
{"text": "i came away from the experience feeling rather confused and it left a sour taste in my mouth", "label": "4"}
|
||||||
|
{"text": "i have been feeling listless and loopy", "label": "0"}
|
||||||
|
{"text": "i begin to feel complacent with my life here", "label": "1"}
|
||||||
|
{"text": "i am feeling happy and stressed at the same time because i cant come up with photos for photography tomorrow", "label": "1"}
|
||||||
|
{"text": "i thought i would challenge myself i really wanted to capture a realistic view of the animal whilst also showing of my own unique painting style i feel this was successful yet next time i would go larger", "label": "1"}
|
||||||
|
{"text": "i just hope we can help him feel less afraid and more supported and loved", "label": "4"}
|
||||||
|
{"text": "i can usually do a month without feeling homesick", "label": "0"}
|
||||||
|
{"text": "i feel more inspired to get back into the mindset of putting the good stuff into my body", "label": "1"}
|
||||||
|
{"text": "i feel weird taking up time and making these sometimes terrible sounds that people have to hear", "label": "5"}
|
||||||
|
{"text": "i feel disturbed inside", "label": "0"}
|
||||||
|
{"text": "i hope to make blood clots feel unwelcome in my body in any way possible as one of my new years resolutions", "label": "0"}
|
||||||
|
{"text": "i had gone to the cumberland earlier that week so had met a few of n amp h friends prior to the weekend which was really lovely as since moving away i feel there are so many wonderful people i don t know", "label": "1"}
|
||||||
|
{"text": "im living alone while waiting for my license test and english speaking test im feeling more relaxed hibernating without any fresh air", "label": "1"}
|
||||||
|
{"text": "i feel that some people don t usually prefer to be truthful and would rather make up many different things and tell lies", "label": "1"}
|
||||||
|
{"text": "i find myself feeling happy more and more and it feels so very good", "label": "1"}
|
||||||
|
{"text": "i picked up and moved to the czech republic by myself it was chris who sent me a care package with food and music to remind me of home when i was feeling my most homesick", "label": "0"}
|
||||||
|
{"text": "i woke up feeling rather devastated", "label": "0"}
|
||||||
|
{"text": "i would also change the floor to a more pleasant feeling and dog friendly flooring", "label": "1"}
|
||||||
|
{"text": "i remember feeling really terrified when i was in brazil on a bus that was going up steep mountain hills on the side of the mountain in the middle of a big storm wondering if we were going to fall off", "label": "4"}
|
||||||
|
{"text": "i am pleased and a little disturbed i guess that these feelings of melancholy lead me right back to the thing that brings them on", "label": "0"}
|
||||||
|
{"text": "i really do feel unfortunate for the person who has to carrry me", "label": "0"}
|
||||||
|
{"text": "ive discontinued this once seemingly integral method of self preservation feeling assured that i am the only theif in philadelphia", "label": "1"}
|
||||||
|
{"text": "i am a bit of a romantic so i really feel like we missed out on those things this time but i would not trade the family time we spent together", "label": "0"}
|
||||||
|
{"text": "i also wouldnt mind a canon d mark iii if anyone is feeling generous", "label": "1"}
|
||||||
|
{"text": "i feel only reason skudrive is so popular is becsuse microsoft is so media driven", "label": "1"}
|
||||||
|
{"text": "i just didnt feel inspired", "label": "1"}
|
||||||
|
{"text": "i step back in the game day after day even when the odds of success seem out of favor i love on and when i feel nothing but ugly inside she is there to remind me of who i really am and nothing could be prettier than that", "label": "0"}
|
||||||
|
{"text": "i feel a lot more contented just having re lived a few moments of that trip through these photos", "label": "1"}
|
||||||
|
{"text": "i was feeling bouncy so i added a few of my go to tangles around it i rather like the spiraling effect achieved", "label": "1"}
|
||||||
|
{"text": "i feel irritable supersensitive", "label": "3"}
|
||||||
|
{"text": "i even feel weird living with lay people again", "label": "5"}
|
||||||
|
{"text": "i feel like im a hateful person sometimes", "label": "3"}
|
||||||
|
{"text": "i m being reserved kind i feel so loads and loads and loads of mood swings i am not caring eh", "label": "2"}
|
||||||
|
{"text": "i feel so selfish so self indulgent", "label": "3"}
|
||||||
|
{"text": "i feel so disheartened that i feel nauseous and sick", "label": "0"}
|
||||||
|
{"text": "i am feeling a bit agitated or stressed i find a surprising amount of relief from cleaning and decluttering my house or even just a small space like a closet", "label": "4"}
|
||||||
|
{"text": "im certainly not going to sit and tell you whats going on in my personal life but i feel that if you were ever curious about whats going in my life all youd have to do is watch the show", "label": "5"}
|
||||||
|
{"text": "i guess i sort of believe him but deep down i just feel unsure about the unknown", "label": "4"}
|
||||||
|
{"text": "i have been following your blog i feel like ive gotten to know the real you not some filtered version or a fake internet persona of who youd like to be", "label": "0"}
|
||||||
|
{"text": "i also stop reading fashion magazine because it makes me feel ugly and fat", "label": "0"}
|
||||||
|
{"text": "i have analyzed and overanalyzed my aversion to this suggestion and in the end have accepted my gut feeling this was not an acceptable solution for alex at that time and place", "label": "1"}
|
||||||
|
{"text": "im feeling really good and i know im getting stronger but i am also waking up early and working hard almost every morning", "label": "1"}
|
||||||
|
{"text": "i think maybe about how strongly she feels about him and being there for him but brad looks really distracted", "label": "3"}
|
||||||
|
{"text": "i didnt feel too needy i didnt feel too emotional", "label": "0"}
|
||||||
|
{"text": "i remember feeling as innocent as she looked that day", "label": "1"}
|
||||||
|
{"text": "i dont know if i feel this way because i live in la and id rather be somewhere else or if its because im stressed about money work or if im just in need of a hug", "label": "0"}
|
||||||
|
{"text": "i feel listless and lethargic with a hint of anxiety as if there is something i need to be doing but i dont know what", "label": "0"}
|
||||||
|
{"text": "i was feeling irritated and slightly upset after this conversation", "label": "3"}
|
||||||
|
{"text": "i can live out my values instead of just being crushed by debt feeling rejected and feeling empty", "label": "0"}
|
||||||
|
{"text": "i cannot feel more sincere", "label": "1"}
|
||||||
|
{"text": "i have been feeling restless and not quite grounded", "label": "4"}
|
||||||
|
{"text": "i pretty much have everything in place to feel terrific going into this affair", "label": "1"}
|
||||||
|
{"text": "i see how strong and bright you are and as you meet your milestones weeks early i feel assured that my gut was always right", "label": "1"}
|
||||||
|
{"text": "ive decided that the exes you had a real strong feeling whether love or just extremley caring you cant be just friends with them because it will eventually blow up in your face", "label": "2"}
|
||||||
|
{"text": "im feeling hopeful that the last piece in the lighting jigsaw may be finally complete", "label": "1"}
|
||||||
|
{"text": "i cried through it all but i remember them blessing us to feel comfort and i remember feeling a sweet spirit", "label": "2"}
|
||||||
|
{"text": "i also know that if i forget for a period of time it would cause tension or a feeling of unease that maybe i am mad at him", "label": "3"}
|
||||||
|
{"text": "i also feel fearful and concerned for them both worried", "label": "4"}
|
||||||
|
{"text": "i feel so damn complacent", "label": "1"}
|
||||||
|
{"text": "i would still feel weird", "label": "4"}
|
||||||
|
{"text": "i feel that sweet pang and a desire for adventure and excitement", "label": "2"}
|
||||||
|
{"text": "i am still spinning from all the activities but also feeling invigorated and excited by all the demos talks panel discussions exhibitions conversations the art fair the communal meals the art exchange the books the vendor room", "label": "1"}
|
||||||
|
{"text": "i am feeling incredibly restless", "label": "4"}
|
||||||
|
{"text": "i started back at work i have to admit that ive been feeling a little overwhelmed", "label": "5"}
|
||||||
|
{"text": "i feel been accepted and although sip compliant voip services may be used as part of an institution s telephony infrastructure on the desktop and indeed on mobile phones skype probably is the safe mainstream option", "label": "1"}
|
||||||
|
{"text": "im feeling generous or in a restaurant like the mandarin grill which has a fairly stellar reputation this impression may be extended to edible yet decorative garnishes like samphire", "label": "2"}
|
||||||
|
{"text": "i invest in my friendships i feel hurt when i perceive that this investment is not returned", "label": "0"}
|
||||||
|
{"text": "i dont know why i think its because were on a break so not actively ttc but i just feel better about the whole thing", "label": "1"}
|
||||||
|
{"text": "i want him to feel uncertain and unsettled because he deserves it and maybe itll teach him a lesson", "label": "4"}
|
||||||
|
{"text": "i came to china feeling a little frightened of everything around me", "label": "4"}
|
||||||
|
{"text": "im wondering why i feel submissive sometimes more than others because im feeling it", "label": "0"}
|
||||||
|
{"text": "i know the environment i live in we all smile and politely wave but i have my moments of feeling absolutely appalled at how shortsighted people can be", "label": "3"}
|
||||||
|
{"text": "i am quite a regular reader of your blog and each time i read an experience i feel the greatness and kindness of our beloved father sai", "label": "1"}
|
||||||
|
{"text": "i think people reject their feelings because they re terrified of them but the truth is that once you see that you can t die from them and that they actually go away they re not so scary", "label": "4"}
|
||||||
|
{"text": "i still feel good about the fact that im smaller than her now but thats not the drive that got me here", "label": "1"}
|
||||||
|
{"text": "i would do well in psychiatry because i really feel for my patients and am super perceptive of things most people dont pick up on", "label": "1"}
|
||||||
|
{"text": "i feel like i have to make the suffering i m seeing mean something", "label": "0"}
|
||||||
|
{"text": "i am already feeling heartbroken and alone again", "label": "0"}
|
||||||
|
{"text": "i found myself feeling inhibited and shushing her quite a lot", "label": "4"}
|
||||||
|
{"text": "i feel hopeless helpless and paralysed", "label": "0"}
|
||||||
|
{"text": "i feel like im facing alone my love hes gone", "label": "0"}
|
||||||
|
{"text": "im feeling this little one move a lot now and im constantly surprised by his her little kicks", "label": "5"}
|
||||||
|
{"text": "i feel like a little kid whose mom is proud that they touched the soccer ball once during the game", "label": "1"}
|
||||||
|
{"text": "i wont bore you with the psychological signs of workplace burnout except to say that if youre feeling depressed or anxious helpless or hopeless congratulations", "label": "0"}
|
||||||
|
{"text": "i just feel pathetic holding on when theres obviously nothing for me to hold on to", "label": "0"}
|
||||||
|
{"text": "i believe in you moment we all feel til then it s one more skeptical song", "label": "4"}
|
||||||
|
{"text": "i feel soo disturbed by it", "label": "0"}
|
||||||
|
{"text": "i feel more irritable", "label": "3"}
|
||||||
|
{"text": "i view myself in this way is that when i was growing up there were people who constantly made me feel like i wasnt good enough", "label": "1"}
|
||||||
|
{"text": "i have to admit i am afraid that i cannot do that one thing that can make you feel contented", "label": "1"}
|
||||||
|
{"text": "i didnt feel so hot", "label": "2"}
|
||||||
|
{"text": "i want to do with my life is an amazing feeling and i couldnt be more pleased about where my future is headed", "label": "1"}
|
||||||
|
{"text": "ive been feeling cranky lately", "label": "3"}
|
||||||
|
{"text": "i couldn t feel positive emotions of any sort", "label": "1"}
|
||||||
|
{"text": "i was sick with a cold amp not feeling well wondering if i would even be able to have the patience to go to whitleys month photo shoot", "label": "1"}
|
||||||
|
{"text": "i was starting to feel alarmed", "label": "4"}
|
||||||
|
{"text": "i feel im rather innocent in that respect", "label": "1"}
|
||||||
|
{"text": "i feel the responsibility of loving them even more", "label": "2"}
|
||||||
|
{"text": "i get to my desk at nine feeling exhausted and tired and grumpy to come home and rush through my to do list and get angry that i havent finished it", "label": "0"}
|
||||||
|
{"text": "i tried to make a cheerful comment about fitting her in but i feel really unwelcome", "label": "0"}
|
||||||
|
{"text": "i feel like this is another one of those dresses that looks really cool from far away but when i take a closer look i dont like it as much", "label": "1"}
|
||||||
|
{"text": "i glanced out the window at the people strolling on the sidewalks carefree suddenly feeling envious of them for reasons i couldn t explain", "label": "3"}
|
||||||
|
{"text": "i feel that the most intelligent people are the ones who pay attention to the world around them and think about an issue before they pass judgment on it or make a decision as to where they stand", "label": "1"}
|
||||||
|
{"text": "i actually put forth the effort and stick to a routine though i am busier i feel less stressed and more fulfilled at the end of the day and am better able to enjoy the simple moments of motherhood", "label": "0"}
|
||||||
|
{"text": "i feel helpless about not being able to help him in feeling better but do my best to encourage him and think positively as mom is doing", "label": "4"}
|
||||||
|
{"text": "i really don t feel all that bothered by the north london derby", "label": "3"}
|
||||||
|
{"text": "i was feeling melancholy on a cloudy rainy lonely easter sunday", "label": "0"}
|
||||||
|
{"text": "i don t feel too troubled over work anymore getting used to the movement of the day", "label": "0"}
|
||||||
|
{"text": "i had the feeling he didnt and he actually seemed impressed with me or i should say my work and my range of skills", "label": "5"}
|
||||||
|
{"text": "i like the padding because it makes the ride more comfortable but it feels funny to walk in when not riding let alone what it looks like lol", "label": "5"}
|
||||||
|
{"text": "i believe even though at the time i didn t feel i should be hospitalized i m pretty sure it was a good thing i was", "label": "1"}
|
||||||
|
{"text": "i have said in previous posts i always feel so elegant wearing an azul creation", "label": "1"}
|
||||||
|
{"text": "i just take control and baby when you kiss my lips and when you kiss my thighs you got me think of the perfect sh t and it always feel so tender and mild when you got your love in between mines", "label": "2"}
|
||||||
|
{"text": "i didnt really feel that embarrassed", "label": "0"}
|
||||||
|
{"text": "i feel so virtuous", "label": "1"}
|
||||||
|
{"text": "i feel if journalists then blamed me", "label": "0"}
|
||||||
|
{"text": "i was gay that i began to feel disturbed and embarrassed", "label": "0"}
|
||||||
|
{"text": "i feel quite fearful about her future other times i wonder how this happened to her or even if i did something to cause abbigail to have apraxia", "label": "4"}
|
||||||
|
{"text": "i feel a bit safer now in using the motivator that works and trusting that i will be able to use my other motivators and combat other parts of the ed if i am patient and strong", "label": "1"}
|
||||||
|
{"text": "i feel more calm and comfortable by wearing those neutral color", "label": "1"}
|
||||||
|
{"text": "i hurt went on and found someone more worthwhile so why when i cast my mind back to those times does it still make me feel ashamed", "label": "0"}
|
||||||
|
{"text": "i feel those artistic yearnings in my music and i know that if i was to provide for a family and couldnt do so with the gift god has given me it would be very very hard", "label": "1"}
|
||||||
|
{"text": "i feel that my labors are in vain when i don t see the expected results of my efforts", "label": "0"}
|
||||||
|
{"text": "i am feeling kind of sympathetic towards camilla for that", "label": "2"}
|
||||||
|
{"text": "i guess you could say i am teeter totering right now on the edge and i feel like im dangerous", "label": "3"}
|
||||||
|
{"text": "i want people to have the same feeling of delighted shock i had when i saw it", "label": "1"}
|
||||||
|
{"text": "i awoke an hour after feeling groggy", "label": "0"}
|
||||||
|
{"text": "i feel strongly it could be helping people and doing what i am unsure of but it isn t within the us", "label": "4"}
|
||||||
|
{"text": "i am most defensive when i feel most threatened", "label": "4"}
|
||||||
|
{"text": "im just trusting in my feelings and im trusting god above and im trusting you can give this baby both his mothers love", "label": "1"}
|
||||||
|
{"text": "im contemplating and feeling skeptical", "label": "4"}
|
||||||
|
{"text": "ive had a lot of good days where i feel fabulous and have lots of energy but lately ive also had some bad days where i feel gigantic and slow and clumsy", "label": "1"}
|
||||||
|
{"text": "i fucking love christmas so i ve compiled a list of fun things going on in the ol smoke to get you feeling festive", "label": "1"}
|
||||||
|
{"text": "i wrong or ridiculous to feel pissed", "label": "3"}
|
||||||
|
{"text": "i feel absolutely amazing", "label": "5"}
|
||||||
|
{"text": "i feel tortured and sickened exactly the way i felt the last day of lances leave", "label": "4"}
|
||||||
|
{"text": "i did feel a bit like i was being mircowaved which wasnt an entirely pleasant feeling", "label": "1"}
|
||||||
|
{"text": "i still feel uncertain with many new paths i must travel and as lost as i feel sometimes i am sure heavenly father is lifting me up and helping me to feel joy in the things that matter most", "label": "4"}
|
||||||
|
{"text": "i feel morally outraged and furious more often than i d like", "label": "3"}
|
||||||
|
{"text": "i feel herpes coming i would be very surprised at this point if i make it out again after my checkup at the clinic on wednesday", "label": "5"}
|
||||||
|
{"text": "i feel the cold mostly in my arms and torso", "label": "3"}
|
||||||
|
{"text": "i feel doubly honoured because both river of a href http river driftingthroughlife", "label": "1"}
|
||||||
|
{"text": "i feel like i m being mentally and emotionally assaulted with something and i just wanted to write that down somewhere", "label": "0"}
|
||||||
|
{"text": "i feel the nearness of my beloved grandpa bishop hi grandpa", "label": "1"}
|
||||||
|
{"text": "i did feel pretty cool when my wifes coworkers showed her the design on pinterest and she said my husband was the designer", "label": "1"}
|
||||||
|
{"text": "i can drop people who are using me no problem and i can certainly assert myself with the children but asking nik to leave early on an easy day just because im feeling weepy and want a hug", "label": "0"}
|
||||||
|
{"text": "i got s and really i feel like i hit the lottery i was scared itd be something like x and id be screwed", "label": "4"}
|
||||||
|
{"text": "i stood inside the chabad sukkah watching the sunlight filter through the woven schach of the roof and feeling the gentle breeze coming through the open lattice walls i began to relax", "label": "2"}
|
||||||
|
{"text": "i go i see our flag flying at the turkish schools and i feel very proud", "label": "1"}
|
||||||
|
{"text": "i was really feeling crappy even after my awesome week of workouts", "label": "0"}
|
||||||
|
{"text": "i feel confused after that", "label": "4"}
|
||||||
|
{"text": "im feeling a little apprehensive about it because i feel like im suddenly way too old compared to my mental age of about", "label": "4"}
|
||||||
|
{"text": "i feel angered by this", "label": "3"}
|
||||||
|
{"text": "i feel disturbed and sad", "label": "0"}
|
||||||
|
{"text": "i feel it s my job to give him all the tools he needs to be a successful person", "label": "1"}
|
||||||
|
{"text": "i didn t give up blogging but i still feel that i want to make my posts more useful to my readers", "label": "1"}
|
||||||
|
{"text": "i am regularly in a rush and feel irritated and i dont take the time to communicate my needs or my feelings", "label": "3"}
|
||||||
|
{"text": "i feel that uncertain should be a better communicator", "label": "4"}
|
||||||
|
{"text": "i feel like the truth is that to him it just wasnt working out he lost patience with me and he felt he would be better off by not trying to please me", "label": "0"}
|
||||||
|
{"text": "i feel fighter move in me and i am amazed at the way he and my tummy is growing so quickly", "label": "5"}
|
||||||
|
{"text": "i invariably feel very optimistic and focused", "label": "1"}
|
||||||
|
{"text": "i fall victim to feeling inadequate if i am anywhere short of perfection in what i set of my expectations or what i perceive are the expectations of others", "label": "0"}
|
||||||
|
{"text": "i pray look next to my phone what time i feel my anxiety levels getting too superior", "label": "1"}
|
||||||
|
{"text": "i feel rude bring my own fridge i do eat food but i guess my option", "label": "3"}
|
||||||
|
{"text": "i really didnt feel like running on saturday but decided i should to make sure i got my miles in for june", "label": "1"}
|
||||||
|
{"text": "i got a stitch in my side during the first mile couldnt feel my feet it was so cold etc etc", "label": "3"}
|
||||||
|
{"text": "i took a psych o class in college which defined love as something rather selfish its focus being on the way you feel about yourself when youre with your beloved", "label": "2"}
|
||||||
|
{"text": "watching a violent movie", "label": "3"}
|
||||||
|
{"text": "i feel like one of those dirty confidential intermediaries that i so dislike", "label": "0"}
|
||||||
|
{"text": "im just figuring these lyrics out myself so apologies if im slightly wrong but it just feels a bit fake", "label": "0"}
|
||||||
|
{"text": "i miss feeling pretty and delicate", "label": "2"}
|
||||||
|
{"text": "i feel a radiant and grounded presence of truth beauty and goodness", "label": "1"}
|
||||||
|
{"text": "i male are stupid first for woman cry babies and should get over it and you feel really cool for putting the stupid men in their place", "label": "1"}
|
||||||
|
{"text": "i feel neglectful and while at her reception i grazed her arm as i walked by and she pulled me back and said where are you going youre way more imporant than those people but i was stoned and full of champagne and could only tell her she was beautiful and that he seemed nice", "label": "0"}
|
||||||
|
{"text": "i don t feel agitated some part of me thinks that i ve finally managed to keep my emotions in check", "label": "4"}
|
||||||
|
{"text": "i feel rather pissed off", "label": "3"}
|
||||||
|
{"text": "ive always been very nervous to do something like that as i feel like i am not really that talented to enter something into an official contest", "label": "1"}
|
||||||
|
{"text": "i haven t been able to shake this akward and unusual feeling i feel irritable and space out all the time feels like i was surged as well as my computer", "label": "3"}
|
||||||
|
{"text": "i feel hated i feel angry i feel very sad i feel like im going to be abandoned i feel angry because i abandoned someone but in reality no one at this age can expect that neither party will be abandoned", "label": "3"}
|
||||||
|
{"text": "i feel this ad does i m not impressed", "label": "5"}
|
||||||
|
{"text": "i feel something i will say it rather than hold back in the fear that i might ruin some moment that seems happy to me often a fa ade that is only revealed much later", "label": "1"}
|
||||||
|
{"text": "i feel petrified about his future", "label": "4"}
|
||||||
|
{"text": "im sure anyone whos seen someone close go through this process you feel entirely useless in this situation not being able to take away any of the troubles or ailments", "label": "0"}
|
||||||
|
{"text": "i write when i am feeling happy and childish", "label": "1"}
|
||||||
|
{"text": "i am going to add some photos from today and again thank you all for your dear support when i was feeling overwhelmed at different moments", "label": "4"}
|
||||||
|
{"text": "im just really hurting and feeling a bit overwhelmed", "label": "4"}
|
||||||
|
{"text": "i feel useless and worthless", "label": "0"}
|
||||||
|
{"text": "i read premonition i had this rare feeling that i was caught by how dewi lestari plays with metaphors crazily in her charming words", "label": "1"}
|
||||||
|
{"text": "i ask him if he is feeling adventurous and wants to see that one since he already booked his friday and saturday nights and i already know he has church stuff on sundays", "label": "1"}
|
||||||
|
{"text": "i want to feel admired and loved", "label": "2"}
|
||||||
|
{"text": "i think its just a subconscious acknowledgement about my feelings towards eddie eg ignored", "label": "0"}
|
||||||
|
{"text": "i say i m feeling generous so have three winners lisa laurie and teresa", "label": "1"}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,481 @@
|
|||||||
|
import torch
|
||||||
|
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
||||||
|
from pathlib import Path
|
||||||
|
import json
|
||||||
|
import numpy as np
|
||||||
|
from typing import List, Dict, Union, Optional
|
||||||
|
from dataclasses import dataclass
|
||||||
|
import logging
|
||||||
|
import argparse
|
||||||
|
import sys
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class InferenceConfig:
|
||||||
|
"""Simple configuration for inference"""
|
||||||
|
model_path: str # Path to saved model
|
||||||
|
device: str = "auto" # "auto", "cuda", "cpu"
|
||||||
|
batch_size: int = 32
|
||||||
|
max_length: int = 512
|
||||||
|
return_probabilities: bool = True
|
||||||
|
return_top_k: int = 1 # Return top K predictions
|
||||||
|
|
||||||
|
|
||||||
|
class ModelInference:
|
||||||
|
"""Simple inference class for text classification"""
|
||||||
|
|
||||||
|
def __init__(self, config: InferenceConfig):
|
||||||
|
self.config = config
|
||||||
|
self.model = None
|
||||||
|
self.tokenizer = None
|
||||||
|
self.label_info = {}
|
||||||
|
self.device = self._setup_device()
|
||||||
|
|
||||||
|
# Load model and tokenizer
|
||||||
|
self.load_model()
|
||||||
|
|
||||||
|
def _setup_device(self) -> torch.device:
|
||||||
|
"""Setup device for inference"""
|
||||||
|
if self.config.device == "auto":
|
||||||
|
if torch.cuda.is_available():
|
||||||
|
device = torch.device("cuda")
|
||||||
|
logger.info("Using CUDA device")
|
||||||
|
else:
|
||||||
|
device = torch.device("cpu")
|
||||||
|
logger.info("Using CPU device")
|
||||||
|
else:
|
||||||
|
device = torch.device(self.config.device)
|
||||||
|
logger.info(f"Using specified device: {device}")
|
||||||
|
|
||||||
|
return device
|
||||||
|
|
||||||
|
def load_model(self):
|
||||||
|
"""Load model, tokenizer, and label mappings"""
|
||||||
|
model_path = Path(self.config.model_path)
|
||||||
|
|
||||||
|
if not model_path.exists():
|
||||||
|
raise FileNotFoundError(f"Model path not found: {model_path}")
|
||||||
|
|
||||||
|
# Load tokenizer
|
||||||
|
self.tokenizer = AutoTokenizer.from_pretrained(model_path)
|
||||||
|
logger.info(f"Loaded tokenizer from {model_path}")
|
||||||
|
|
||||||
|
# Load model
|
||||||
|
self.model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
||||||
|
self.model.to(self.device)
|
||||||
|
self.model.eval()
|
||||||
|
logger.info(f"Loaded model from {model_path}")
|
||||||
|
|
||||||
|
# Load label information
|
||||||
|
label_info_path = model_path / "label_info.json"
|
||||||
|
if label_info_path.exists():
|
||||||
|
with open(label_info_path, 'r') as f:
|
||||||
|
self.label_info = json.load(f)
|
||||||
|
logger.info(f"Loaded label mappings: {self.label_info.get('id_to_label', {})}")
|
||||||
|
else:
|
||||||
|
logger.warning("No label_info.json found. Using default numeric labels.")
|
||||||
|
# Create default mappings
|
||||||
|
num_labels = self.model.config.num_labels
|
||||||
|
self.label_info = {
|
||||||
|
"id_to_label": {str(i): f"LABEL_{i}" for i in range(num_labels)},
|
||||||
|
"label_to_id": {f"LABEL_{i}": i for i in range(num_labels)},
|
||||||
|
"num_labels": num_labels
|
||||||
|
}
|
||||||
|
|
||||||
|
def predict_single(self, text: str) -> Dict:
|
||||||
|
"""Predict single text sample"""
|
||||||
|
return self.predict_batch([text])[0]
|
||||||
|
|
||||||
|
def predict_batch(self, texts: List[str]) -> List[Dict]:
|
||||||
|
"""Predict batch of texts"""
|
||||||
|
if not texts:
|
||||||
|
return []
|
||||||
|
|
||||||
|
# Tokenize inputs
|
||||||
|
inputs = self.tokenizer(
|
||||||
|
texts,
|
||||||
|
truncation=True,
|
||||||
|
padding=True,
|
||||||
|
max_length=self.config.max_length,
|
||||||
|
return_tensors="pt"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Move to device
|
||||||
|
inputs = {k: v.to(self.device) for k, v in inputs.items()}
|
||||||
|
|
||||||
|
# Get predictions
|
||||||
|
with torch.no_grad():
|
||||||
|
outputs = self.model(**inputs)
|
||||||
|
logits = outputs.logits
|
||||||
|
|
||||||
|
# Convert to probabilities
|
||||||
|
probabilities = torch.softmax(logits, dim=-1)
|
||||||
|
|
||||||
|
# Process results
|
||||||
|
results = []
|
||||||
|
for i, text in enumerate(texts):
|
||||||
|
text_probs = probabilities[i].cpu().numpy()
|
||||||
|
|
||||||
|
# Get top K predictions
|
||||||
|
top_indices = np.argsort(text_probs)[-self.config.return_top_k:][::-1]
|
||||||
|
|
||||||
|
predictions = []
|
||||||
|
for idx in top_indices:
|
||||||
|
label = self.label_info["id_to_label"].get(str(idx), f"LABEL_{idx}")
|
||||||
|
prob = float(text_probs[idx])
|
||||||
|
|
||||||
|
pred_dict = {
|
||||||
|
"label": label,
|
||||||
|
"label_id": int(idx),
|
||||||
|
"score": prob
|
||||||
|
}
|
||||||
|
predictions.append(pred_dict)
|
||||||
|
|
||||||
|
result = {
|
||||||
|
"text": text,
|
||||||
|
"predictions": predictions,
|
||||||
|
"predicted_label": predictions[0]["label"],
|
||||||
|
"confidence": predictions[0]["score"]
|
||||||
|
}
|
||||||
|
|
||||||
|
if self.config.return_probabilities:
|
||||||
|
# Add all class probabilities
|
||||||
|
all_probs = {}
|
||||||
|
for label_id, label_name in self.label_info["id_to_label"].items():
|
||||||
|
all_probs[label_name] = float(text_probs[int(label_id)])
|
||||||
|
result["all_probabilities"] = all_probs
|
||||||
|
|
||||||
|
results.append(result)
|
||||||
|
|
||||||
|
return results
|
||||||
|
|
||||||
|
def predict_file(self, input_file: str, output_file: str = None) -> List[Dict]:
|
||||||
|
"""Predict on texts from file"""
|
||||||
|
input_path = Path(input_file)
|
||||||
|
|
||||||
|
# Read texts from file
|
||||||
|
texts = []
|
||||||
|
if input_path.suffix == '.txt':
|
||||||
|
# Plain text file (one text per line)
|
||||||
|
with open(input_path, 'r', encoding='utf-8') as f:
|
||||||
|
texts = [line.strip() for line in f if line.strip()]
|
||||||
|
|
||||||
|
elif input_path.suffix == '.jsonl':
|
||||||
|
# JSONL file with "text" field
|
||||||
|
with open(input_path, 'r', encoding='utf-8') as f:
|
||||||
|
for line in f:
|
||||||
|
if line.strip():
|
||||||
|
data = json.loads(line)
|
||||||
|
text = data.get("text", data.get("input", ""))
|
||||||
|
if text:
|
||||||
|
texts.append(text)
|
||||||
|
|
||||||
|
else:
|
||||||
|
raise ValueError(f"Unsupported file format: {input_path.suffix}")
|
||||||
|
|
||||||
|
logger.info(f"Loaded {len(texts)} texts from {input_file}")
|
||||||
|
|
||||||
|
# Process in batches
|
||||||
|
all_results = []
|
||||||
|
for i in range(0, len(texts), self.config.batch_size):
|
||||||
|
batch_texts = texts[i:i + self.config.batch_size]
|
||||||
|
batch_results = self.predict_batch(batch_texts)
|
||||||
|
all_results.extend(batch_results)
|
||||||
|
|
||||||
|
if i % (self.config.batch_size * 10) == 0:
|
||||||
|
logger.info(f"Processed {i + len(batch_texts)}/{len(texts)} texts")
|
||||||
|
|
||||||
|
# Save results if output file specified
|
||||||
|
if output_file:
|
||||||
|
output_path = Path(output_file)
|
||||||
|
output_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
with open(output_path, 'w', encoding='utf-8') as f:
|
||||||
|
for result in all_results:
|
||||||
|
f.write(json.dumps(result) + '\n')
|
||||||
|
|
||||||
|
logger.info(f"Results saved to {output_file}")
|
||||||
|
|
||||||
|
return all_results
|
||||||
|
|
||||||
|
|
||||||
|
class BatchInference:
|
||||||
|
"""Optimized batch inference for large datasets"""
|
||||||
|
|
||||||
|
def __init__(self, config: InferenceConfig):
|
||||||
|
self.inference = ModelInference(config)
|
||||||
|
self.config = config
|
||||||
|
|
||||||
|
def predict_large_file(self, input_file: str, output_file: str,
|
||||||
|
chunk_size: int = 1000) -> None:
|
||||||
|
"""Process large files in chunks to manage memory"""
|
||||||
|
input_path = Path(input_file)
|
||||||
|
output_path = Path(output_file)
|
||||||
|
output_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
# Count total lines first
|
||||||
|
total_lines = 0
|
||||||
|
with open(input_path, 'r', encoding='utf-8') as f:
|
||||||
|
for _ in f:
|
||||||
|
total_lines += 1
|
||||||
|
|
||||||
|
logger.info(f"Processing {total_lines} lines in chunks of {chunk_size}")
|
||||||
|
|
||||||
|
processed = 0
|
||||||
|
with open(input_path, 'r', encoding='utf-8') as infile, \
|
||||||
|
open(output_path, 'w', encoding='utf-8') as outfile:
|
||||||
|
|
||||||
|
chunk_texts = []
|
||||||
|
|
||||||
|
for line in infile:
|
||||||
|
if line.strip():
|
||||||
|
if input_path.suffix == '.jsonl':
|
||||||
|
data = json.loads(line)
|
||||||
|
text = data.get("text", data.get("input", ""))
|
||||||
|
else:
|
||||||
|
text = line.strip()
|
||||||
|
|
||||||
|
chunk_texts.append(text)
|
||||||
|
|
||||||
|
if len(chunk_texts) >= chunk_size:
|
||||||
|
# Process chunk
|
||||||
|
results = self.inference.predict_batch(chunk_texts)
|
||||||
|
|
||||||
|
# Write results
|
||||||
|
for result in results:
|
||||||
|
outfile.write(json.dumps(result) + '\n')
|
||||||
|
|
||||||
|
processed += len(chunk_texts)
|
||||||
|
logger.info(f"Processed {processed}/{total_lines} texts")
|
||||||
|
|
||||||
|
chunk_texts = []
|
||||||
|
|
||||||
|
# Process remaining texts
|
||||||
|
if chunk_texts:
|
||||||
|
results = self.inference.predict_batch(chunk_texts)
|
||||||
|
for result in results:
|
||||||
|
outfile.write(json.dumps(result) + '\n')
|
||||||
|
processed += len(chunk_texts)
|
||||||
|
|
||||||
|
logger.info(f"Completed processing {processed} texts")
|
||||||
|
|
||||||
|
|
||||||
|
def create_inference_config(
|
||||||
|
model_path: str,
|
||||||
|
device: str = "auto",
|
||||||
|
batch_size: int = 32,
|
||||||
|
**kwargs
|
||||||
|
) -> InferenceConfig:
|
||||||
|
"""Helper function to create inference configuration"""
|
||||||
|
return InferenceConfig(
|
||||||
|
model_path=model_path,
|
||||||
|
device=device,
|
||||||
|
batch_size=batch_size,
|
||||||
|
**kwargs
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main function with YAML configuration support"""
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description="Model Inference Pipeline")
|
||||||
|
|
||||||
|
# YAML configuration
|
||||||
|
parser.add_argument("--config", type=str, help="Path to YAML configuration file")
|
||||||
|
|
||||||
|
# Model settings
|
||||||
|
parser.add_argument("--model-path", type=str, help="Path to saved model directory")
|
||||||
|
parser.add_argument("--device", choices=["auto", "cuda", "cpu"], help="Device to run inference on")
|
||||||
|
parser.add_argument("--batch-size", type=int, help="Batch size for inference")
|
||||||
|
parser.add_argument("--max-length", type=int, help="Maximum sequence length for tokenization")
|
||||||
|
|
||||||
|
# Inference settings
|
||||||
|
parser.add_argument("--return-probabilities", action="store_true", help="Return all class probabilities")
|
||||||
|
parser.add_argument("--return-top-k", type=int, help="Return top K predictions")
|
||||||
|
|
||||||
|
# Input/Output settings
|
||||||
|
parser.add_argument("--input-text", type=str, help="Single text for prediction")
|
||||||
|
parser.add_argument("--input-file", type=str, help="Input file path (txt or jsonl)")
|
||||||
|
parser.add_argument("--output-file", type=str, help="Output file path for results")
|
||||||
|
parser.add_argument("--chunk-size", type=int, help="Chunk size for large file processing")
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
parser.add_argument("--log-level", choices=["DEBUG", "INFO", "WARNING", "ERROR"], default="INFO", help="Logging level")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# Set up logging
|
||||||
|
logging.basicConfig(
|
||||||
|
level=getattr(logging, args.log_level),
|
||||||
|
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Load configuration
|
||||||
|
config_dict = {}
|
||||||
|
|
||||||
|
# Load YAML config if provided
|
||||||
|
if args.config:
|
||||||
|
try:
|
||||||
|
with open(args.config, 'r', encoding='utf-8') as f:
|
||||||
|
config_dict = yaml.safe_load(f)
|
||||||
|
logger.info(f"Loaded YAML configuration from: {args.config}")
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Error loading YAML config: {e}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Override YAML config with CLI arguments
|
||||||
|
cli_overrides = {}
|
||||||
|
if args.model_path:
|
||||||
|
cli_overrides['model_path'] = args.model_path
|
||||||
|
if args.device:
|
||||||
|
cli_overrides['device'] = args.device
|
||||||
|
if args.batch_size:
|
||||||
|
cli_overrides['batch_size'] = args.batch_size
|
||||||
|
if args.max_length:
|
||||||
|
cli_overrides['max_length'] = args.max_length
|
||||||
|
if args.return_probabilities:
|
||||||
|
cli_overrides['return_probabilities'] = True
|
||||||
|
if args.return_top_k:
|
||||||
|
cli_overrides['return_top_k'] = args.return_top_k
|
||||||
|
|
||||||
|
# Merge configurations
|
||||||
|
for key, value in cli_overrides.items():
|
||||||
|
if key in config_dict:
|
||||||
|
logger.info(f"Overriding YAML config '{key}' with CLI value: {value}")
|
||||||
|
config_dict[key] = value
|
||||||
|
|
||||||
|
# Validate model path
|
||||||
|
model_path = config_dict.get('model_path')
|
||||||
|
if not model_path:
|
||||||
|
parser.error("--model-path is required (either in YAML config or CLI)")
|
||||||
|
|
||||||
|
model_path = Path(model_path)
|
||||||
|
if not model_path.exists():
|
||||||
|
print(f"❌ Model path not found: {model_path}")
|
||||||
|
print("Please ensure the model directory exists and contains the trained model files")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Create configuration object
|
||||||
|
config = InferenceConfig(
|
||||||
|
model_path=str(model_path),
|
||||||
|
device=config_dict.get('device', 'auto'),
|
||||||
|
batch_size=config_dict.get('batch_size', 32),
|
||||||
|
max_length=config_dict.get('max_length', 512),
|
||||||
|
return_probabilities=config_dict.get('return_probabilities', True),
|
||||||
|
return_top_k=config_dict.get('return_top_k', 1)
|
||||||
|
)
|
||||||
|
|
||||||
|
try:
|
||||||
|
print(f"Loading model from: {config.model_path}")
|
||||||
|
print(f"Device: {config.device}")
|
||||||
|
print(f"Batch size: {config.batch_size}")
|
||||||
|
if args.config:
|
||||||
|
print(f"Using YAML configuration: {args.config}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
# Initialize inference
|
||||||
|
inference = ModelInference(config)
|
||||||
|
|
||||||
|
# Handle different input types
|
||||||
|
if args.input_text:
|
||||||
|
# Single text prediction
|
||||||
|
print(f"=== Single Text Prediction ===")
|
||||||
|
print(f"Input text: {args.input_text}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
result = inference.predict_single(args.input_text)
|
||||||
|
print(f"Predicted label: {result['predicted_label']}")
|
||||||
|
print(f"Confidence: {result['confidence']:.4f}")
|
||||||
|
print(f"Top {config.return_top_k} predictions:")
|
||||||
|
for pred in result['predictions']:
|
||||||
|
print(f" - {pred['label']}: {pred['score']:.4f}")
|
||||||
|
|
||||||
|
if config.return_probabilities and 'all_probabilities' in result:
|
||||||
|
print(f"\nAll class probabilities:")
|
||||||
|
for label, prob in result['all_probabilities'].items():
|
||||||
|
print(f" - {label}: {prob:.4f}")
|
||||||
|
|
||||||
|
elif args.input_file:
|
||||||
|
# File prediction
|
||||||
|
input_path = Path(args.input_file)
|
||||||
|
if not input_path.exists():
|
||||||
|
print(f"❌ Input file not found: {input_path}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
print(f"=== File Prediction ===")
|
||||||
|
print(f"Input file: {args.input_file}")
|
||||||
|
print(f"Output file: {args.output_file}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
if args.output_file:
|
||||||
|
# Use batch inference for large files
|
||||||
|
if input_path.stat().st_size > 10 * 1024 * 1024: # > 10MB
|
||||||
|
print("Large file detected, using chunked processing...")
|
||||||
|
batch_inference = BatchInference(config)
|
||||||
|
chunk_size = args.chunk_size or 1000
|
||||||
|
batch_inference.predict_large_file(
|
||||||
|
args.input_file,
|
||||||
|
args.output_file,
|
||||||
|
chunk_size=chunk_size
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
# Regular file processing
|
||||||
|
results = inference.predict_file(args.input_file, args.output_file)
|
||||||
|
print(f"Processed {len(results)} texts")
|
||||||
|
else:
|
||||||
|
# Just predict without saving
|
||||||
|
results = inference.predict_file(args.input_file)
|
||||||
|
print(f"Processed {len(results)} texts")
|
||||||
|
print("\nSample results:")
|
||||||
|
for i, result in enumerate(results[:3]): # Show first 3
|
||||||
|
print(f" {i+1}. '{result['text'][:50]}...' -> {result['predicted_label']} ({result['confidence']:.4f})")
|
||||||
|
|
||||||
|
else:
|
||||||
|
# Interactive mode - example predictions
|
||||||
|
print("=== Interactive Mode ===")
|
||||||
|
print("No input specified. Running example predictions...")
|
||||||
|
print()
|
||||||
|
|
||||||
|
# Example texts
|
||||||
|
example_texts = [
|
||||||
|
"I love this product! It's amazing.",
|
||||||
|
"This is terrible, I hate it.",
|
||||||
|
"The weather is okay today.",
|
||||||
|
"Best purchase ever made!"
|
||||||
|
]
|
||||||
|
|
||||||
|
print("Example predictions:")
|
||||||
|
for text in example_texts:
|
||||||
|
result = inference.predict_single(text)
|
||||||
|
print(f" '{text}' -> {result['predicted_label']} ({result['confidence']:.4f})")
|
||||||
|
|
||||||
|
print(f"\n✅ Inference completed successfully!")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Inference failed: {e}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
"""
|
||||||
|
# Quick usage examples:
|
||||||
|
|
||||||
|
# 1. Single prediction
|
||||||
|
config = InferenceConfig(model_path="./results/my_model")
|
||||||
|
inference = ModelInference(config)
|
||||||
|
result = inference.predict_single("Your text here")
|
||||||
|
|
||||||
|
# # 2. Batch prediction
|
||||||
|
# results = inference.predict_batch(["text1", "text2", "text3"])
|
||||||
|
|
||||||
|
# # 3. File prediction
|
||||||
|
# inference.predict_file("input.txt", "predictions.jsonl")
|
||||||
|
|
||||||
|
# # 4. Large file processing
|
||||||
|
# batch_inference = BatchInference(config)
|
||||||
|
# batch_inference.predict_large_file("large_input.jsonl", "large_output.jsonl", chunk_size=1000)
|
||||||
|
"""
|
||||||
@@ -0,0 +1,467 @@
|
|||||||
|
import torch
|
||||||
|
from torch.optim import AdamW
|
||||||
|
from torch.utils.data import DataLoader
|
||||||
|
from transformers import (
|
||||||
|
AutoTokenizer,
|
||||||
|
AutoModelForSequenceClassification,
|
||||||
|
DataCollatorWithPadding,
|
||||||
|
get_scheduler
|
||||||
|
)
|
||||||
|
from accelerate import Accelerator
|
||||||
|
from datasets import Dataset
|
||||||
|
from tqdm.auto import tqdm
|
||||||
|
import evaluate
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
import logging
|
||||||
|
import argparse
|
||||||
|
import sys
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class SimpleConfig:
|
||||||
|
"""Simple configuration for accelerate training"""
|
||||||
|
# Model settings
|
||||||
|
model_name: str = "bert-base-uncased"
|
||||||
|
max_length: int = 512
|
||||||
|
|
||||||
|
# Training settings
|
||||||
|
num_epochs: int = 3
|
||||||
|
batch_size: int = 16
|
||||||
|
learning_rate: float = 2e-5
|
||||||
|
weight_decay: float = 0.01
|
||||||
|
|
||||||
|
# Scheduler settings
|
||||||
|
lr_scheduler_type: str = "linear"
|
||||||
|
warmup_ratio: float = 0.1
|
||||||
|
|
||||||
|
# Paths
|
||||||
|
data_dir: str = "./data/classification"
|
||||||
|
output_dir: str = "./results"
|
||||||
|
|
||||||
|
|
||||||
|
class AccelerateTrainer:
|
||||||
|
"""Simple trainer using Accelerate for distributed training"""
|
||||||
|
|
||||||
|
def __init__(self, config: SimpleConfig):
|
||||||
|
self.config = config
|
||||||
|
|
||||||
|
# Initialize accelerator
|
||||||
|
self.accelerator = Accelerator()
|
||||||
|
|
||||||
|
# Setup logging only on main process
|
||||||
|
if self.accelerator.is_main_process:
|
||||||
|
logging.basicConfig(
|
||||||
|
format='%(asctime)s - %(levelname)s - %(message)s',
|
||||||
|
level=logging.INFO
|
||||||
|
)
|
||||||
|
|
||||||
|
self.tokenizer = None
|
||||||
|
self.model = None
|
||||||
|
self.label_to_id = {}
|
||||||
|
self.id_to_label = {}
|
||||||
|
self.num_labels = 0
|
||||||
|
|
||||||
|
def load_data(self) -> Dict[str, List[Dict]]:
|
||||||
|
"""Load data from JSONL files"""
|
||||||
|
data_path = Path(self.config.data_dir)
|
||||||
|
splits = {}
|
||||||
|
|
||||||
|
for split_name in ["train", "validation", "test"]:
|
||||||
|
split_file = data_path / f"{split_name}.jsonl"
|
||||||
|
if split_file.exists():
|
||||||
|
split_data = []
|
||||||
|
with open(split_file, 'r', encoding='utf-8') as f:
|
||||||
|
for line in f:
|
||||||
|
if line.strip():
|
||||||
|
split_data.append(json.loads(line))
|
||||||
|
splits[split_name] = split_data
|
||||||
|
|
||||||
|
if self.accelerator.is_main_process:
|
||||||
|
logger.info(f"Loaded {len(split_data)} samples from {split_name}")
|
||||||
|
|
||||||
|
return splits
|
||||||
|
|
||||||
|
def setup_labels(self, train_data: List[Dict]):
|
||||||
|
"""Setup label mappings"""
|
||||||
|
labels = set()
|
||||||
|
for item in train_data:
|
||||||
|
labels.add(str(item["label"]))
|
||||||
|
|
||||||
|
sorted_labels = sorted(list(labels))
|
||||||
|
self.label_to_id = {label: idx for idx, label in enumerate(sorted_labels)}
|
||||||
|
self.id_to_label = {idx: label for label, idx in self.label_to_id.items()}
|
||||||
|
self.num_labels = len(sorted_labels)
|
||||||
|
|
||||||
|
if self.accelerator.is_main_process:
|
||||||
|
logger.info(f"Found {self.num_labels} labels: {sorted_labels}")
|
||||||
|
|
||||||
|
def create_dataset(self, data: List[Dict]) -> Dataset:
|
||||||
|
"""Create tokenized dataset"""
|
||||||
|
texts = []
|
||||||
|
labels = []
|
||||||
|
|
||||||
|
for item in data:
|
||||||
|
text = item["text"] if "text" in item else item["input"]
|
||||||
|
label = item["label"]
|
||||||
|
|
||||||
|
texts.append(str(text))
|
||||||
|
# Convert label to ID
|
||||||
|
if isinstance(label, str):
|
||||||
|
label_id = self.label_to_id.get(label, 0)
|
||||||
|
else:
|
||||||
|
label_id = int(label)
|
||||||
|
labels.append(label_id)
|
||||||
|
|
||||||
|
# Create dataset
|
||||||
|
dataset = Dataset.from_dict({
|
||||||
|
"text": texts,
|
||||||
|
"labels": labels
|
||||||
|
})
|
||||||
|
|
||||||
|
# Tokenize
|
||||||
|
def tokenize_function(examples):
|
||||||
|
return self.tokenizer(
|
||||||
|
examples["text"],
|
||||||
|
truncation=True,
|
||||||
|
padding="max_length",
|
||||||
|
max_length=self.config.max_length
|
||||||
|
)
|
||||||
|
|
||||||
|
tokenized_dataset = dataset.map(
|
||||||
|
tokenize_function,
|
||||||
|
batched=True,
|
||||||
|
remove_columns=["text"]
|
||||||
|
)
|
||||||
|
|
||||||
|
return tokenized_dataset
|
||||||
|
|
||||||
|
def compute_metrics(self, predictions, labels):
|
||||||
|
"""Compute accuracy and F1"""
|
||||||
|
predictions = predictions.argmax(axis=-1)
|
||||||
|
|
||||||
|
# Gather predictions from all processes
|
||||||
|
all_predictions = self.accelerator.gather_for_metrics(predictions)
|
||||||
|
all_labels = self.accelerator.gather_for_metrics(labels)
|
||||||
|
|
||||||
|
if self.accelerator.is_main_process:
|
||||||
|
# Only compute metrics on main process
|
||||||
|
metric = evaluate.load("glue", "mrpc") # Using MRPC as example
|
||||||
|
results = metric.compute(
|
||||||
|
predictions=all_predictions.cpu().numpy(),
|
||||||
|
references=all_labels.cpu().numpy()
|
||||||
|
)
|
||||||
|
return results
|
||||||
|
return {}
|
||||||
|
|
||||||
|
def train(self):
|
||||||
|
"""Main training function"""
|
||||||
|
if self.accelerator.is_main_process:
|
||||||
|
logger.info("=== Starting Accelerate Training ===")
|
||||||
|
|
||||||
|
# Load data
|
||||||
|
splits_data = self.load_data()
|
||||||
|
if "train" not in splits_data:
|
||||||
|
raise ValueError("No training data found!")
|
||||||
|
|
||||||
|
# Setup labels
|
||||||
|
self.setup_labels(splits_data["train"])
|
||||||
|
|
||||||
|
# Initialize tokenizer and model
|
||||||
|
self.tokenizer = AutoTokenizer.from_pretrained(self.config.model_name)
|
||||||
|
if self.tokenizer.pad_token is None:
|
||||||
|
self.tokenizer.pad_token = self.tokenizer.eos_token
|
||||||
|
|
||||||
|
self.model = AutoModelForSequenceClassification.from_pretrained(
|
||||||
|
self.config.model_name,
|
||||||
|
num_labels=self.num_labels,
|
||||||
|
id2label=self.id_to_label,
|
||||||
|
label2id=self.label_to_id
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create datasets
|
||||||
|
train_dataset = self.create_dataset(splits_data["train"])
|
||||||
|
eval_dataset = None
|
||||||
|
if "validation" in splits_data:
|
||||||
|
eval_dataset = self.create_dataset(splits_data["validation"])
|
||||||
|
|
||||||
|
# Create data loaders
|
||||||
|
data_collator = DataCollatorWithPadding(tokenizer=self.tokenizer)
|
||||||
|
|
||||||
|
train_dataloader = DataLoader(
|
||||||
|
train_dataset,
|
||||||
|
shuffle=True,
|
||||||
|
batch_size=self.config.batch_size,
|
||||||
|
collate_fn=data_collator
|
||||||
|
)
|
||||||
|
|
||||||
|
eval_dataloader = None
|
||||||
|
if eval_dataset:
|
||||||
|
eval_dataloader = DataLoader(
|
||||||
|
eval_dataset,
|
||||||
|
batch_size=self.config.batch_size,
|
||||||
|
collate_fn=data_collator
|
||||||
|
)
|
||||||
|
|
||||||
|
# Setup optimizer and scheduler
|
||||||
|
optimizer = AdamW(
|
||||||
|
self.model.parameters(),
|
||||||
|
lr=self.config.learning_rate,
|
||||||
|
weight_decay=self.config.weight_decay
|
||||||
|
)
|
||||||
|
|
||||||
|
num_training_steps = self.config.num_epochs * len(train_dataloader)
|
||||||
|
num_warmup_steps = int(num_training_steps * self.config.warmup_ratio)
|
||||||
|
|
||||||
|
lr_scheduler = get_scheduler(
|
||||||
|
self.config.lr_scheduler_type,
|
||||||
|
optimizer=optimizer,
|
||||||
|
num_warmup_steps=num_warmup_steps,
|
||||||
|
num_training_steps=num_training_steps
|
||||||
|
)
|
||||||
|
|
||||||
|
# Prepare everything with accelerator
|
||||||
|
self.model, optimizer, train_dataloader, lr_scheduler = self.accelerator.prepare(
|
||||||
|
self.model, optimizer, train_dataloader, lr_scheduler
|
||||||
|
)
|
||||||
|
|
||||||
|
if eval_dataloader:
|
||||||
|
eval_dataloader = self.accelerator.prepare(eval_dataloader)
|
||||||
|
|
||||||
|
# Training loop
|
||||||
|
if self.accelerator.is_main_process:
|
||||||
|
progress_bar = tqdm(range(num_training_steps))
|
||||||
|
logger.info(f"Training steps: {num_training_steps}")
|
||||||
|
|
||||||
|
self.model.train()
|
||||||
|
|
||||||
|
for epoch in range(self.config.num_epochs):
|
||||||
|
if self.accelerator.is_main_process:
|
||||||
|
logger.info(f"Epoch {epoch + 1}/{self.config.num_epochs}")
|
||||||
|
|
||||||
|
for step, batch in enumerate(train_dataloader):
|
||||||
|
outputs = self.model(**batch)
|
||||||
|
loss = outputs.loss
|
||||||
|
|
||||||
|
# Backward pass
|
||||||
|
self.accelerator.backward(loss)
|
||||||
|
|
||||||
|
optimizer.step()
|
||||||
|
lr_scheduler.step()
|
||||||
|
optimizer.zero_grad()
|
||||||
|
|
||||||
|
if self.accelerator.is_main_process:
|
||||||
|
progress_bar.update(1)
|
||||||
|
|
||||||
|
# Log every 100 steps
|
||||||
|
if step % 100 == 0:
|
||||||
|
logger.info(f"Step {step}, Loss: {loss.item():.4f}")
|
||||||
|
|
||||||
|
# Evaluation at end of each epoch
|
||||||
|
if eval_dataloader:
|
||||||
|
self.evaluate(eval_dataloader, epoch)
|
||||||
|
|
||||||
|
# Save model
|
||||||
|
self.save_model()
|
||||||
|
|
||||||
|
if self.accelerator.is_main_process:
|
||||||
|
logger.info("=== Training Completed ===")
|
||||||
|
|
||||||
|
def evaluate(self, eval_dataloader, epoch):
|
||||||
|
"""Evaluation function"""
|
||||||
|
self.model.eval()
|
||||||
|
|
||||||
|
all_predictions = []
|
||||||
|
all_labels = []
|
||||||
|
|
||||||
|
for batch in eval_dataloader:
|
||||||
|
with torch.no_grad():
|
||||||
|
outputs = self.model(**batch)
|
||||||
|
|
||||||
|
predictions = outputs.logits
|
||||||
|
labels = batch["labels"]
|
||||||
|
|
||||||
|
# Gather from all processes
|
||||||
|
predictions = self.accelerator.gather_for_metrics(predictions)
|
||||||
|
labels = self.accelerator.gather_for_metrics(labels)
|
||||||
|
|
||||||
|
all_predictions.append(predictions.cpu())
|
||||||
|
all_labels.append(labels.cpu())
|
||||||
|
|
||||||
|
if self.accelerator.is_main_process and all_predictions:
|
||||||
|
all_predictions = torch.cat(all_predictions)
|
||||||
|
all_labels = torch.cat(all_labels)
|
||||||
|
|
||||||
|
predictions_np = all_predictions.argmax(dim=-1).numpy()
|
||||||
|
labels_np = all_labels.numpy()
|
||||||
|
|
||||||
|
# Simple accuracy calculation
|
||||||
|
accuracy = (predictions_np == labels_np).mean()
|
||||||
|
logger.info(f"Epoch {epoch + 1} - Validation Accuracy: {accuracy:.4f}")
|
||||||
|
|
||||||
|
self.model.train()
|
||||||
|
|
||||||
|
def save_model(self):
|
||||||
|
"""Save model and tokenizer"""
|
||||||
|
if self.accelerator.is_main_process:
|
||||||
|
output_path = Path(self.config.output_dir)
|
||||||
|
output_path.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
# Save model using accelerator
|
||||||
|
unwrapped_model = self.accelerator.unwrap_model(self.model)
|
||||||
|
unwrapped_model.save_pretrained(output_path)
|
||||||
|
self.tokenizer.save_pretrained(output_path)
|
||||||
|
|
||||||
|
# Save label info
|
||||||
|
label_info = {
|
||||||
|
"label_to_id": self.label_to_id,
|
||||||
|
"id_to_label": self.id_to_label,
|
||||||
|
"num_labels": self.num_labels
|
||||||
|
}
|
||||||
|
|
||||||
|
with open(output_path / "label_info.json", 'w') as f:
|
||||||
|
json.dump(label_info, f, indent=2)
|
||||||
|
|
||||||
|
logger.info(f"Model saved to {output_path}")
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main function with YAML configuration support"""
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description="Accelerate Training Pipeline")
|
||||||
|
|
||||||
|
# YAML configuration
|
||||||
|
parser.add_argument("--config", type=str, help="Path to YAML configuration file")
|
||||||
|
|
||||||
|
# Model settings
|
||||||
|
parser.add_argument("--model-name", type=str, help="Model name from HuggingFace Hub")
|
||||||
|
parser.add_argument("--max-length", type=int, help="Maximum sequence length for tokenization")
|
||||||
|
|
||||||
|
# Training settings
|
||||||
|
parser.add_argument("--num-epochs", type=int, help="Number of training epochs")
|
||||||
|
parser.add_argument("--batch-size", type=int, help="Training batch size")
|
||||||
|
parser.add_argument("--learning-rate", type=float, help="Learning rate")
|
||||||
|
parser.add_argument("--weight-decay", type=float, help="Weight decay for optimizer")
|
||||||
|
|
||||||
|
# Scheduler settings
|
||||||
|
parser.add_argument("--lr-scheduler-type", choices=["linear", "cosine", "polynomial"], help="Learning rate scheduler type")
|
||||||
|
parser.add_argument("--warmup-ratio", type=float, help="Warmup ratio for scheduler")
|
||||||
|
|
||||||
|
# Paths
|
||||||
|
parser.add_argument("--data-dir", type=str, help="Directory containing train/validation/test JSONL files")
|
||||||
|
parser.add_argument("--output-dir", type=str, help="Output directory for saved model")
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
parser.add_argument("--log-level", choices=["DEBUG", "INFO", "WARNING", "ERROR"], default="INFO", help="Logging level")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# Set up logging
|
||||||
|
logging.basicConfig(
|
||||||
|
level=getattr(logging, args.log_level),
|
||||||
|
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Load configuration
|
||||||
|
config_dict = {}
|
||||||
|
|
||||||
|
# Load YAML config if provided
|
||||||
|
if args.config:
|
||||||
|
try:
|
||||||
|
with open(args.config, 'r', encoding='utf-8') as f:
|
||||||
|
config_dict = yaml.safe_load(f)
|
||||||
|
logger.info(f"Loaded YAML configuration from: {args.config}")
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Error loading YAML config: {e}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Override YAML config with CLI arguments
|
||||||
|
cli_overrides = {}
|
||||||
|
if args.model_name:
|
||||||
|
cli_overrides['model_name'] = args.model_name
|
||||||
|
if args.max_length:
|
||||||
|
cli_overrides['max_length'] = args.max_length
|
||||||
|
if args.num_epochs:
|
||||||
|
cli_overrides['num_epochs'] = args.num_epochs
|
||||||
|
if args.batch_size:
|
||||||
|
cli_overrides['batch_size'] = args.batch_size
|
||||||
|
if args.learning_rate:
|
||||||
|
cli_overrides['learning_rate'] = args.learning_rate
|
||||||
|
if args.weight_decay:
|
||||||
|
cli_overrides['weight_decay'] = args.weight_decay
|
||||||
|
if args.lr_scheduler_type:
|
||||||
|
cli_overrides['lr_scheduler_type'] = args.lr_scheduler_type
|
||||||
|
if args.warmup_ratio:
|
||||||
|
cli_overrides['warmup_ratio'] = args.warmup_ratio
|
||||||
|
if args.data_dir:
|
||||||
|
cli_overrides['data_dir'] = args.data_dir
|
||||||
|
if args.output_dir:
|
||||||
|
cli_overrides['output_dir'] = args.output_dir
|
||||||
|
|
||||||
|
# Merge configurations
|
||||||
|
for key, value in cli_overrides.items():
|
||||||
|
if key in config_dict:
|
||||||
|
logger.info(f"Overriding YAML config '{key}' with CLI value: {value}")
|
||||||
|
config_dict[key] = value
|
||||||
|
|
||||||
|
# Create configuration object
|
||||||
|
config = SimpleConfig(
|
||||||
|
model_name=config_dict.get('model_name', 'bert-base-uncased'),
|
||||||
|
max_length=config_dict.get('max_length', 512),
|
||||||
|
num_epochs=config_dict.get('num_epochs', 3),
|
||||||
|
batch_size=config_dict.get('batch_size', 16),
|
||||||
|
learning_rate=config_dict.get('learning_rate', 2e-5),
|
||||||
|
weight_decay=config_dict.get('weight_decay', 0.01),
|
||||||
|
lr_scheduler_type=config_dict.get('lr_scheduler_type', 'linear'),
|
||||||
|
warmup_ratio=config_dict.get('warmup_ratio', 0.1),
|
||||||
|
data_dir=config_dict.get('data_dir', './data/classification'),
|
||||||
|
output_dir=config_dict.get('output_dir', './results')
|
||||||
|
)
|
||||||
|
|
||||||
|
# Validate data directory
|
||||||
|
data_path = Path(config.data_dir)
|
||||||
|
if not data_path.exists():
|
||||||
|
print(f"❌ Data directory not found: {data_path}")
|
||||||
|
print("Please ensure the data directory exists and contains train.jsonl, validation.jsonl, and test.jsonl files")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Check for required data files
|
||||||
|
required_files = ["train.jsonl"]
|
||||||
|
missing_files = []
|
||||||
|
for file_name in required_files:
|
||||||
|
if not (data_path / file_name).exists():
|
||||||
|
missing_files.append(file_name)
|
||||||
|
|
||||||
|
if missing_files:
|
||||||
|
print(f"❌ Missing required data files: {missing_files}")
|
||||||
|
print(f"Please ensure these files exist in: {data_path}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Initialize and run training
|
||||||
|
try:
|
||||||
|
print(f"Starting training with model: {config.model_name}")
|
||||||
|
print(f"Data directory: {config.data_dir}")
|
||||||
|
print(f"Output directory: {config.output_dir}")
|
||||||
|
print(f"Training for {config.num_epochs} epochs with batch size {config.batch_size}")
|
||||||
|
if args.config:
|
||||||
|
print(f"Using YAML configuration: {args.config}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
trainer = AccelerateTrainer(config)
|
||||||
|
trainer.train()
|
||||||
|
|
||||||
|
print(f"✅ Training completed successfully!")
|
||||||
|
print(f"Model saved to: {config.output_dir}")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Error during training: {e}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
torch>=2.0.0
|
||||||
|
transformers>=4.30.0
|
||||||
|
accelerate>=0.20.0
|
||||||
|
datasets>=2.12.0
|
||||||
|
evaluate>=0.4.0
|
||||||
|
tqdm>=4.65.0
|
||||||
|
pandas>=1.5.0
|
||||||
|
numpy>=1.24.0
|
||||||
|
scikit-learn>=1.3.0
|
||||||
|
pyyaml>=6.0
|
||||||
|
huggingface-hub>=0.15.0
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
{"text": "i know i shouldn t compare the relationships but i feel we are so disadvantaged and kept kiddy", "label": "0"}
|
||||||
|
{"text": "i am feeling extremely contented with our decision to home educate", "label": "1"}
|
||||||
|
{"text": "im not going to lie some days i feel uber supportive and other days i feel uber frustrated", "label": "2"}
|
||||||
|
{"text": "i feel honoured to become a journalist on his blog dedicated to this amazing song contest which is eurovision", "label": "1"}
|
||||||
|
{"text": "i feel like i m on an emotional high with so much excitment", "label": "0"}
|
||||||
|
{"text": "i feel tender cool and relax after enjoying these wonderful masters", "label": "2"}
|
||||||
|
{"text": "i am being told i should feel satisfied because i am in good standing with the powers that be", "label": "1"}
|
||||||
|
{"text": "i just take what i feel like would taste delicious and start off", "label": "1"}
|
||||||
|
{"text": "i am sure you will feel very unhappy about it too", "label": "0"}
|
||||||
|
{"text": "i do however feel that some people would not be so shocked right", "label": "5"}
|
||||||
|
{"text": "i think they feel somehow offended because the christians played a big part in destroying the earlier cultures religions and mythologies", "label": "3"}
|
||||||
|
{"text": "i feel like i should make one of these for every beach loving friend i know", "label": "2"}
|
||||||
|
{"text": "i have to admit i have been feeling very disheartened and disillusioned with the whole publishing community for months", "label": "0"}
|
||||||
|
{"text": "im feeling stressed or having a bad day i take a walk or run", "label": "3"}
|
||||||
|
{"text": "i started the dew beyond having a positive showing of the south to encourage writers from all experiences and levels of advancement to feel comfortable sharing their work", "label": "1"}
|
||||||
|
{"text": "i feel as though my capacity to love others to show love to be loved and share it has grown dramatically", "label": "2"}
|
||||||
|
{"text": "i have a strange feeling that this is going to turn out quite ok and soon enough the ladies pictured above will probably be begging me to brew more of this stuff", "label": "1"}
|
||||||
|
{"text": "i think just noticing this in me that i m more prone to feel jealous right now is helping me show up with a bit more intentionality than at other times in my life", "label": "3"}
|
||||||
|
{"text": "i ended up feeling really proud of the final product", "label": "1"}
|
||||||
|
{"text": "i dont want to put to much pressure on myself but i feel like i could make the most amazing year ever", "label": "5"}
|
||||||
|
{"text": "i feel that thursday was the important first step that is needed towards helping e get better with her eating", "label": "1"}
|
||||||
|
{"text": "i hate to have to clear my voice i hate to stammer i hate to feel the way i do now humiliated and frightened to the bones what do you want of me", "label": "0"}
|
||||||
|
{"text": "im simply feeling just a little unhappy about the whole skinnyg and even the charming customer provider hasnt made that go away", "label": "0"}
|
||||||
|
{"text": "ive also discovered that because i feel less agitated by caffeine and cravings this coping method is unnecessary huge", "label": "4"}
|
||||||
|
{"text": "i feel confident that my issue is being regarded with the highest sense of urgency", "label": "1"}
|
||||||
|
{"text": "i feel we need a little romantic boost in the relationship", "label": "2"}
|
||||||
|
{"text": "ive been quite confident in what i believe for my whole life this occasionally over whelming feeling of uncertainty has truly shaken me to my core", "label": "4"}
|
||||||
|
{"text": "im feeling font friendly", "label": "1"}
|
||||||
|
{"text": "im feeling punished for having loved the previous books", "label": "0"}
|
||||||
|
{"text": "i say to someone that i feel i have humiliated yeah well thats what you get", "label": "0"}
|
||||||
|
{"text": "i try to find something that does not make me feel foolish", "label": "0"}
|
||||||
|
{"text": "i should just let him calm down on his own but then ill feel like a neglectful aunt and i so cant have that", "label": "0"}
|
||||||
|
{"text": "i must ask if my column makes you feel so hateful why do you keep logging on", "label": "3"}
|
||||||
|
{"text": "i don t feel any safe", "label": "1"}
|
||||||
|
{"text": "im sure ive got it right and my state of unencumberedness despite many years of feeling like i couldnt keep up anybody else is causing me to see my life as charmed", "label": "1"}
|
||||||
|
{"text": "i can t tell you fortunate i feel to have access to so many wonderfully talented photographers like yourself", "label": "1"}
|
||||||
|
{"text": "i feel as though ive reached a point in my career where im highly respected there", "label": "1"}
|
||||||
|
{"text": "im not feeling so well right now so ill write some other day", "label": "1"}
|
||||||
|
{"text": "i was feeling rejected and sad", "label": "0"}
|
||||||
|
{"text": "i was feeling anything but adventurous and stuck with comfort zone and ordered mcdonalds", "label": "1"}
|
||||||
|
{"text": "ill admit i feel slightly disillusioned here", "label": "0"}
|
||||||
|
{"text": "i was feeling ok it would be fun to drive over to dunstable and stand in a field for an hour or so watching people try and drive preposterous motors up grass slopes thats trialling", "label": "1"}
|
||||||
|
{"text": "im feeling so disillusioned with it all right now", "label": "0"}
|
||||||
|
{"text": "i have experimented lots of the experiences she mentions and sadly this made me realize that most women feel that their career paths are somehow going to be determined by their partners if they support them or not their children ther co workers etc", "label": "1"}
|
||||||
|
{"text": "i sit here feeling blank about this", "label": "0"}
|
||||||
|
{"text": "i havent been measuring out food drinking nearly enough water tracking any fitness and overall i feel completely shaken and unfocused because i dont feel like my foundation is steady at the moment", "label": "4"}
|
||||||
|
{"text": "im feeling a little bit apprehensive about entering a new chapter again and having to prove myself all over again", "label": "4"}
|
||||||
|
{"text": "i just feel like being sarcastic and mean and all because history paper is overrrrrrrrrrrr", "label": "3"}
|
||||||
|
{"text": "im feeling pretty paranoid and trying to cover the cash and protect my belongings it definitely felt like i was doing something i shouldnt be doing like money laundering or something", "label": "4"}
|
||||||
|
{"text": "i feel like i am noticeably very inhibited in a lot of other things", "label": "0"}
|
||||||
|
{"text": "i finally get it right i feel happily smug and relieved that a piece of work is done", "label": "1"}
|
||||||
|
{"text": "i went to bed one night with my stomach in knots and woke up the next day feeling fantastic", "label": "1"}
|
||||||
|
{"text": "i ran upon it while looking for a cute saying to add to address change cards planning ahead and feeling positive", "label": "1"}
|
||||||
|
{"text": "i feel amused and kind of tired still in the morning i", "label": "1"}
|
||||||
|
{"text": "i feel violent or something today", "label": "3"}
|
||||||
|
{"text": "i don t know why that surprises me because whenever i get exercise whether it s working out in my garden or going to the gym i feel terrific afterward which is naturally the reason i don t do it all the time", "label": "1"}
|
||||||
|
{"text": "i am currently feeling very aggravated", "label": "3"}
|
||||||
|
{"text": "i asked if anyone has ever confessed their feelings for someone and got accepted rejected", "label": "1"}
|
||||||
|
{"text": "i will feel somehow punished so she holds me as much as possible when she puts the baby down", "label": "0"}
|
||||||
|
{"text": "i have to admit that while the story itself was interesting in their portrayal of the well known biblical story i came away feeling a little disappointed with the end result especially considering the names involved", "label": "0"}
|
||||||
|
{"text": "ive been feeling homesick for several months probably since christmas", "label": "0"}
|
||||||
|
{"text": "i woke up feeling incredibly content amp optimistic today however i woke up with a terrible cold and a complete lack of energy", "label": "1"}
|
||||||
|
{"text": "i reach for your hand feel its warmth sense a strange mysterious connection the greater sea of lives intimately shared and buoyed by a wave of love hope and joy surrender to its greater transcendent surge letting it take me wherever it will", "label": "4"}
|
||||||
|
{"text": "i miss it when i feel no one person who ignored me", "label": "0"}
|
||||||
|
{"text": "i don t want to bury the hatchet with even though it would be in my best interest simply because i feel that apologizing to a person that insulted me would make me feel like a punk", "label": "3"}
|
||||||
|
{"text": "i am known for letting things go when im not feeling good", "label": "1"}
|
||||||
|
{"text": "i think im just feeling sentimental right now p aaaaand tis another work day tomorrow", "label": "0"}
|
||||||
|
{"text": "i could feel my moms presence and my friends and family were supporting me that day", "label": "2"}
|
||||||
|
{"text": "i wake up feeling all beaten up and i dont feel that way right now im probably going to be tempted to do the lake again", "label": "0"}
|
||||||
|
{"text": "i feel disturbed today", "label": "0"}
|
||||||
|
{"text": "i feel rejected like i dont belong to the circle those circles that i realised i never was comfortable there", "label": "0"}
|
||||||
|
{"text": "i had this feeling that i would be welcomed by the art scene here", "label": "1"}
|
||||||
|
{"text": "i feel more happy inside on a scale i would say a", "label": "1"}
|
||||||
|
{"text": "i feel so cranky irrationally", "label": "3"}
|
||||||
|
{"text": "i feel miserable after my break up self", "label": "0"}
|
||||||
|
{"text": "i already feel impatient and cancel hyundai tucson last year waiting almost for seven months", "label": "3"}
|
||||||
|
{"text": "i feel so doomed all the time", "label": "0"}
|
||||||
|
{"text": "i feel completely groggy this morning", "label": "0"}
|
||||||
|
{"text": "i feel but distressed is sufficient", "label": "4"}
|
||||||
|
{"text": "i am feeling delicate after hogmanay if that s what you are thinking", "label": "2"}
|
||||||
|
{"text": "i feel like reading anansi boys again its gorgeous", "label": "1"}
|
||||||
|
{"text": "im lying in bed feeling very anxious and have a knot in my stomach", "label": "4"}
|
||||||
|
{"text": "i could do was feel i felt thankful that her battle was over thankful that she was now in a place of serenity", "label": "1"}
|
||||||
|
{"text": "i felt this was my next step and i dont want to be doubtful but i feel dumb keeping a hope for so much money to come through in such a short time", "label": "0"}
|
||||||
|
{"text": "i feel slightly triumphant thank you very much", "label": "1"}
|
||||||
|
{"text": "tutorial again a fearful feeling came to me when i sat on the chair and looked at my fellow students all around i was really scared that they would ask me some questions or challenge the ideas that i had presented", "label": "4"}
|
||||||
|
{"text": "i took several deep breaths feeling the cold air burn its way into my lungs and exhaling little clouds of vapor", "label": "3"}
|
||||||
|
{"text": "i have a few favourites of my own but the choice of book is up to you or you can have a dvd if you are us or uk im feeling generous so the limit is up to which is about something like that", "label": "2"}
|
||||||
|
{"text": "i just cant contain my joy but right now i feel troubled", "label": "0"}
|
||||||
|
{"text": "i feel that if people read my writing they will know that i m a dumb bunny", "label": "0"}
|
||||||
|
{"text": "i feel so honoured to receive this from krista know to the blogger world as a href https www", "label": "1"}
|
||||||
|
{"text": "i think lunch sounds datey and coffee feels casual", "label": "1"}
|
||||||
|
{"text": "i do feel confused", "label": "4"}
|
||||||
|
{"text": "i have been having bad dreams really weird dreams that make me feel like i got no sleep at all and with completely disturbed thoughts", "label": "0"}
|
||||||
|
{"text": "i feel even more regretful that i didnt get to go to her senior presentation", "label": "0"}
|
||||||
|
{"text": "i feel i m doing to my mom what i despised so much when it was done to me", "label": "3"}
|
||||||
|
{"text": "i hi tech color club holiday splendor sally hansen cha ching kiss silver glitter i was feeling a little festive tonight so i decided to", "label": "1"}
|
||||||
|
{"text": "i started feeling very gentle contractions about minutes apart", "label": "2"}
|
||||||
|
{"text": "i remember the same giddy feeling of contented good fortune lucky lucky me here safe in our cozy home watching my fabulous man head off for the day knowing he ll be coming home to me in a few hours", "label": "1"}
|
||||||
|
{"text": "i guess which meant or so i assume no photos no words or no other way to convey what it really feels unless you feels it yourself or khi bi t au th m i bi t th ng ng i b au i rephrase it to a bit more gloomy context unless you are hurt yourself you will never have sympathy for the hurt ones", "label": "0"}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
{"text": "im feeling abit grouchy with kim", "label": "3"}
|
||||||
|
{"text": "i just feel like being selfish and really live my life", "label": "3"}
|
||||||
|
{"text": "i spent some time at the school yesterday talking to folks and snapping pics of my daughters as they delighted in the last day of school fun and i came away feeling impressed and happy which to tell the truth is my usual feeling about the place", "label": "5"}
|
||||||
|
{"text": "i pray that you feel the presence of god around you and that you realize that the birth of gods son was a precious gift for you and you never have to be alone", "label": "1"}
|
||||||
|
{"text": "i do like riding on brooms but there is something about just sitting and holding colin and feeling the wind in my hair that is quite pleasant", "label": "1"}
|
||||||
|
{"text": "i feel has such a lovely touch", "label": "2"}
|
||||||
|
{"text": "i just need to express my feeling badly ignore this if i offended you", "label": "3"}
|
||||||
|
{"text": "i feel like i ve been there and gained a sense of the everyday paranoia and the casual brutality of the time", "label": "1"}
|
||||||
|
{"text": "i come out of that fight feeling whipped and saddened and hated for who i am and i have to put on my big girl panties and pretend hey everything s fine even though we re pissy at each other", "label": "0"}
|
||||||
|
{"text": "i do feel slightly ungrateful about it but i can only spend so much time with them before going mad", "label": "0"}
|
||||||
|
{"text": "i say that feelings dont dull selectively", "label": "0"}
|
||||||
|
{"text": "i feel a little bit brave", "label": "1"}
|
||||||
|
{"text": "i feel that im as curious as when i was a child", "label": "5"}
|
||||||
|
{"text": "i was made to feel that i was damaged and not good or giving enough when in reality nothing is ever enough", "label": "0"}
|
||||||
|
{"text": "i feel pained just thinking about it", "label": "0"}
|
||||||
|
{"text": "i feel honoured to be asked thanks a href http doodlesandscrapsofme", "label": "1"}
|
||||||
|
{"text": "i feel relaxed and comfortable", "label": "1"}
|
||||||
|
{"text": "i am feeling ever so homesick", "label": "0"}
|
||||||
|
{"text": "i used to believe that a feeling like fear was to be ignored or suppressed right away more on this in a moment", "label": "0"}
|
||||||
|
{"text": "i mention this seemingly obvious little tidbit is that either many of my friends have an innate inability to understand this or they feel hurt and neglected because of it", "label": "0"}
|
||||||
|
{"text": "i feel ive been physically uncomfortable for the last months of my life so nothing new there", "label": "4"}
|
||||||
|
{"text": "i also always feel a little scared", "label": "4"}
|
||||||
|
{"text": "i feel better now on the menu tonight", "label": "1"}
|
||||||
|
{"text": "i feel the pain again until i came from school and its still aching", "label": "0"}
|
||||||
|
{"text": "i stayed for a short while but feeling like he didnt need me anymore and having my own emotional drainage to work through i decided i needed to go home", "label": "0"}
|
||||||
|
{"text": "i feel so burdened as if something is holding me still and weighing me down", "label": "0"}
|
||||||
|
{"text": "i went to pick up the kids feeling scared and trembly and very self critical for my stupidity", "label": "4"}
|
||||||
|
{"text": "i leave feeling defeated hopeless and too weak to keep pressing into god and recovery", "label": "0"}
|
||||||
|
{"text": "i cry about feeling shitty i cry because dad made fun of me for being sick haha i kid you not that has happened many times all in good fun i cry because thats what i do in all adverse situations", "label": "0"}
|
||||||
|
{"text": "i feel like doing something productive on this", "label": "1"}
|
||||||
|
{"text": "i don t think there s a woman around who hasn t felt the angst rosa feels as she deals with the death of her beloved aunt the chasm between her and her father", "label": "2"}
|
||||||
|
{"text": "i finished our drinks and left and i came to feel more and more sympathetic and bad for this old man to the point where im still thinking about it hours later", "label": "2"}
|
||||||
|
{"text": "i feel so amazed with myself as i could stride nonstop for more than minutes", "label": "5"}
|
||||||
|
{"text": "i feel they look a little awkward just below", "label": "0"}
|
||||||
|
{"text": "i start feeling angry i need to actually stop and figure out what im really feeling so i can deal with life in a more balanced way", "label": "3"}
|
||||||
|
{"text": "i would feel i was devastated", "label": "0"}
|
||||||
|
{"text": "ive been feeling needy lately", "label": "0"}
|
||||||
|
{"text": "i feel a bit embarrassed at times when i make mistakes", "label": "0"}
|
||||||
|
{"text": "i know that sounds really recycled and generic but its actually how i feel i love to sing and would more than love to make a living doing that but im going to school because i know that its not in the cards for all the talented people in the world to make it in the music business", "label": "1"}
|
||||||
|
{"text": "i feel will be warmly welcomed on any floor", "label": "1"}
|
||||||
|
{"text": "i think about the woman in the congregation who cried as she spoke about the family trying to find a church where her homosexual daughter would feel accepted", "label": "2"}
|
||||||
|
{"text": "i really feel i was wronged as a patient", "label": "3"}
|
||||||
|
{"text": "i tried to reconcile the two feelings into one piece of music the unease and tender nostalgia present in martin s song of wwii france is different from the sharp bleeding ache i was feeling", "label": "2"}
|
||||||
|
{"text": "i feel happy i feel elated but i also thank god for bringing me to this stage", "label": "1"}
|
||||||
|
{"text": "ive talked with her telling her that sometimes i feel shes not sincere", "label": "1"}
|
||||||
|
{"text": "i feel like i probably would have liked this book a little bit more if it wasn t such a simple story line", "label": "2"}
|
||||||
|
{"text": "i feel like someone who really should learn not to stress out because we live in an ultimately benign universe", "label": "1"}
|
||||||
|
{"text": "i am feeling particularly disheartened and unmotivated today", "label": "0"}
|
||||||
|
{"text": "i did not want to feel discouraged looking at a gain", "label": "0"}
|
||||||
|
{"text": "i cant feel complacent", "label": "1"}
|
||||||
|
{"text": "im so tired and heavy all the time its a familiar feeling though not a pleasant one", "label": "1"}
|
||||||
|
{"text": "i feel a lot of support and very honoured because i was chosen to represent my country", "label": "1"}
|
||||||
|
{"text": "i would feel terrified for them and enjoy this movie a little better", "label": "4"}
|
||||||
|
{"text": "i was left feeling a little delicate but thoughtful", "label": "2"}
|
||||||
|
{"text": "i feel embarrassed by it", "label": "0"}
|
||||||
|
{"text": "i am feeling fine all things considered", "label": "1"}
|
||||||
|
{"text": "i say walking away and shaking my head feeling a little dazed to get the drinks", "label": "5"}
|
||||||
|
{"text": "i feel like a delicate fragile vase", "label": "2"}
|
||||||
|
{"text": "ive gone for my k training or a swim then i feel energised and be productive like actually cleaning my room", "label": "1"}
|
||||||
|
{"text": "i generally don t eat a lot of junk it is mostly stress eating but as i become more comfortable with the child care i am feeling less stressed and eating less junk", "label": "3"}
|
||||||
|
{"text": "i hate falling asleep napping during the day i wake up feeling so groggy", "label": "0"}
|
||||||
|
{"text": "i really feel amazed on how they can do that", "label": "5"}
|
||||||
|
{"text": "i still well feel quite ok with my results", "label": "1"}
|
||||||
|
{"text": "i bring these to mind and feel the joyful laughter well up within my heart it becomes hard to remain weighed down by the heavier negative feelings", "label": "1"}
|
||||||
|
{"text": "i tend to err on the justice side of things and so over the past few years i feel that ive become a lot more jaded and unwilling to let god deal with people as he sees", "label": "0"}
|
||||||
|
{"text": "i feel so spiteful towards people sometimes just the way they look makes me want to hurt them", "label": "3"}
|
||||||
|
{"text": "i can t help but feel considerate towards others", "label": "1"}
|
||||||
|
{"text": "i guess you cant see how wed feel a bit unwelcome", "label": "0"}
|
||||||
|
{"text": "i really feel like trying to be cute every day", "label": "1"}
|
||||||
|
{"text": "i wonder how shed feel about supporting me", "label": "2"}
|
||||||
|
{"text": "i feel like an ungrateful bitch because of what i made you see", "label": "0"}
|
||||||
|
{"text": "i can feel what hes feeling but not quite because this is his own beloved brother", "label": "1"}
|
||||||
|
{"text": "ive been feeling pretty punished lately", "label": "0"}
|
||||||
|
{"text": "i assert it is better to feel rich than to be rich", "label": "1"}
|
||||||
|
{"text": "i feel violent and crazy and i feel myself slowly losing patience", "label": "3"}
|
||||||
|
{"text": "im feeling so goddamn pissed and just", "label": "3"}
|
||||||
|
{"text": "i t want t know f t habitual t feel frightened wh n initiation r career", "label": "4"}
|
||||||
|
{"text": "i just feel you so so dont be afraid naega deo apaya hae and pray again dasi neol chajeul su itge sigani heureulsurok gaseumi apawa i need you go back in time dan hanbeon manirado forgive my sins wo doedollil suman itdamyeon i gotong ttawin naegen so so sloth", "label": "4"}
|
||||||
|
{"text": "i love to sew cook and also dabble in mixed media art when i feel like getting messy", "label": "0"}
|
||||||
|
{"text": "i feel so dirty in you i crash cars br style background color white color font family georgia times new roman times serif font size px line height", "label": "0"}
|
||||||
|
{"text": "i m filled with astonishment and feel amused about what this city has witnesed today", "label": "1"}
|
||||||
|
{"text": "i signed the petition and knowing that it will be served in the next few days has left me feeling vulnerable as i am unsure about his reaction", "label": "4"}
|
||||||
|
{"text": "i really enjoyed feeling that i was not alone", "label": "0"}
|
||||||
|
{"text": "i go back to that day however and hear jesus words the son of man has authority to forgive sins on earth i feel electrified and doubtful", "label": "4"}
|
||||||
|
{"text": "i feel so passionate about it and know this is where god wants me to be but i am human and i do have flaws and short comings", "label": "2"}
|
||||||
|
{"text": "i don t know about you but that feeling of powerlessness of not being in control sends me in a mad tizzy for the haagen dazs", "label": "3"}
|
||||||
|
{"text": "i feel this strange shift between us the heat between us intensifying and i get excited my nerves bubbling up inside me", "label": "4"}
|
||||||
|
{"text": "i am feeling more generous though i see it for what it is someone who doesn t know what we are going through from the insdie and is desperate to be helpful in some measure", "label": "2"}
|
||||||
|
{"text": "i keep going despite feeling miserable", "label": "0"}
|
||||||
|
{"text": "i still feel funny writing that like maybe i should call her my spirit guide or really observant cheerleader or something", "label": "5"}
|
||||||
|
{"text": "i feel is determined by the thoughts i allow to dominate my thinking", "label": "1"}
|
||||||
|
{"text": "i feel really petty and immature but i dont want to cheat on greg or end up breaking up because were fighting over the stupid little things", "label": "3"}
|
||||||
|
{"text": "i feel cdm flac custodes title alibi how much i feel cdm flac custodes download this in super speed resume support with premium account img src http i", "label": "1"}
|
||||||
|
{"text": "i could feel his sweet spirit and i was happy to be helping him", "label": "1"}
|
||||||
|
{"text": "i want to feel like the casting director is going to take one look at me and say you re amazing", "label": "1"}
|
||||||
|
{"text": "im in a strange situation or feeling awkward i sometimes switch into comedian mode a bit of a defence mechanism from my self conscious school days and turned some of the sessions into katrinas minute stand up routine", "label": "0"}
|
||||||
|
{"text": "i aint pissed angry mad or anything i just feel pretty much fuckin insulted", "label": "3"}
|
||||||
|
{"text": "i still pretty much feel ashamed and i m certain i m disappointed in my weaknesses i know for fact i am angry and upset and that s just for one situation", "label": "0"}
|
||||||
|
{"text": "i don t feel bitter about my lot nor do i wish any other mother s son was in my place", "label": "3"}
|
||||||
|
{"text": "i feel frightened by it all", "label": "4"}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
{"text": "i still feel the longing to be with you inspite of you sitting in front of me", "label": "2"}
|
||||||
|
{"text": "i do give up at times when i feel there s no point in a friendship when one cant be bothered", "label": "3"}
|
||||||
|
{"text": "i was so proud of him and i feel so hopeful i realise this is the nature of asd if he is motivated he will let us have a small glimpse of his abilities and it seems toy story lego is the motivator at the moment", "label": "1"}
|
||||||
|
{"text": "im not joking we had the feeling they were either extremely friendly or they hadnt seen a westerner before", "label": "1"}
|
||||||
|
{"text": "i feel betrayed where i serve and fellowship by no fault of my beloved pastor and c pastor", "label": "2"}
|
||||||
|
{"text": "i used to work he feels so needy and this just screams for attention so to please him i felt obligated to give him some", "label": "0"}
|
||||||
|
{"text": "i feel less threatened by the world", "label": "4"}
|
||||||
|
{"text": "i party wah wah wah nationalism blah yay aryans wah boo jews with there stupid brown hair blah blah should feel appreciative that we even talk to them because it makes them cool by association blah blah", "label": "1"}
|
||||||
|
{"text": "i do know that i am feeling fabulous and having more energy then i have had in a long time even if my clothes are still a little snug", "label": "1"}
|
||||||
|
{"text": "i used to down a large mushroom pizza and a pitcher of beer and feel positively virtuous afterward", "label": "1"}
|
||||||
|
{"text": "i guess the man knows how to make each and every one of them feel special", "label": "1"}
|
||||||
|
{"text": "i do feel has conditions it hurts deeply and it is not pleasant", "label": "1"}
|
||||||
|
{"text": "i feeling dangerous at wimbledon width", "label": "3"}
|
||||||
|
{"text": "i dont know why i feel so frantic about this but i really want to have this particular song for my little girl to be", "label": "4"}
|
||||||
|
{"text": "im feeling a bit sentimental", "label": "0"}
|
||||||
|
{"text": "im still feeling pretty gloomy if truth be told", "label": "0"}
|
||||||
|
{"text": "i stepped outside of the house feeling glad to be home again", "label": "1"}
|
||||||
|
{"text": "i personally feel they are doomed to finish dead last in the nl central without this key cog to any championship team", "label": "0"}
|
||||||
|
{"text": "i feel accepted as long as i am real and am not pious uppity and religious for the sake of religion", "label": "1"}
|
||||||
|
{"text": "i have a sense of both in my mind s eye i feel that divine energy way up aloft and i experience its reflection in me sometimes like a rare sunny day in a rainy climate", "label": "1"}
|
||||||
|
{"text": "i feel devastated betrayed and abandoned i ask for peace and comfort and a new direction", "label": "0"}
|
||||||
|
{"text": "i feel bad listing the movies becasue i like them so much", "label": "0"}
|
||||||
|
{"text": "i feel this is a very truthful parable because it s so evident in all aspects of life", "label": "1"}
|
||||||
|
{"text": "i am feeling generous and seasonal", "label": "1"}
|
||||||
|
{"text": "ive been feeling an aching loss a void in my life in the place that she filled", "label": "0"}
|
||||||
|
{"text": "i feel like all she wants is his parents fortune which is unfortunate", "label": "0"}
|
||||||
|
{"text": "i dare not say i feel ecstatic now but hey", "label": "1"}
|
||||||
|
{"text": "i feel a surge of adrenaline and excitement as i immediately recognize these two birds to be a gorgeous pair of marbled murrelets", "label": "1"}
|
||||||
|
{"text": "im feeling generous ill give you a story as well", "label": "2"}
|
||||||
|
{"text": "i was feeling a bit disheartened until one of our black belt instructors at the dojo richard and i own asked why let anyone else set your destiny", "label": "0"}
|
||||||
|
{"text": "i must not be left to feel foolish lost unhappy and with distaste", "label": "0"}
|
||||||
|
{"text": "i feel naughty a href http www", "label": "2"}
|
||||||
|
{"text": "i may be starting to feel paranoid or maybe insecure but im just a mere human being who yearns to be loved to be cared of and to be noticed", "label": "4"}
|
||||||
|
{"text": "i simply feel it is important to be presented well in front of others and when one is asked about himself there should be evident support in why he thinks so of himself as for any type of discussions during which perspectives on a topic are being exchanged", "label": "1"}
|
||||||
|
{"text": "i feel that this is a very important subject to discuss", "label": "1"}
|
||||||
|
{"text": "i remember feeling annoyed but also wondering if i shouldn t stop and buy something", "label": "3"}
|
||||||
|
{"text": "i feel pain even when i see an unfortunate person in street begging why does my mind race and think why is that person there", "label": "0"}
|
||||||
|
{"text": "i am not feeling very clever or creative", "label": "1"}
|
||||||
|
{"text": "i feel angry at him for being so selfish and giving me absolutely nothing to go on", "label": "3"}
|
||||||
|
{"text": "i asked him what was making him feel so fabulous and he said i m healthy my family is healthy and we live in a free country", "label": "1"}
|
||||||
|
{"text": "i just didnt feel thrilled let alone excited", "label": "1"}
|
||||||
|
{"text": "im feeling reluctant to change anything because it is all working so well", "label": "4"}
|
||||||
|
{"text": "i swear is releasing my neighbors inner crazy weve had cops called on our block like out of days this week im feeling inspired", "label": "1"}
|
||||||
|
{"text": "i hate feeling that a day got away from me and nothing not one thing productive got done", "label": "1"}
|
||||||
|
{"text": "i feel so dumb talking about this i feel like a whiny emo teenager who has so many problems and who is far too in love with her temporary boyfriend", "label": "0"}
|
||||||
|
{"text": "i mustered up energy to feel christmassy i remember feeling kind of pissed off at the bad timing of everything", "label": "3"}
|
||||||
|
{"text": "i was feeling apprehensive about my life as a student i felt like i couldnt succeed wouldnt succeed could never succeed", "label": "4"}
|
||||||
|
{"text": "i had grand plans of baking through my two days off but i mostly ended up just curled up on the couch pouting about not feeling well", "label": "1"}
|
||||||
|
{"text": "im not sure theyre right to feel triumphant but they certainly got a lot of comfort from the way the arguments went", "label": "1"}
|
||||||
|
{"text": "i feel we have a wonderful thing called a minute breathing space you can stop any time in the day even when you are driving along the motorway or in the middle of an important telephone call", "label": "1"}
|
||||||
|
{"text": "i could only see and feel the poison in my veins which deprived me of the strength and the ability to feel the joy i knew held me", "label": "0"}
|
||||||
|
{"text": "i can just remember that when im feeling ungrateful that would be great", "label": "0"}
|
||||||
|
{"text": "i love feeling productive and getting things cleaned out an sorted through", "label": "1"}
|
||||||
|
{"text": "i had climbed on a cherry tree alone and there was a thick caterpillar beside my fingers i feel disgusted by caterpillars and snakes i was terribly afraid of the caterpillar crawling on my fingers out of the fear i was almost unable to climb down", "label": "4"}
|
||||||
|
{"text": "i feel so neglectful of lj", "label": "0"}
|
||||||
|
{"text": "i feel resigned to what i have brought myself to and docile", "label": "0"}
|
||||||
|
{"text": "i cant get wrapped up in that kind of crap tv because my brain starts getting mushy and i feel feverishly hostile", "label": "3"}
|
||||||
|
{"text": "i find myself feeling irritable or depleted i run through a mental checklist have i worked out", "label": "3"}
|
||||||
|
{"text": "i feel like i ve lost some of my main roots i feel less secure emotionally financially and socially", "label": "0"}
|
||||||
|
{"text": "i could not help feeling thatrupert meant to be rude to my father though his words were quite polite", "label": "3"}
|
||||||
|
{"text": "i hold it for a day my arm will feel numb and paralysed", "label": "0"}
|
||||||
|
{"text": "i feel so shitty about wearing you out", "label": "0"}
|
||||||
|
{"text": "i am feeling rather delicate due to alot of white wine and a considerable amount of dancing one of my best friends ended up in a amp e due to a fractured wrist caused by excessive dancing", "label": "2"}
|
||||||
|
{"text": "i do however want you to know that if something someone is causing you to feel less then your splendid self step away from them", "label": "1"}
|
||||||
|
{"text": "i have to say it is making me feel very tender inside like a wound that has scabbed over on the surface but is still raw and unhealed underneath", "label": "2"}
|
||||||
|
{"text": "i feel sentimental i close my eyes and look up i feel powerful if i do that", "label": "0"}
|
||||||
|
{"text": "i feel as though my sub arguments are stronger and i support my claims better than i did in the beginning", "label": "1"}
|
||||||
|
{"text": "i quickly trotted off he added i feel embarrassed to ask hoping i would enter into some kind of conversation with him", "label": "0"}
|
||||||
|
{"text": "when an alcoholic stood dribbling over a food counter", "label": "3"}
|
||||||
|
{"text": "i feel like itd be strange at the least and possibly offensive to tell a gay friend id like to experiment or something like that", "label": "5"}
|
||||||
|
{"text": "i feel accepted for who i am", "label": "2"}
|
||||||
|
{"text": "i was feeling shaken walking along the streets and less able to concentrate on not having an accident while simultaneously worrying about having one due to not concentrating", "label": "4"}
|
||||||
|
{"text": "i fear that because i suffer from depression the people i care about feel inhibited when they are going through hard times", "label": "0"}
|
||||||
|
{"text": "i was feeling excited and motivated", "label": "1"}
|
||||||
|
{"text": "i feel many petty people have judged me simply because i may be one", "label": "3"}
|
||||||
|
{"text": "i have a feeling this will be a good soap for january", "label": "1"}
|
||||||
|
{"text": "i feel pretty confident giving endless opinons about", "label": "1"}
|
||||||
|
{"text": "i feel that way about popular culture", "label": "1"}
|
||||||
|
{"text": "i was okay but thats an awful feeling to be falling with no way to stop it maybe thats why to this day im so afraid of falling", "label": "4"}
|
||||||
|
{"text": "i think i confuse my feelings of longing with feeling good", "label": "2"}
|
||||||
|
{"text": "i feel very awkward", "label": "0"}
|
||||||
|
{"text": "i feel like i am part of a team now and far from the isolated feeling i have had for so many months now", "label": "0"}
|
||||||
|
{"text": "i can feel that the two girls are shocked with what i m saying", "label": "5"}
|
||||||
|
{"text": "im days post op and i am feeling fantastic", "label": "1"}
|
||||||
|
{"text": "i kind of feel more violent after having watched the non violence video", "label": "3"}
|
||||||
|
{"text": "i love my increased intense feeling of connection to the divine", "label": "1"}
|
||||||
|
{"text": "i do feel devastated", "label": "0"}
|
||||||
|
{"text": "i know both of them feel threatened by the job i do even after long years but i get really tired of the ganging up i get from them", "label": "4"}
|
||||||
|
{"text": "i feel very resolved yet somehow very depressed", "label": "1"}
|
||||||
|
{"text": "i feel so carefree nowwwwww", "label": "1"}
|
||||||
|
{"text": "i feel like as much as it was an unfortunate situation that i wasnt with my father i was in a great place", "label": "0"}
|
||||||
|
{"text": "i remember feeling more amused than sensing that i was in any real danger however i must have been experiencing a little bit of shock", "label": "1"}
|
||||||
|
{"text": "i love autumn and everything that comes with it although i feel i am getting excited for christmas way too early this year me and my friends including a href http andthenwear", "label": "1"}
|
||||||
|
{"text": "i sensed he had so much to offer but there were also many many times where his behaviour made me doubt myself did not make me feel special and at times frankly just rude and immature", "label": "1"}
|
||||||
|
{"text": "i haven t quite figured out and whenever i can t find the time or ability or money to take care of each side equally i end up feeling disappointed", "label": "0"}
|
||||||
|
{"text": "i was definitely feeling nostalgic and was a bit sad when one of my favorite exhibitions the hall of ocean life was closed", "label": "2"}
|
||||||
|
{"text": "ive been feeling the desire for a romantic interest even with my circumstances i feel as though im emotionally ready for a special someone in my life", "label": "2"}
|
||||||
|
{"text": "i feel not surprised by where i ended up i m happy with a lot of what i ve achieved the positions i ve put myself in", "label": "5"}
|
||||||
|
{"text": "i begin to have these doubts my stomach clenches my heart races and i feel fearful", "label": "4"}
|
||||||
@@ -0,0 +1,225 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Classification Data Processor Script
|
||||||
|
Uses YAML configurations for flexible and maintainable data processing.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import argparse
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
def run_with_yaml_config(config_path: str, **cli_overrides):
|
||||||
|
"""Run data processor with YAML configuration"""
|
||||||
|
print(f"=== Running Classification Data Processor ===")
|
||||||
|
print(f"Config: {config_path}")
|
||||||
|
|
||||||
|
cmd = [
|
||||||
|
"python", "pipelines/classification/data_processor.py",
|
||||||
|
"--config", config_path
|
||||||
|
]
|
||||||
|
|
||||||
|
# Add CLI overrides
|
||||||
|
for key, value in cli_overrides.items():
|
||||||
|
if value is not None:
|
||||||
|
cmd.extend([f"--{key.replace('_', '-')}", str(value)])
|
||||||
|
|
||||||
|
print(f"Command: {' '.join(cmd)}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = subprocess.run(cmd, check=True, capture_output=True, text=True)
|
||||||
|
print("✅ Data processing completed successfully!")
|
||||||
|
print(result.stdout)
|
||||||
|
return True
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print(f"❌ Error running data processor: {e}")
|
||||||
|
print(f"Error output: {e.stderr}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def run_emotion_example():
|
||||||
|
"""Run emotion classification example"""
|
||||||
|
print("=== Emotion Classification Example ===")
|
||||||
|
|
||||||
|
success = run_with_yaml_config(
|
||||||
|
"configs/classification/emotion.yaml",
|
||||||
|
max_samples=500, # Override YAML value
|
||||||
|
output_dir="./data/emotion_small"
|
||||||
|
)
|
||||||
|
|
||||||
|
if success:
|
||||||
|
print("✅ Emotion classification data processing completed!")
|
||||||
|
else:
|
||||||
|
print("❌ Emotion classification failed!")
|
||||||
|
|
||||||
|
def run_custom_example():
|
||||||
|
"""Run custom dataset example"""
|
||||||
|
print("\n=== Custom Dataset Example ===")
|
||||||
|
|
||||||
|
if os.path.exists("data/classification/train.jsonl"):
|
||||||
|
success = run_with_yaml_config(
|
||||||
|
"configs/classification/custom.yaml",
|
||||||
|
data_source="custom",
|
||||||
|
data_path="data/classification/train.jsonl",
|
||||||
|
output_dir="./data/custom_processed"
|
||||||
|
)
|
||||||
|
if success:
|
||||||
|
print("✅ Custom dataset processing completed!")
|
||||||
|
else:
|
||||||
|
print("❌ Custom dataset processing failed!")
|
||||||
|
else:
|
||||||
|
print("⚠️ Custom dataset not found, skipping...")
|
||||||
|
|
||||||
|
def create_custom_config():
|
||||||
|
"""Create a custom configuration file"""
|
||||||
|
custom_config = """task:
|
||||||
|
name: "classification"
|
||||||
|
type: "sequence_classification"
|
||||||
|
|
||||||
|
data:
|
||||||
|
source: "custom"
|
||||||
|
data_format: "jsonl"
|
||||||
|
input_field: "text"
|
||||||
|
label_field: "label"
|
||||||
|
max_samples: 1000
|
||||||
|
train_split: 0.8
|
||||||
|
validation_split: 0.1
|
||||||
|
test_split: 0.1
|
||||||
|
|
||||||
|
processing:
|
||||||
|
clean_text: true
|
||||||
|
lowercase: true
|
||||||
|
min_length: 10
|
||||||
|
max_length: 1000
|
||||||
|
|
||||||
|
output:
|
||||||
|
output_dir: "./data/custom_processed"
|
||||||
|
output_format: "classification"
|
||||||
|
"""
|
||||||
|
|
||||||
|
config_path = "configs/classification/custom.yaml"
|
||||||
|
with open(config_path, 'w') as f:
|
||||||
|
f.write(custom_config)
|
||||||
|
|
||||||
|
print(f"✅ Created custom config: {config_path}")
|
||||||
|
|
||||||
|
def show_usage():
|
||||||
|
"""Show usage examples"""
|
||||||
|
print("=== Classification Data Processor Usage ===")
|
||||||
|
print()
|
||||||
|
print("1. Use YAML config only:")
|
||||||
|
print(" python scripts/classification/data_processor.py --config configs/classification/emotion.yaml")
|
||||||
|
print()
|
||||||
|
print("2. Override YAML values:")
|
||||||
|
print(" python scripts/classification/data_processor.py --config configs/classification/emotion.yaml --max-samples 500")
|
||||||
|
print()
|
||||||
|
print("3. Use CLI only (backward compatibility):")
|
||||||
|
print(" python scripts/classification/data_processor.py --data-source huggingface --dataset-name dair-ai/emotion")
|
||||||
|
print()
|
||||||
|
print("4. Run examples:")
|
||||||
|
print(" python scripts/classification/data_processor.py examples")
|
||||||
|
print()
|
||||||
|
print("5. Create custom config:")
|
||||||
|
print(" python scripts/classification/data_processor.py create-config")
|
||||||
|
|
||||||
|
def handle_direct_args():
|
||||||
|
"""Handle direct command-line arguments by passing them to the pipeline"""
|
||||||
|
parser = argparse.ArgumentParser(description="Classification Data Processor")
|
||||||
|
|
||||||
|
# Add all the same arguments as the pipeline
|
||||||
|
parser.add_argument("--config", type=str, help="Path to YAML configuration file")
|
||||||
|
parser.add_argument("--data-source", choices=["huggingface", "custom"], help="Data source")
|
||||||
|
parser.add_argument("--dataset-name", type=str, help="HuggingFace dataset name")
|
||||||
|
parser.add_argument("--data-path", type=str, help="Path to custom data file")
|
||||||
|
parser.add_argument("--data-format", choices=["jsonl", "csv", "json"], help="Data format")
|
||||||
|
parser.add_argument("--input-field", type=str, help="Input field name")
|
||||||
|
parser.add_argument("--label-field", type=str, help="Label field name")
|
||||||
|
parser.add_argument("--id-field", type=str, help="Optional ID field name")
|
||||||
|
parser.add_argument("--max-samples", type=int, help="Maximum samples to process")
|
||||||
|
parser.add_argument("--train-split", type=float, help="Training split ratio")
|
||||||
|
parser.add_argument("--validation-split", type=float, help="Validation split ratio")
|
||||||
|
parser.add_argument("--test-split", type=float, help="Test split ratio")
|
||||||
|
parser.add_argument("--clean-text", action="store_true", help="Clean and normalize text")
|
||||||
|
parser.add_argument("--remove-special-chars", action="store_true", help="Remove special characters")
|
||||||
|
parser.add_argument("--lowercase", action="store_true", help="Convert text to lowercase")
|
||||||
|
parser.add_argument("--min-length", type=int, help="Minimum text length")
|
||||||
|
parser.add_argument("--max-length", type=int, help="Maximum text length")
|
||||||
|
parser.add_argument("--output-format", choices=["classification", "instruction", "conversation", "qa"], help="Output format")
|
||||||
|
parser.add_argument("--output-dir", type=str, help="Output directory")
|
||||||
|
parser.add_argument("--log-level", choices=["DEBUG", "INFO", "WARNING", "ERROR"], default="INFO", help="Logging level")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# Build command to call the pipeline
|
||||||
|
cmd = ["python", "pipelines/classification/data_processor.py"]
|
||||||
|
|
||||||
|
# Add all arguments that were provided
|
||||||
|
for arg_name, arg_value in vars(args).items():
|
||||||
|
if arg_value is not None:
|
||||||
|
if isinstance(arg_value, bool):
|
||||||
|
if arg_value: # Only add flag if True
|
||||||
|
cmd.append(f"--{arg_name.replace('_', '-')}")
|
||||||
|
else:
|
||||||
|
cmd.extend([f"--{arg_name.replace('_', '-')}", str(arg_value)])
|
||||||
|
|
||||||
|
print(f"Running: {' '.join(cmd)}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = subprocess.run(cmd, check=True, capture_output=True, text=True)
|
||||||
|
print("✅ Data processing completed successfully!")
|
||||||
|
print(result.stdout)
|
||||||
|
return True
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print(f"❌ Error running data processor: {e}")
|
||||||
|
print(f"Error output: {e.stderr}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main function"""
|
||||||
|
# Check if any command-line arguments were provided
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
# Check if it's a subcommand
|
||||||
|
if sys.argv[1] in ["examples", "emotion", "custom", "create-config", "help"]:
|
||||||
|
# Handle subcommands
|
||||||
|
if sys.argv[1] == "examples":
|
||||||
|
run_emotion_example()
|
||||||
|
run_custom_example()
|
||||||
|
elif sys.argv[1] == "emotion":
|
||||||
|
run_emotion_example()
|
||||||
|
elif sys.argv[1] == "custom":
|
||||||
|
run_custom_example()
|
||||||
|
elif sys.argv[1] == "create-config":
|
||||||
|
create_custom_config()
|
||||||
|
elif sys.argv[1] == "help":
|
||||||
|
show_usage()
|
||||||
|
else:
|
||||||
|
# Handle direct arguments (pass through to pipeline)
|
||||||
|
handle_direct_args()
|
||||||
|
else:
|
||||||
|
print("Classification Data Processor")
|
||||||
|
print("============================")
|
||||||
|
print()
|
||||||
|
print("This script processes classification datasets using YAML configurations.")
|
||||||
|
print()
|
||||||
|
print("Usage:")
|
||||||
|
print(" python scripts/classification/data_processor.py examples # Run examples")
|
||||||
|
print(" python scripts/classification/data_processor.py emotion # Run emotion example")
|
||||||
|
print(" python scripts/classification/data_processor.py custom # Run custom example")
|
||||||
|
print(" python scripts/classification/data_processor.py create-config # Create custom config")
|
||||||
|
print(" python scripts/classification/data_processor.py help # Show usage")
|
||||||
|
print()
|
||||||
|
print("Direct pipeline usage:")
|
||||||
|
print(" python scripts/classification/data_processor.py --config configs/classification/emotion.yaml")
|
||||||
|
print(" python scripts/classification/data_processor.py --data-source huggingface --dataset-name dair-ai/emotion")
|
||||||
|
print()
|
||||||
|
print("Benefits of YAML configurations:")
|
||||||
|
print(" ✅ Easier to manage complex configurations")
|
||||||
|
print(" ✅ Version control friendly")
|
||||||
|
print(" ✅ Self-documenting")
|
||||||
|
print(" ✅ Can still override with CLI args")
|
||||||
|
print(" ✅ Better for team collaboration")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,260 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Classification Inference Script
|
||||||
|
Uses YAML configurations for flexible and maintainable model inference.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import argparse
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
def run_with_yaml_config(config_path: str, **cli_overrides):
|
||||||
|
"""Run inference with YAML configuration"""
|
||||||
|
print(f"=== Running Classification Inference ===")
|
||||||
|
print(f"Config: {config_path}")
|
||||||
|
|
||||||
|
cmd = [
|
||||||
|
"python", "pipelines/classification/inference.py",
|
||||||
|
"--config", config_path
|
||||||
|
]
|
||||||
|
|
||||||
|
# Add CLI overrides
|
||||||
|
for key, value in cli_overrides.items():
|
||||||
|
if value is not None:
|
||||||
|
cmd.extend([f"--{key.replace('_', '-')}", str(value)])
|
||||||
|
|
||||||
|
print(f"Command: {' '.join(cmd)}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = subprocess.run(cmd, check=True, capture_output=True, text=True)
|
||||||
|
print("✅ Inference completed successfully!")
|
||||||
|
print(result.stdout)
|
||||||
|
return True
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print(f"❌ Error running inference: {e}")
|
||||||
|
print(f"Error output: {e.stderr}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def run_single_text_inference():
|
||||||
|
"""Run single text inference"""
|
||||||
|
print("=== Single Text Inference ===")
|
||||||
|
|
||||||
|
# Check if model exists
|
||||||
|
model_path = "./results/emotion_model"
|
||||||
|
if not os.path.exists(model_path):
|
||||||
|
print(f"⚠️ Model not found: {model_path}")
|
||||||
|
print("Please train a model first using the trainer script.")
|
||||||
|
return False
|
||||||
|
|
||||||
|
success = run_with_yaml_config(
|
||||||
|
"configs/classification/emotion.yaml",
|
||||||
|
model_path=model_path,
|
||||||
|
input_text="I love this product! It's amazing.",
|
||||||
|
return_top_k=3
|
||||||
|
)
|
||||||
|
|
||||||
|
if success:
|
||||||
|
print("✅ Single text inference completed!")
|
||||||
|
else:
|
||||||
|
print("❌ Single text inference failed!")
|
||||||
|
|
||||||
|
return success
|
||||||
|
|
||||||
|
def run_file_inference():
|
||||||
|
"""Run file-based inference"""
|
||||||
|
print("\n=== File-Based Inference ===")
|
||||||
|
|
||||||
|
# Check if model exists
|
||||||
|
model_path = "./results/emotion_model"
|
||||||
|
if not os.path.exists(model_path):
|
||||||
|
print(f"⚠️ Model not found: {model_path}")
|
||||||
|
print("Please train a model first using the trainer script.")
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Create sample input file
|
||||||
|
sample_texts = [
|
||||||
|
"I love this product! It's amazing.",
|
||||||
|
"This is terrible, I hate it.",
|
||||||
|
"The weather is okay today.",
|
||||||
|
"Best purchase ever made!"
|
||||||
|
]
|
||||||
|
|
||||||
|
input_file = "sample_texts.txt"
|
||||||
|
with open(input_file, 'w') as f:
|
||||||
|
for text in sample_texts:
|
||||||
|
f.write(text + '\n')
|
||||||
|
|
||||||
|
success = run_with_yaml_config(
|
||||||
|
"configs/classification/emotion.yaml",
|
||||||
|
model_path=model_path,
|
||||||
|
input_file=input_file,
|
||||||
|
output_file="predictions.jsonl",
|
||||||
|
batch_size=16
|
||||||
|
)
|
||||||
|
|
||||||
|
if success:
|
||||||
|
print("✅ File-based inference completed!")
|
||||||
|
print(f"Results saved to: predictions.jsonl")
|
||||||
|
else:
|
||||||
|
print("❌ File-based inference failed!")
|
||||||
|
|
||||||
|
return success
|
||||||
|
|
||||||
|
def run_interactive_inference():
|
||||||
|
"""Run interactive inference"""
|
||||||
|
print("\n=== Interactive Inference ===")
|
||||||
|
|
||||||
|
# Check if model exists
|
||||||
|
model_path = "./results/emotion_model"
|
||||||
|
if not os.path.exists(model_path):
|
||||||
|
print(f"⚠️ Model not found: {model_path}")
|
||||||
|
print("Please train a model first using the trainer script.")
|
||||||
|
return False
|
||||||
|
|
||||||
|
success = run_with_yaml_config(
|
||||||
|
"configs/classification/emotion.yaml",
|
||||||
|
model_path=model_path,
|
||||||
|
return_top_k=3
|
||||||
|
)
|
||||||
|
|
||||||
|
if success:
|
||||||
|
print("✅ Interactive inference completed!")
|
||||||
|
else:
|
||||||
|
print("❌ Interactive inference failed!")
|
||||||
|
|
||||||
|
return success
|
||||||
|
|
||||||
|
def create_inference_config():
|
||||||
|
"""Create an inference configuration file"""
|
||||||
|
inference_config = """model_path: "./results/emotion_model"
|
||||||
|
device: "auto"
|
||||||
|
batch_size: 32
|
||||||
|
max_length: 512
|
||||||
|
return_probabilities: true
|
||||||
|
return_top_k: 3
|
||||||
|
"""
|
||||||
|
|
||||||
|
config_path = "configs/classification/inference.yaml"
|
||||||
|
with open(config_path, 'w') as f:
|
||||||
|
f.write(inference_config)
|
||||||
|
|
||||||
|
print(f"✅ Created inference config: {config_path}")
|
||||||
|
|
||||||
|
def show_usage():
|
||||||
|
"""Show usage examples"""
|
||||||
|
print("=== Classification Inference Usage ===")
|
||||||
|
print()
|
||||||
|
print("1. Use YAML config only:")
|
||||||
|
print(" python scripts/classification/inference.py --config configs/classification/inference.yaml")
|
||||||
|
print()
|
||||||
|
print("2. Override YAML values:")
|
||||||
|
print(" python scripts/classification/inference.py --config configs/classification/inference.yaml --input-text 'Your text here'")
|
||||||
|
print()
|
||||||
|
print("3. Use CLI only (backward compatibility):")
|
||||||
|
print(" python scripts/classification/inference.py --model-path ./results/emotion_model --input-text 'Your text here'")
|
||||||
|
print()
|
||||||
|
print("4. Run examples:")
|
||||||
|
print(" python scripts/classification/inference.py examples")
|
||||||
|
print()
|
||||||
|
print("5. Create inference config:")
|
||||||
|
print(" python scripts/classification/inference.py create-config")
|
||||||
|
|
||||||
|
def handle_direct_args():
|
||||||
|
"""Handle direct command-line arguments by passing them to the pipeline"""
|
||||||
|
parser = argparse.ArgumentParser(description="Classification Inference")
|
||||||
|
|
||||||
|
# Add all the same arguments as the pipeline
|
||||||
|
parser.add_argument("--config", type=str, help="Path to YAML configuration file")
|
||||||
|
parser.add_argument("--model-path", type=str, help="Path to saved model directory")
|
||||||
|
parser.add_argument("--device", choices=["auto", "cuda", "cpu"], help="Device to run inference on")
|
||||||
|
parser.add_argument("--batch-size", type=int, help="Batch size for inference")
|
||||||
|
parser.add_argument("--max-length", type=int, help="Maximum sequence length for tokenization")
|
||||||
|
parser.add_argument("--return-probabilities", action="store_true", help="Return all class probabilities")
|
||||||
|
parser.add_argument("--return-top-k", type=int, help="Return top K predictions")
|
||||||
|
parser.add_argument("--input-text", type=str, help="Single text for prediction")
|
||||||
|
parser.add_argument("--input-file", type=str, help="Input file path (txt or jsonl)")
|
||||||
|
parser.add_argument("--output-file", type=str, help="Output file path for results")
|
||||||
|
parser.add_argument("--chunk-size", type=int, help="Chunk size for large file processing")
|
||||||
|
parser.add_argument("--log-level", choices=["DEBUG", "INFO", "WARNING", "ERROR"], default="INFO", help="Logging level")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# Build command to call the pipeline
|
||||||
|
cmd = ["python", "pipelines/classification/inference.py"]
|
||||||
|
|
||||||
|
# Add all arguments that were provided
|
||||||
|
for arg_name, arg_value in vars(args).items():
|
||||||
|
if arg_value is not None:
|
||||||
|
if isinstance(arg_value, bool):
|
||||||
|
if arg_value: # Only add flag if True
|
||||||
|
cmd.append(f"--{arg_name.replace('_', '-')}")
|
||||||
|
else:
|
||||||
|
cmd.extend([f"--{arg_name.replace('_', '-')}", str(arg_value)])
|
||||||
|
|
||||||
|
print(f"Running: {' '.join(cmd)}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = subprocess.run(cmd, check=True, capture_output=True, text=True)
|
||||||
|
print("✅ Inference completed successfully!")
|
||||||
|
print(result.stdout)
|
||||||
|
return True
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print(f"❌ Error running inference: {e}")
|
||||||
|
print(f"Error output: {e.stderr}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main function"""
|
||||||
|
# Check if any command-line arguments were provided
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
# Check if it's a subcommand
|
||||||
|
if sys.argv[1] in ["examples", "single", "file", "interactive", "create-config", "help"]:
|
||||||
|
# Handle subcommands
|
||||||
|
if sys.argv[1] == "examples":
|
||||||
|
run_single_text_inference()
|
||||||
|
run_file_inference()
|
||||||
|
run_interactive_inference()
|
||||||
|
elif sys.argv[1] == "single":
|
||||||
|
run_single_text_inference()
|
||||||
|
elif sys.argv[1] == "file":
|
||||||
|
run_file_inference()
|
||||||
|
elif sys.argv[1] == "interactive":
|
||||||
|
run_interactive_inference()
|
||||||
|
elif sys.argv[1] == "create-config":
|
||||||
|
create_inference_config()
|
||||||
|
elif sys.argv[1] == "help":
|
||||||
|
show_usage()
|
||||||
|
else:
|
||||||
|
# Handle direct arguments (pass through to pipeline)
|
||||||
|
handle_direct_args()
|
||||||
|
else:
|
||||||
|
print("Classification Inference")
|
||||||
|
print("=======================")
|
||||||
|
print()
|
||||||
|
print("This script performs inference using trained classification models.")
|
||||||
|
print()
|
||||||
|
print("Usage:")
|
||||||
|
print(" python scripts/classification/inference.py examples # Run examples")
|
||||||
|
print(" python scripts/classification/inference.py single # Single text inference")
|
||||||
|
print(" python scripts/classification/inference.py file # File-based inference")
|
||||||
|
print(" python scripts/classification/inference.py interactive # Interactive inference")
|
||||||
|
print(" python scripts/classification/inference.py create-config # Create inference config")
|
||||||
|
print(" python scripts/classification/inference.py help # Show usage")
|
||||||
|
print()
|
||||||
|
print("Direct pipeline usage:")
|
||||||
|
print(" python scripts/classification/inference.py --config configs/classification/inference.yaml")
|
||||||
|
print(" python scripts/classification/inference.py --model-path ./results/emotion_model --input-text 'Your text here'")
|
||||||
|
print()
|
||||||
|
print("Benefits of YAML configurations:")
|
||||||
|
print(" ✅ Easier to manage complex configurations")
|
||||||
|
print(" ✅ Version control friendly")
|
||||||
|
print(" ✅ Self-documenting")
|
||||||
|
print(" ✅ Can still override with CLI args")
|
||||||
|
print(" ✅ Better for team collaboration")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,204 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Classification Trainer Script
|
||||||
|
Uses YAML configurations for flexible and maintainable model training.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import argparse
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
def run_with_yaml_config(config_path: str, **cli_overrides):
|
||||||
|
"""Run trainer with YAML configuration"""
|
||||||
|
print(f"=== Running Classification Trainer ===")
|
||||||
|
print(f"Config: {config_path}")
|
||||||
|
|
||||||
|
cmd = [
|
||||||
|
"python", "pipelines/classification/train.py",
|
||||||
|
"--config", config_path
|
||||||
|
]
|
||||||
|
|
||||||
|
# Add CLI overrides
|
||||||
|
for key, value in cli_overrides.items():
|
||||||
|
if value is not None:
|
||||||
|
cmd.extend([f"--{key.replace('_', '-')}", str(value)])
|
||||||
|
|
||||||
|
print(f"Command: {' '.join(cmd)}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = subprocess.run(cmd, check=True, capture_output=True, text=True)
|
||||||
|
print("✅ Training completed successfully!")
|
||||||
|
print(result.stdout)
|
||||||
|
return True
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print(f"❌ Error running trainer: {e}")
|
||||||
|
print(f"Error output: {e.stderr}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def run_emotion_training():
|
||||||
|
"""Run emotion classification training"""
|
||||||
|
print("=== Emotion Classification Training ===")
|
||||||
|
|
||||||
|
success = run_with_yaml_config(
|
||||||
|
"configs/classification/emotion.yaml",
|
||||||
|
num_epochs=2, # Override YAML value
|
||||||
|
batch_size=8, # Smaller batch for testing
|
||||||
|
output_dir="./results/emotion_model"
|
||||||
|
)
|
||||||
|
|
||||||
|
if success:
|
||||||
|
print("✅ Emotion classification training completed!")
|
||||||
|
else:
|
||||||
|
print("❌ Emotion classification training failed!")
|
||||||
|
|
||||||
|
def run_custom_training():
|
||||||
|
"""Run custom dataset training"""
|
||||||
|
print("\n=== Custom Dataset Training ===")
|
||||||
|
|
||||||
|
if os.path.exists("data/custom_processed/train.jsonl"):
|
||||||
|
success = run_with_yaml_config(
|
||||||
|
"configs/classification/custom.yaml",
|
||||||
|
data_dir="data/custom_processed",
|
||||||
|
output_dir="./results/custom_model"
|
||||||
|
)
|
||||||
|
if success:
|
||||||
|
print("✅ Custom dataset training completed!")
|
||||||
|
else:
|
||||||
|
print("❌ Custom dataset training failed!")
|
||||||
|
else:
|
||||||
|
print("⚠️ Custom dataset not found, skipping...")
|
||||||
|
|
||||||
|
def create_training_config():
|
||||||
|
"""Create a training configuration file"""
|
||||||
|
training_config = """model_name: "bert-base-uncased"
|
||||||
|
max_length: 512
|
||||||
|
num_epochs: 3
|
||||||
|
batch_size: 16
|
||||||
|
learning_rate: 2e-5
|
||||||
|
weight_decay: 0.01
|
||||||
|
lr_scheduler_type: "linear"
|
||||||
|
warmup_ratio: 0.1
|
||||||
|
data_dir: "./data/classification"
|
||||||
|
output_dir: "./results/classification_model"
|
||||||
|
"""
|
||||||
|
|
||||||
|
config_path = "configs/classification/training.yaml"
|
||||||
|
with open(config_path, 'w') as f:
|
||||||
|
f.write(training_config)
|
||||||
|
|
||||||
|
print(f"✅ Created training config: {config_path}")
|
||||||
|
|
||||||
|
def show_usage():
|
||||||
|
"""Show usage examples"""
|
||||||
|
print("=== Classification Trainer Usage ===")
|
||||||
|
print()
|
||||||
|
print("1. Use YAML config only:")
|
||||||
|
print(" python scripts/classification/trainer.py --config configs/classification/emotion.yaml")
|
||||||
|
print()
|
||||||
|
print("2. Override YAML values:")
|
||||||
|
print(" python scripts/classification/trainer.py --config configs/classification/emotion.yaml --num-epochs 5")
|
||||||
|
print()
|
||||||
|
print("3. Use CLI only (backward compatibility):")
|
||||||
|
print(" python scripts/classification/trainer.py --model-name bert-base-uncased --num-epochs 3")
|
||||||
|
print()
|
||||||
|
print("4. Run examples:")
|
||||||
|
print(" python scripts/classification/trainer.py examples")
|
||||||
|
print()
|
||||||
|
print("5. Create training config:")
|
||||||
|
print(" python scripts/classification/trainer.py create-config")
|
||||||
|
|
||||||
|
def handle_direct_args():
|
||||||
|
"""Handle direct command-line arguments by passing them to the pipeline"""
|
||||||
|
parser = argparse.ArgumentParser(description="Classification Trainer")
|
||||||
|
|
||||||
|
# Add all the same arguments as the pipeline
|
||||||
|
parser.add_argument("--config", type=str, help="Path to YAML configuration file")
|
||||||
|
parser.add_argument("--model-name", type=str, help="Model name from HuggingFace Hub")
|
||||||
|
parser.add_argument("--max-length", type=int, help="Maximum sequence length for tokenization")
|
||||||
|
parser.add_argument("--num-epochs", type=int, help="Number of training epochs")
|
||||||
|
parser.add_argument("--batch-size", type=int, help="Training batch size")
|
||||||
|
parser.add_argument("--learning-rate", type=float, help="Learning rate")
|
||||||
|
parser.add_argument("--weight-decay", type=float, help="Weight decay for optimizer")
|
||||||
|
parser.add_argument("--lr-scheduler-type", choices=["linear", "cosine", "polynomial"], help="Learning rate scheduler type")
|
||||||
|
parser.add_argument("--warmup-ratio", type=float, help="Warmup ratio for scheduler")
|
||||||
|
parser.add_argument("--data-dir", type=str, help="Directory containing train/validation/test JSONL files")
|
||||||
|
parser.add_argument("--output-dir", type=str, help="Output directory for saved model")
|
||||||
|
parser.add_argument("--log-level", choices=["DEBUG", "INFO", "WARNING", "ERROR"], default="INFO", help="Logging level")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# Build command to call the pipeline
|
||||||
|
cmd = ["python", "pipelines/classification/train.py"]
|
||||||
|
|
||||||
|
# Add all arguments that were provided
|
||||||
|
for arg_name, arg_value in vars(args).items():
|
||||||
|
if arg_value is not None:
|
||||||
|
if isinstance(arg_value, bool):
|
||||||
|
if arg_value: # Only add flag if True
|
||||||
|
cmd.append(f"--{arg_name.replace('_', '-')}")
|
||||||
|
else:
|
||||||
|
cmd.extend([f"--{arg_name.replace('_', '-')}", str(arg_value)])
|
||||||
|
|
||||||
|
print(f"Running: {' '.join(cmd)}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = subprocess.run(cmd, check=True, capture_output=True, text=True)
|
||||||
|
print("✅ Training completed successfully!")
|
||||||
|
print(result.stdout)
|
||||||
|
return True
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print(f"❌ Error running trainer: {e}")
|
||||||
|
print(f"Error output: {e.stderr}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main function"""
|
||||||
|
# Check if any command-line arguments were provided
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
# Check if it's a subcommand
|
||||||
|
if sys.argv[1] in ["examples", "emotion", "custom", "create-config", "help"]:
|
||||||
|
# Handle subcommands
|
||||||
|
if sys.argv[1] == "examples":
|
||||||
|
run_emotion_training()
|
||||||
|
run_custom_training()
|
||||||
|
elif sys.argv[1] == "emotion":
|
||||||
|
run_emotion_training()
|
||||||
|
elif sys.argv[1] == "custom":
|
||||||
|
run_custom_training()
|
||||||
|
elif sys.argv[1] == "create-config":
|
||||||
|
create_training_config()
|
||||||
|
elif sys.argv[1] == "help":
|
||||||
|
show_usage()
|
||||||
|
else:
|
||||||
|
# Handle direct arguments (pass through to pipeline)
|
||||||
|
handle_direct_args()
|
||||||
|
else:
|
||||||
|
print("Classification Trainer")
|
||||||
|
print("====================")
|
||||||
|
print()
|
||||||
|
print("This script trains classification models using YAML configurations.")
|
||||||
|
print()
|
||||||
|
print("Usage:")
|
||||||
|
print(" python scripts/classification/trainer.py examples # Run examples")
|
||||||
|
print(" python scripts/classification/trainer.py emotion # Run emotion training")
|
||||||
|
print(" python scripts/classification/trainer.py custom # Run custom training")
|
||||||
|
print(" python scripts/classification/trainer.py create-config # Create training config")
|
||||||
|
print(" python scripts/classification/trainer.py help # Show usage")
|
||||||
|
print()
|
||||||
|
print("Direct pipeline usage:")
|
||||||
|
print(" python scripts/classification/trainer.py --config configs/classification/emotion.yaml")
|
||||||
|
print(" python scripts/classification/trainer.py --model-name bert-base-uncased --num-epochs 3")
|
||||||
|
print()
|
||||||
|
print("Benefits of YAML configurations:")
|
||||||
|
print(" ✅ Easier to manage complex configurations")
|
||||||
|
print(" ✅ Version control friendly")
|
||||||
|
print(" ✅ Self-documenting")
|
||||||
|
print(" ✅ Can still override with CLI args")
|
||||||
|
print(" ✅ Better for team collaboration")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Data processor script that uses YAML configurations.
|
||||||
|
This provides a more flexible and maintainable approach than command-line arguments alone.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
from pathlib import Path
|
||||||
|
from utils.config.config_manager import ConfigManager
|
||||||
|
|
||||||
|
def run_with_yaml_config(config_path: str, **cli_overrides):
|
||||||
|
"""Run data processor with YAML configuration"""
|
||||||
|
print(f"=== Running with YAML config: {config_path} ===")
|
||||||
|
|
||||||
|
cmd = [
|
||||||
|
"python", "pipelines/classification/data_processor.py",
|
||||||
|
"--config", config_path
|
||||||
|
]
|
||||||
|
|
||||||
|
# Add CLI overrides
|
||||||
|
for key, value in cli_overrides.items():
|
||||||
|
if value is not None:
|
||||||
|
cmd.extend([f"--{key.replace('_', '-')}", str(value)])
|
||||||
|
|
||||||
|
print(f"Running command: {' '.join(cmd)}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = subprocess.run(cmd, check=True, capture_output=True, text=True)
|
||||||
|
print("✅ Data processing completed successfully!")
|
||||||
|
print(result.stdout)
|
||||||
|
return True
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print(f"❌ Error running data processor: {e}")
|
||||||
|
print(f"Error output: {e.stderr}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def run_classification_examples():
|
||||||
|
"""Run classification examples with YAML configs"""
|
||||||
|
|
||||||
|
# Example 1: Emotion classification
|
||||||
|
print("=== Example 1: Emotion Classification ===")
|
||||||
|
success = run_with_yaml_config(
|
||||||
|
"configs/classification/emotion.yaml",
|
||||||
|
max_samples=500, # Override YAML value
|
||||||
|
output_dir="./data/emotion_small"
|
||||||
|
)
|
||||||
|
|
||||||
|
if success:
|
||||||
|
print("✅ Emotion classification completed!")
|
||||||
|
|
||||||
|
# Example 2: Custom dataset (if available)
|
||||||
|
print("\n=== Example 2: Custom Dataset ===")
|
||||||
|
if os.path.exists("data/classification/train.jsonl"):
|
||||||
|
success = run_with_yaml_config(
|
||||||
|
"configs/classification/custom.yaml", # You can create this
|
||||||
|
data_source="custom",
|
||||||
|
data_path="data/classification/train.jsonl",
|
||||||
|
output_dir="./data/custom_processed"
|
||||||
|
)
|
||||||
|
if success:
|
||||||
|
print("✅ Custom dataset processing completed!")
|
||||||
|
else:
|
||||||
|
print("⚠️ Custom dataset not found, skipping...")
|
||||||
|
|
||||||
|
def create_custom_config():
|
||||||
|
"""Create a custom configuration file"""
|
||||||
|
custom_config = """task:
|
||||||
|
name: "classification"
|
||||||
|
type: "sequence_classification"
|
||||||
|
|
||||||
|
data:
|
||||||
|
source: "custom"
|
||||||
|
data_format: "jsonl"
|
||||||
|
input_field: "text"
|
||||||
|
label_field: "label"
|
||||||
|
max_samples: 1000
|
||||||
|
train_split: 0.8
|
||||||
|
validation_split: 0.1
|
||||||
|
test_split: 0.1
|
||||||
|
|
||||||
|
processing:
|
||||||
|
clean_text: true
|
||||||
|
lowercase: true
|
||||||
|
min_length: 10
|
||||||
|
max_length: 1000
|
||||||
|
|
||||||
|
output:
|
||||||
|
output_dir: "./data/custom_processed"
|
||||||
|
output_format: "classification"
|
||||||
|
"""
|
||||||
|
|
||||||
|
config_path = "configs/classification/custom.yaml"
|
||||||
|
with open(config_path, 'w') as f:
|
||||||
|
f.write(custom_config)
|
||||||
|
|
||||||
|
print(f"✅ Created custom config: {config_path}")
|
||||||
|
|
||||||
|
def show_yaml_benefits():
|
||||||
|
"""Show the benefits of using YAML configurations"""
|
||||||
|
print("=== YAML Configuration Benefits ===")
|
||||||
|
print()
|
||||||
|
print("1. **Separation of Concerns**:")
|
||||||
|
print(" - Configuration separate from code")
|
||||||
|
print(" - Easy to version control configs")
|
||||||
|
print(" - No need to modify scripts for different experiments")
|
||||||
|
print()
|
||||||
|
print("2. **Flexibility**:")
|
||||||
|
print(" - Can override YAML values with CLI args")
|
||||||
|
print(" - Multiple configs for different experiments")
|
||||||
|
print(" - Easy to share and reproduce experiments")
|
||||||
|
print()
|
||||||
|
print("3. **Maintainability**:")
|
||||||
|
print(" - All parameters in one place")
|
||||||
|
print(" - Easy to understand and modify")
|
||||||
|
print(" - Self-documenting configurations")
|
||||||
|
print()
|
||||||
|
print("4. **Scalability**:")
|
||||||
|
print(" - Easy to add new parameters")
|
||||||
|
print(" - Hierarchical configuration structure")
|
||||||
|
print(" - Support for complex nested configurations")
|
||||||
|
print()
|
||||||
|
print("=== Usage Examples ===")
|
||||||
|
print()
|
||||||
|
print("1. Use YAML config only:")
|
||||||
|
print(" python scripts/run_data_processor_yaml.py --config configs/classification/emotion.yaml")
|
||||||
|
print()
|
||||||
|
print("2. Override YAML values:")
|
||||||
|
print(" python scripts/run_data_processor_yaml.py --config configs/classification/emotion.yaml --max-samples 500")
|
||||||
|
print()
|
||||||
|
print("3. Use CLI only (backward compatibility):")
|
||||||
|
print(" python scripts/run_data_processor_yaml.py --data-source huggingface --dataset-name dair-ai/emotion")
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main function"""
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
if sys.argv[1] == "examples":
|
||||||
|
run_classification_examples()
|
||||||
|
elif sys.argv[1] == "create-config":
|
||||||
|
create_custom_config()
|
||||||
|
elif sys.argv[1] == "benefits":
|
||||||
|
show_yaml_benefits()
|
||||||
|
else:
|
||||||
|
print(f"Unknown option: {sys.argv[1]}")
|
||||||
|
print("Use: python scripts/run_data_processor_yaml.py [examples|create-config|benefits]")
|
||||||
|
else:
|
||||||
|
print("YAML-Based Data Processor")
|
||||||
|
print("========================")
|
||||||
|
print()
|
||||||
|
print("This script demonstrates using YAML configurations instead of")
|
||||||
|
print("command-line arguments for better flexibility and maintainability.")
|
||||||
|
print()
|
||||||
|
print("Usage:")
|
||||||
|
print(" python scripts/run_data_processor_yaml.py examples # Run examples")
|
||||||
|
print(" python scripts/run_data_processor_yaml.py create-config # Create custom config")
|
||||||
|
print(" python scripts/run_data_processor_yaml.py benefits # Show YAML benefits")
|
||||||
|
print()
|
||||||
|
print("Benefits of YAML configurations:")
|
||||||
|
print(" ✅ Easier to manage complex configurations")
|
||||||
|
print(" ✅ Version control friendly")
|
||||||
|
print(" ✅ Self-documenting")
|
||||||
|
print(" ✅ Can still override with CLI args")
|
||||||
|
print(" ✅ Better for team collaboration")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,130 @@
|
|||||||
|
import yaml
|
||||||
|
import argparse
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Dict, Any, Optional
|
||||||
|
import logging
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
class ConfigManager:
|
||||||
|
"""Manages configuration loading from YAML files and command-line arguments"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.config = {}
|
||||||
|
|
||||||
|
def load_yaml_config(self, config_path: str) -> Dict[str, Any]:
|
||||||
|
"""Load configuration from YAML file"""
|
||||||
|
config_file = Path(config_path)
|
||||||
|
|
||||||
|
if not config_file.exists():
|
||||||
|
raise FileNotFoundError(f"Configuration file not found: {config_path}")
|
||||||
|
|
||||||
|
with open(config_file, 'r', encoding='utf-8') as f:
|
||||||
|
config = yaml.safe_load(f)
|
||||||
|
|
||||||
|
logger.info(f"Loaded configuration from: {config_path}")
|
||||||
|
return config
|
||||||
|
|
||||||
|
def merge_configs(self, yaml_config: Dict[str, Any], cli_args: Dict[str, Any]) -> Dict[str, Any]:
|
||||||
|
"""Merge YAML configuration with command-line arguments"""
|
||||||
|
merged_config = yaml_config.copy()
|
||||||
|
|
||||||
|
# Override YAML config with CLI args (CLI takes precedence)
|
||||||
|
for key, value in cli_args.items():
|
||||||
|
if value is not None: # Only override if CLI arg is provided
|
||||||
|
self._set_nested_value(merged_config, key, value)
|
||||||
|
|
||||||
|
return merged_config
|
||||||
|
|
||||||
|
def _set_nested_value(self, config: Dict[str, Any], key: str, value: Any):
|
||||||
|
"""Set a nested value in config using dot notation (e.g., 'training.batch_size')"""
|
||||||
|
keys = key.split('.')
|
||||||
|
current = config
|
||||||
|
|
||||||
|
for k in keys[:-1]:
|
||||||
|
if k not in current:
|
||||||
|
current[k] = {}
|
||||||
|
current = current[k]
|
||||||
|
|
||||||
|
current[keys[-1]] = value
|
||||||
|
|
||||||
|
def get_config_value(self, config: Dict[str, Any], key: str, default: Any = None) -> Any:
|
||||||
|
"""Get a nested value from config using dot notation"""
|
||||||
|
keys = key.split('.')
|
||||||
|
current = config
|
||||||
|
|
||||||
|
for k in keys:
|
||||||
|
if isinstance(current, dict) and k in current:
|
||||||
|
current = current[k]
|
||||||
|
else:
|
||||||
|
return default
|
||||||
|
|
||||||
|
return current
|
||||||
|
|
||||||
|
def create_argparser_with_yaml(self, description: str = "Pipeline with YAML configuration") -> argparse.ArgumentParser:
|
||||||
|
"""Create argument parser that supports YAML config files"""
|
||||||
|
parser = argparse.ArgumentParser(description=description)
|
||||||
|
|
||||||
|
# YAML configuration
|
||||||
|
parser.add_argument("--config", type=str, help="Path to YAML configuration file")
|
||||||
|
|
||||||
|
# Data source arguments
|
||||||
|
parser.add_argument("--data-source", choices=["huggingface", "custom"], help="Data source")
|
||||||
|
parser.add_argument("--dataset-name", type=str, help="HuggingFace dataset name")
|
||||||
|
parser.add_argument("--data-path", type=str, help="Path to custom data file")
|
||||||
|
parser.add_argument("--data-format", choices=["jsonl", "csv", "json"], help="Data format")
|
||||||
|
|
||||||
|
# Field mapping
|
||||||
|
parser.add_argument("--input-field", type=str, help="Input field name")
|
||||||
|
parser.add_argument("--label-field", type=str, help="Label field name")
|
||||||
|
|
||||||
|
# Processing options
|
||||||
|
parser.add_argument("--max-samples", type=int, help="Maximum samples to process")
|
||||||
|
parser.add_argument("--output-dir", type=str, help="Output directory")
|
||||||
|
|
||||||
|
# Model options
|
||||||
|
parser.add_argument("--model-name", type=str, help="Model name")
|
||||||
|
parser.add_argument("--max-length", type=int, help="Maximum sequence length")
|
||||||
|
|
||||||
|
# Training options
|
||||||
|
parser.add_argument("--num-epochs", type=int, help="Number of epochs")
|
||||||
|
parser.add_argument("--batch-size", type=int, help="Batch size")
|
||||||
|
parser.add_argument("--learning-rate", type=float, help="Learning rate")
|
||||||
|
|
||||||
|
# Inference options
|
||||||
|
parser.add_argument("--model-path", type=str, help="Path to saved model")
|
||||||
|
parser.add_argument("--device", choices=["auto", "cuda", "cpu"], help="Device")
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
parser.add_argument("--log-level", choices=["DEBUG", "INFO", "WARNING", "ERROR"], help="Log level")
|
||||||
|
|
||||||
|
return parser
|
||||||
|
|
||||||
|
def load_and_merge_config(self, config_path: Optional[str] = None, cli_args: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
|
||||||
|
"""Load YAML config and merge with CLI arguments"""
|
||||||
|
yaml_config = {}
|
||||||
|
|
||||||
|
if config_path:
|
||||||
|
yaml_config = self.load_yaml_config(config_path)
|
||||||
|
|
||||||
|
cli_args = cli_args or {}
|
||||||
|
|
||||||
|
# Filter out None values from CLI args
|
||||||
|
cli_args = {k: v for k, v in cli_args.items() if v is not None}
|
||||||
|
|
||||||
|
merged_config = self.merge_configs(yaml_config, cli_args)
|
||||||
|
|
||||||
|
logger.info("Configuration loaded and merged successfully")
|
||||||
|
return merged_config
|
||||||
|
|
||||||
|
|
||||||
|
def load_config_from_yaml(config_path: str) -> Dict[str, Any]:
|
||||||
|
"""Simple function to load config from YAML file"""
|
||||||
|
config_manager = ConfigManager()
|
||||||
|
return config_manager.load_yaml_config(config_path)
|
||||||
|
|
||||||
|
|
||||||
|
def create_config_from_yaml_and_cli(config_path: Optional[str] = None, **cli_args) -> Dict[str, Any]:
|
||||||
|
"""Create configuration from YAML file and CLI arguments"""
|
||||||
|
config_manager = ConfigManager()
|
||||||
|
return config_manager.load_and_merge_config(config_path, cli_args)
|
||||||
Reference in New Issue
Block a user