===== Running 00_check_environment.py ===== ===================== 00. Environment Check ===================== Python: 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] Platform: Linux-4.4.0-x86_64-with-glibc2.41 torch: 2.10.0+cpu CUDA available: False transformers: 5.8.1 Pillow: 12.2.0 환경 확인이 끝났습니다. ===== Running 01_tokenizer.py ===== ========================== 01. AutoTokenizer Practice ========================== Online tokenizer load failed, using local tiny tokenizer: We couldn't connect to 'https://huggingface.co' to load the files, and couldn't find them in the cached files. Check your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'. Tokenizer type: Using fast tokenizer: True Batch keys: ['input_ids', 'token_type_ids', 'attention_mask'] input_ids: shape=(2, 6) token_type_ids: shape=(2, 6) attention_mask: shape=(2, 6) Decoded with special tokens: ['[CLS] hello world [SEP] [PAD] [PAD]', '[CLS] this is a test [SEP]'] Decoded clean: ['hello world', 'this is a test'] Reloaded tokenizer type: Reloaded vocab size: 20 Reloaded input_ids shape: (1, 4) Saved files: ['tokenizer.json', 'tokenizer_config.json'] ===== Running 02_image_processor.py ===== [transformers] `ViTImageProcessor` requires torchvision (not installed); falling back to `ViTImageProcessorPil` for backward compatibility. Install torchvision to use the default backend, or import `ViTImageProcessorPil` directly to silence this warning. =============================== 02. AutoImageProcessor Practice =============================== Image path: /mnt/data/hf_processor_vscode/data/cat.jpg Original image size: (320, 240) Online image processor load failed, using local ViTImageProcessor: AutoImageProcessor requires the Torchvision library but it was not found in your environment. Check out the instructions on the installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment. Please note that you may need to restart your runtime after installation. ImageProcessor type: Batch keys: ['pixel_values'] pixel_values: shape=(1, 3, 224, 224), dtype=torch.float32 AutoImageProcessor local reload failed, using direct class reload: AutoImageProcessor requires the Torchvision library but it was not found in your environment. Check out the instructions on the installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment. Please note that you may need to restart your runtime after installation. Reloaded ImageProcessor type: Reloaded pixel_values shape: (1, 3, 224, 224) Saved files: ['preprocessor_config.json'] ===== Running 03_processor_clip.py ===== [transformers] `CLIPImageProcessor` requires torchvision (not installed); falling back to `CLIPImageProcessorPil` for backward compatibility. Install torchvision to use the default backend, or import `CLIPImageProcessorPil` directly to silence this warning. ================================= 03. AutoProcessor / CLIP Practice ================================= Cat image size: (320, 240) Dog image size: (320, 240) Online CLIP processor load failed, using local CLIPProcessor: We couldn't connect to 'https://huggingface.co' to load the files, and couldn't find them in the cached files. Check your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'. Online tokenizer load failed, using local tiny tokenizer: We couldn't connect to 'https://huggingface.co' to load the files, and couldn't find them in the cached files. Check your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'. Processor type: Tokenizer type: ImageProcessor type: Output keys: ['pixel_values', 'input_ids', 'token_type_ids', 'attention_mask'] pixel_values: shape=(2, 3, 224, 224), dtype=torch.float32 input_ids: shape=(2, 7), dtype=torch.int64 token_type_ids: shape=(2, 7), dtype=torch.int64 attention_mask: shape=(2, 7), dtype=torch.int64 Reloaded processor type: Reloaded keys: ['pixel_values', 'input_ids', 'token_type_ids', 'attention_mask'] Saved files: ['processor_config.json', 'tokenizer.json', 'tokenizer_config.json'] ===== Running 04_custom_image_processor_roundtrip.py ===== ==================================== 04. Custom ImageProcessor Round-trip ==================================== Original output shape: (1, 3, 224, 224) Saved files: ['image_processing_simple_vision.py', 'preprocessor_config.json'] Direct load type: Direct load max diff: 0.0 AutoImageProcessor load skipped/failed in this environment: AutoImageProcessor requires the Torchvision library but it was not found in your environment. Check out the instructions on the installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment. Please note that you may need to restart your runtime after installation. Round-trip 성공: 저장 전/후 전처리 결과가 같습니다. 모든 실습이 완료되었습니다.