Procházet zdrojové kódy

补充on_step_begin方法

lxylxy123321 před 1 týdnem
rodič
revize
3f8f4d755d
2 změnil soubory, kde provedl 12 přidání a 15 odebrání
  1. 3 0
      backend/app/engines/text_engine.py
  2. 9 15
      result.txt

+ 3 - 0
backend/app/engines/text_engine.py

@@ -337,6 +337,9 @@ class _ProgressCallback:
     def on_train_begin(self, args, state, control, **kwargs):
         pass
 
+    def on_step_begin(self, args, state, control, **kwargs):
+        pass
+
     def on_step_end(self, args, state, control, **kwargs):
         pass
 

+ 9 - 15
result.txt

@@ -1,23 +1,17 @@
-INFO:     172.19.0.3:49858 - "GET /api/v1/training/jobs HTTP/1.0" 200 OK
-2026-05-15 15:03:33 | INFO     | peft-platform | Job 509f2aec-4941-447f-bb01-8f5e18efc1f5 enqueued
-2026-05-15 15:03:33 | INFO     | peft-platform | Training job created: 509f2aec-4941-447f-bb01-8f5e18efc1f5
-INFO:     172.19.0.3:49870 - "POST /api/v1/training/jobs HTTP/1.0" 200 OK
-2026-05-15 15:03:33 | INFO     | peft-platform | Preprocessed 60 samples for sft/alpaca
-[transformers] `torch_dtype` is deprecated! Use `dtype` instead!
-2026-05-15 15:03:45 | WARNING  | fla.utils | Current Triton version 3.0.0 is below the recommended 3.2.0 version. Errors may occur and these issues will not be fixed. Please consider upgrading Triton.
-2026-05-15 15:03:45 | WARNING  | fla.utils | Current Python version 3.10 is below the recommended 3.11 version. It is recommended to upgrade to Python 3.11 or higher for the best experience.
-2026-05-15 15:03:50 | WARNING  | fla.ops.rwkv7.fused_addcmul | torch.compile is not available in Python 3.10, using identity decorator instead
+2026-05-15 15:46:34 | WARNING  | fla.utils | Current Triton version 3.0.0 is below the recommended 3.2.0 version. Errors may occur and these issues will not be fixed. Please consider upgrading Triton.
+2026-05-15 15:46:34 | WARNING  | fla.utils | Current Python version 3.10 is below the recommended 3.11 version. It is recommended to upgrade to Python 3.11 or higher for the best experience.
+2026-05-15 15:46:40 | WARNING  | fla.ops.rwkv7.fused_addcmul | torch.compile is not available in Python 3.10, using identity decorator instead
 /opt/conda/lib/python3.10/site-packages/torchvision/datapoints/__init__.py:12: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning().
   warnings.warn(_BETA_TRANSFORMS_WARNING)
 /opt/conda/lib/python3.10/site-packages/torchvision/transforms/v2/__init__.py:54: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning().
   warnings.warn(_BETA_TRANSFORMS_WARNING)
-Loading weights: 100%|██████████| 320/320 [00:00<00:00, 455.02it/s]
-2026-05-15 15:03:51 | INFO     | peft-platform | Loaded model: Qwen/Qwen3.5-0.8B
-Map: 100%|██████████| 60/60 [00:00<00:00, 1993.98 examples/s]
+Loading weights: 100%|██████████| 320/320 [00:00<00:00, 362.08it/s]
+2026-05-15 15:46:41 | INFO     | peft-platform | Loaded model: Qwen/Qwen3.5-0.8B
+Map: 100%|██████████| 60/60 [00:00<00:00, 2263.26 examples/s]
 /opt/conda/lib/python3.10/site-packages/peft/tuners/tuners_utils.py:1348: UserWarning: Model has `tie_word_embeddings=True` and a tied layer is part of the adapter, but `ensure_weight_tying` is not set to True. This can lead to complications, for example when merging the adapter or converting your model to formats other than safetensors. Check the discussion here: https://github.com/huggingface/peft/issues/2777
   warnings.warn(msg)
 [transformers] warmup_ratio is deprecated and will be removed in v5.2. Use `warmup_steps` instead.
 trainable params: 5,070,848 || all params: 757,463,872 || trainable%: 0.6695
-  0%|          | 0/12 [00:00<?, ?it/s]2026-05-15 15:04:05 | ERROR    | peft-platform | Training failed for job 509f2aec-4941-447f-bb01-8f5e18efc1f5: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length. Perhaps your features (`prompt` in this case) have excessive nesting (inputs type `list` where type `int` is expected).
-2026-05-15 15:04:05 | ERROR    | peft-platform | Job 509f2aec-4941-447f-bb01-8f5e18efc1f5 failed: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length. Perhaps your features (`prompt` in this case) have excessive nesting (inputs type `list` where type `int` is expected).
-INFO:     127.0.0.1:35744 - "GET /health HTTP/1.1" 200 OK
+  0%|          | 0/12 [00:00<?, ?it/s]2026-05-15 15:46:57 | ERROR    | peft-platform | Training failed for job 95169611-8cfc-445f-ab61-dee09ac711c6: '_ProgressCallback' object has no attribute 'on_step_begin'
+2026-05-15 15:46:57 | ERROR    | peft-platform | Job 95169611-8cfc-445f-ab61-dee09ac711c6 failed: '_ProgressCallback' object has no attribute 'on_step_begin'
+INFO:     127.0.0.1:49812 - "GET /health HTTP/1.1" 200 OK