@@ -99,25 +99,23 @@ class SyntheticTextDatasetConfig(StandardBaseModel):
9999
100100 @model_validator (mode = "after" )
101101 def check_prefix_options (self ) -> SyntheticTextDatasetConfig :
102- prefix_count : Any | None = None
103- prefix_tokens : Any | None = None
104102 if self .__pydantic_extra__ is not None :
105103 prefix_count = self .__pydantic_extra__ .get ("prefix_count" , None ) # type: ignore[attr-defined]
106104 prefix_tokens = self .__pydantic_extra__ .get ("prefix_tokens" , None ) # type: ignore[attr-defined]
107105
108- if ( prefix_count is not None or prefix_tokens is not None
109- and self .prefix_buckets ) :
110- raise ValueError (
111- "prefix_buckets is mutually exclusive"
112- " with prefix_count and prefix_tokens"
113- )
106+ if prefix_count is not None or prefix_tokens is not None :
107+ if self .prefix_buckets :
108+ raise ValueError (
109+ "prefix_buckets is mutually exclusive"
110+ " with prefix_count and prefix_tokens"
111+ )
114112
115- self .prefix_buckets = [
116- SyntheticTextPrefixBucketConfig (
117- prefix_count = prefix_count or 1 ,
118- prefix_tokens = prefix_tokens or 0 ,
119- )
120- ]
113+ self .prefix_buckets = [
114+ SyntheticTextPrefixBucketConfig (
115+ prefix_count = prefix_count or 1 ,
116+ prefix_tokens = prefix_tokens or 0 ,
117+ )
118+ ]
121119
122120 return self
123121
0 commit comments