Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

ConnectionError #227

Closed
UncleFB opened this issue Nov 27, 2023 · 4 comments
Closed

ConnectionError #227

UncleFB opened this issue Nov 27, 2023 · 4 comments

Comments

@UncleFB
Copy link

UncleFB commented Nov 27, 2023

Traceback (most recent call last):
File "/home/fubo/code/course/autoawq.py", line 13, in
model.quantize(tokenizer, quant_config=quant_config)
File "/home/fubo/.conda/envs/autoawq/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/fubo/.conda/envs/autoawq/lib/python3.10/site-packages/awq/models/base.py", line 49, in quantize
quantizer = AwqQuantizer(
File "/home/fubo/.conda/envs/autoawq/lib/python3.10/site-packages/awq/quantize/quantizer.py", line 27, in init
self.modules, self.module_kwargs, self.inps = self.init_quant()
File "/home/fubo/.conda/envs/autoawq/lib/python3.10/site-packages/awq/quantize/quantizer.py", line 302, in init_quant
samples = get_calib_dataset(
File "/home/fubo/.conda/envs/autoawq/lib/python3.10/site-packages/awq/utils/calib_data.py", line 11, in get_calib_dataset
dataset = load_dataset("mit-han-lab/pile-val-backup", split="validation")
File "/home/fubo/.conda/envs/autoawq/lib/python3.10/site-packages/datasets/load.py", line 2128, in load_dataset
builder_instance = load_dataset_builder(
File "/home/fubo/.conda/envs/autoawq/lib/python3.10/site-packages/datasets/load.py", line 1814, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/fubo/.conda/envs/autoawq/lib/python3.10/site-packages/datasets/load.py", line 1511, in dataset_module_factory
raise e1 from None
File "/home/fubo/.conda/envs/autoawq/lib/python3.10/site-packages/datasets/load.py", line 1467, in dataset_module_factory
raise ConnectionError(f"Couldn't reach '{path}' on the Hub ({type(e).name})")
ConnectionError: Couldn't reach 'mit-han-lab/pile-val-backup' on the Hub (SSLError)

@casper-hansen
Copy link
Owner

This looks like a networking error on your side. Perhaps your network is blocking Huggingface?

@mattmalcher
Copy link

Encountered this trying to use AutoAWQ in an environment not connected to the internet.

I think huggingface/datasets#3547 means that even with a populated cache with the required dataset you need an internet connection.

Workaround is to pass in the path to the relevant cache folder, for example:

model.quantize(
    tokenizer, 
    quant_config=quant_config,
    calib_data="<some path>/hub/datasets--mit-han-lab--pile-val-backup/snapshots/2f5e46ae6a69cf0dce4b12f78241c408936ca0e4",
    split = "validation"
    )

@lhoestq
Copy link

lhoestq commented Jan 29, 2024

Since the latest version of datasets 2.16 , is the cache is populated you don't need an internet connection to reload the dataset :)

@mattmalcher
Copy link

Oh - nice, I guess it must be some issue with my cache then, using datasets==2.16.1. Will have another go when I have a minute, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants