Skip to content

HfUriError is occurring #52

Description

@y-vectorfield

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, 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions