Summary
When we execute the Runner.calculate_perplexity method, HfUriError is occurring.
Environment
- OneComp 1.13.1
- Python 3.12.14
- datasets 5.0.1
What happend
Due to a change in how dataset repositories are specified, the method used in the source code no longer allows access.
|
def calculate_perplexity( |
|
self, |
|
original_model=False, |
|
dequantized_model=False, |
|
quantized_model=True, |
|
dataset_name="wikitext", |
|
dataset_config="wikitext-2-raw-v1", |
|
split="test", |
|
max_samples=None, |
|
max_length=2048, |
|
stride=2048, |
|
quantizer=None, |
|
): |
raise HfUriError(uri=raw, msg=f"Repository id must be 'namespace/name', got '{repo_id}'.")
huggingface_hub.errors.HfUriError: Invalid HF URI 'hf://datasets/wikitext@b08601e04326c79dfdd32d625aee71d232d685c3/.huggingface.yaml'. Repository id must be 'namespace/name', got 'wikitext'.
Suggested Fix
As indicated in the error message above, the specification should now be done using namespace/name.
def calculate_perplexity(
self,
original_model=False,
dequantized_model=False,
quantized_model=True,
- dataset_name="wikitext",
+ dataset_name="Salesforce/wikitext",
dataset_config="wikitext-2-raw-v1",
split="test",
max_samples=None,
max_length=2048,
stride=2048,
quantizer=None,
Summary
When we execute the Runner.calculate_perplexity method, HfUriError is occurring.
Environment
What happend
Due to a change in how dataset repositories are specified, the method used in the source code no longer allows access.
OneCompression/onecomp/runner.py
Lines 1258 to 1270 in 53c0be2
Suggested Fix
As indicated in the error message above, the specification should now be done using namespace/name.
def calculate_perplexity( self, original_model=False, dequantized_model=False, quantized_model=True, - dataset_name="wikitext", + dataset_name="Salesforce/wikitext", dataset_config="wikitext-2-raw-v1", split="test", max_samples=None, max_length=2048, stride=2048, quantizer=None,