lhoestq HF staff commited on
Commit
7375eb9
1 Parent(s): 6447366
Files changed (2) hide show
  1. generate.py +1 -1
  2. requirements.txt +3 -1
generate.py CHANGED
@@ -52,7 +52,7 @@ class Dataset(BaseModel):
52
  samples_generator_template = generate.json(model, Dataset, sampler=sampler)
53
 
54
  class Columns(BaseModel):
55
- columns: conset(Annotated[str, StringConstraints(pattern=r'[a-z0-9_]+')], min_length=2, max_length=len(Sample.model_fields)) # type: ignore
56
 
57
  columns_generator = generate.json(model, Columns, sampler=sampler)
58
 
 
52
  samples_generator_template = generate.json(model, Dataset, sampler=sampler)
53
 
54
  class Columns(BaseModel):
55
+ columns: conset(Annotated[str, StringConstraints(pattern=r'[a-z0-9_]+')], min_length=2, max_length=len(Sample.model_fields) - 1) # type: ignore
56
 
57
  columns_generator = generate.json(model, Columns, sampler=sampler)
58
 
requirements.txt CHANGED
@@ -3,4 +3,6 @@ outlines==0.0.37
3
  transformers
4
  torch
5
  ijson
6
- pydantic
 
 
 
3
  transformers
4
  torch
5
  ijson
6
+ pydantic
7
+ accelerate
8
+ datasets