refactor: reorganize project structure by moving core modules and update import paths in API server
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from train_module import train_model
|
||||
|
||||
def main():
|
||||
print("🚀 BẮT ĐẦU HUẤN LUYỆN MÔ HÌNH DECISION TREE (GPU & CACHE)")
|
||||
|
||||
params = {
|
||||
'bbox': [105.5, 9.2, 106.3, 10.0],
|
||||
'time_range': '2023-01-01/2023-04-30',
|
||||
'model_type': 'decision_tree',
|
||||
'feature_mode': 'extended',
|
||||
'use_cache': True,
|
||||
'use_gpu': True,
|
||||
'output_model_path': 'land_classification_model/model_decision_tree_auto.joblib', 'max_depth': 12
|
||||
}
|
||||
|
||||
try:
|
||||
res = train_model(**params)
|
||||
if res.get('success'):
|
||||
print(f"✅ Hoàn thành! Accuracy: {res.get('test_accuracy', 0.0):.4f}")
|
||||
else:
|
||||
print(f"❌ Thất bại: {res.get('error', 'Unknown')}")
|
||||
except Exception as e:
|
||||
print(f"❌ Lỗi: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user