How phongtrinhdinh/mi3390-research-and-development-of-a-pricing-system-for-used-laptops-based-on-nlp-and-ml works
This repository builds a used-laptop pricing platform: listings are crawled into raw storage, transformed through Bronze/Silver/Gold data stages, then used to train and evaluate a pricing model and save artifacts for prediction. The README documents MongoDB, S3, and scheduled ingestion; source excerpts and the index show the ETL and ML call structure. Some cloud wiring and crawler details are documented but not sampled, so those edges cite the README; future serving/UI capabilities are omitted because they are explicitly roadmap items.
Main entry points: silver_layer.py Silver Enrichment · main_etl.py ETL Orchestrator · trainer.py Training Pipeline · bronze_layer.py Bronze Ingestion
Components 24
Listing Ingestion
- Listing Spider
crawler/spiders/master_detail_spider.py - Listing Item
crawler/items.py - MongoDB Atlas
Medallion Lakehouse
- ETL Orchestrator
src/data_pipeline/main_etl.py - Bronze Ingestion
src/data_pipeline/bronze_layer.py - Bronze Parquet
- Silver Enrichment
src/data_pipeline/silver_layer.py - Extraction Patterns
src/data_pipeline/silver_patterns.py - Taxonomy Resolver
src/data_pipeline/taxonomy_resolver.py - Taxonomy Dictionary
docs/taxonomy_dictionary.json - Silver Parquet
- Gold Feature Engineering
src/data_pipeline/gold_layer.py - Gold Feature Dataset
- AWS S3 Lake
Pricing ML
- Training Pipeline
src/ml/trainer.py - Dataset Loader
src/ml/dataset.py - Bayesian Tuner
src/ml/tuner.py - Model Metrics
src/ml/metrics.py - Model Artifacts
src/ml/artifacts.py - Price Predictor
src/ml/predictor.py - ML Configuration
src/ml/config.py
Shared Runtime
- Spark Session Utility
src/utils/spark_utils.py - Logging Utility
src/utils/logger.py
Other components
- Chợ Tốt API
Connections 33
- Chợ Tốt API → Listing Spider: serves listings
README.md - Listing Spider → Listing Item: populates
crawler/spiders/master_detail_spider.py - Listing Spider → MongoDB Atlas: upserts listings
README.md - MongoDB Atlas → Bronze Ingestion: ingests raw
README.md - ETL Orchestrator → Bronze Ingestion: runs
src/data_pipeline/main_etl.py - ETL Orchestrator → Silver Enrichment: runs
src/data_pipeline/main_etl.py - ETL Orchestrator → Gold Feature Engineering: runs
src/data_pipeline/main_etl.py - Bronze Ingestion → Bronze Parquet: writes Parquet
README.md - Bronze Parquet → Silver Enrichment: reads raw
README.md - Silver Enrichment → Extraction Patterns: uses patterns
src/data_pipeline/silver_layer.py - Silver Enrichment → Taxonomy Resolver: resolves taxonomy
src/data_pipeline/silver_layer.py - Taxonomy Resolver → Taxonomy Dictionary: loads dictionary
src/data_pipeline/taxonomy_resolver.py - Silver Enrichment → Silver Parquet: writes enriched
src/data_pipeline/silver_layer.py - Silver Parquet → Gold Feature Engineering: reads features
README.md - Gold Feature Engineering → Gold Feature Dataset: writes features
src/data_pipeline/gold_layer.py - Gold Feature Dataset → AWS S3 Lake: syncs data
README.md - Training Pipeline → Dataset Loader: loads and splits
src/ml/trainer.py - Training Pipeline → Bayesian Tuner: tunes model
src/ml/trainer.py - Training Pipeline → Model Metrics: evaluates predictions
src/ml/trainer.py - Training Pipeline → Model Artifacts: saves model
src/ml/trainer.py - Price Predictor → Model Artifacts: loads model
src/ml/predictor.py - Price Predictor → Model Metrics: uses metrics
src/ml/predictor.py - Training Pipeline → ML Configuration: uses configuration
src/ml/trainer.py - Dataset Loader → ML Configuration: uses configuration
src/ml/dataset.py - Bayesian Tuner → ML Configuration: uses search settings
src/ml/tuner.py - ETL Orchestrator → Spark Session Utility: creates Spark session
src/data_pipeline/main_etl.py - Bronze Ingestion → Spark Session Utility: creates Spark session
src/data_pipeline/bronze_layer.py - Silver Enrichment → Spark Session Utility: creates Spark session
src/data_pipeline/silver_layer.py - Gold Feature Engineering → Spark Session Utility: creates Spark session
src/data_pipeline/gold_layer.py - ETL Orchestrator → Logging Utility: logs progress
src/data_pipeline/main_etl.py - Bronze Ingestion → Logging Utility: logs progress
src/data_pipeline/bronze_layer.py - Silver Enrichment → Logging Utility: logs progress
src/data_pipeline/silver_layer.py - Gold Feature Engineering → Logging Utility: logs progress
src/data_pipeline/gold_layer.py