Skip to content

create_hf_dataset optional argument model_n_ctx is not optional #354

Description

@stefan-apollo
def create_hf_dataset(
    dataset_config: HFDatasetConfig, model_n_ctx: Optional[int] = None
) -> Dataset:
    """[...]
        model_n_ctx (int): The max context length of the model. Used for HFDatasetConfigs. Data
            sequences are packed to dataset_config.n_ctx if it is not None and is <= model_n_ctx,
            otherwise to model_n_ctx.[...]
    """
    assert model_n_ctx is not None

assert model_n_ctx is not None fails when model_n_ctx is None, and it's at the first line of the function.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions