yb1n's picture
Upload folder using huggingface_hub
29d1fb6 verified
Raw
History Blame Contribute Delete
5.81 kB
===== 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: <class 'transformers.models.bert.tokenization_bert.BertTokenizer'>
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: <class 'transformers.models.bert.tokenization_bert.BertTokenizer'>
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: <class 'transformers.models.vit.image_processing_pil_vit.ViTImageProcessorPil'>
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: <class 'transformers.models.vit.image_processing_pil_vit.ViTImageProcessorPil'>
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: <class 'transformers.models.clip.processing_clip.CLIPProcessor'>
Tokenizer type: <class 'transformers.models.bert.tokenization_bert.BertTokenizer'>
ImageProcessor type: <class 'transformers.models.clip.image_processing_pil_clip.CLIPImageProcessorPil'>
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: <class 'transformers.models.clip.processing_clip.CLIPProcessor'>
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: <class 'hf_processor_practice.image_processing_simple_vision.SimpleVisionImageProcessor'>
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 ์„ฑ๊ณต: ์ €์žฅ ์ „/ํ›„ ์ „์ฒ˜๋ฆฌ ๊ฒฐ๊ณผ๊ฐ€ ๊ฐ™์Šต๋‹ˆ๋‹ค.
๋ชจ๋“  ์‹ค์Šต์ด ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.