abliteration 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module Abliteration
17
17
  class Author < ApiModelBase
18
+ # Same value as `author`; added for consistency with the other single-entity payloads.
19
+ attr_accessor :id
20
+
18
21
  attr_accessor :author
19
22
 
20
23
  attr_accessor :total_models
@@ -28,6 +31,7 @@ module Abliteration
28
31
  # Attribute mapping from ruby-style variable name to JSON key.
29
32
  def self.attribute_map
30
33
  {
34
+ :'id' => :'id',
31
35
  :'author' => :'author',
32
36
  :'total_models' => :'total_models',
33
37
  :'total_downloads' => :'total_downloads',
@@ -49,6 +53,7 @@ module Abliteration
49
53
  # Attribute type mapping.
50
54
  def self.openapi_types
51
55
  {
56
+ :'id' => :'String',
52
57
  :'author' => :'String',
53
58
  :'total_models' => :'Integer',
54
59
  :'total_downloads' => :'Integer',
@@ -80,6 +85,10 @@ module Abliteration
80
85
  h[k.to_sym] = v
81
86
  }
82
87
 
88
+ if attributes.key?(:'id')
89
+ self.id = attributes[:'id']
90
+ end
91
+
83
92
  if attributes.key?(:'author')
84
93
  self.author = attributes[:'author']
85
94
  end
@@ -121,6 +130,7 @@ module Abliteration
121
130
  def ==(o)
122
131
  return true if self.equal?(o)
123
132
  self.class == o.class &&
133
+ id == o.id &&
124
134
  author == o.author &&
125
135
  total_models == o.total_models &&
126
136
  total_downloads == o.total_downloads &&
@@ -137,7 +147,7 @@ module Abliteration
137
147
  # Calculates hash code according to all attributes.
138
148
  # @return [Integer] Hash code
139
149
  def hash
140
- [author, total_models, total_downloads, total_likes, first_seen_at].hash
150
+ [id, author, total_models, total_downloads, total_likes, first_seen_at].hash
141
151
  end
142
152
 
143
153
  # Builds the object from hash
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module Abliteration
17
17
  class AuthorDetail < ApiModelBase
18
+ # Same value as `author`; added for consistency with the other single-entity payloads.
19
+ attr_accessor :id
20
+
18
21
  attr_accessor :author
19
22
 
20
23
  attr_accessor :total_models
@@ -30,6 +33,7 @@ module Abliteration
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
31
34
  def self.attribute_map
32
35
  {
36
+ :'id' => :'id',
33
37
  :'author' => :'author',
34
38
  :'total_models' => :'total_models',
35
39
  :'total_downloads' => :'total_downloads',
@@ -52,6 +56,7 @@ module Abliteration
52
56
  # Attribute type mapping.
53
57
  def self.openapi_types
54
58
  {
59
+ :'id' => :'String',
55
60
  :'author' => :'String',
56
61
  :'total_models' => :'Integer',
57
62
  :'total_downloads' => :'Integer',
@@ -90,6 +95,10 @@ module Abliteration
90
95
  h[k.to_sym] = v
91
96
  }
92
97
 
98
+ if attributes.key?(:'id')
99
+ self.id = attributes[:'id']
100
+ end
101
+
93
102
  if attributes.key?(:'author')
94
103
  self.author = attributes[:'author']
95
104
  end
@@ -137,6 +146,7 @@ module Abliteration
137
146
  def ==(o)
138
147
  return true if self.equal?(o)
139
148
  self.class == o.class &&
149
+ id == o.id &&
140
150
  author == o.author &&
141
151
  total_models == o.total_models &&
142
152
  total_downloads == o.total_downloads &&
@@ -154,7 +164,7 @@ module Abliteration
154
164
  # Calculates hash code according to all attributes.
155
165
  # @return [Integer] Hash code
156
166
  def hash
157
- [author, total_models, total_downloads, total_likes, first_seen_at, models].hash
167
+ [id, author, total_models, total_downloads, total_likes, first_seen_at, models].hash
158
168
  end
159
169
 
160
170
  # Builds the object from hash
@@ -25,16 +25,44 @@ module Abliteration
25
25
 
26
26
  attr_accessor :license
27
27
 
28
+ attr_accessor :language
29
+
30
+ # Recent-window downloads reported by the Hub.
28
31
  attr_accessor :downloads
29
32
 
33
+ # All-time downloads reported by the Hub.
30
34
  attr_accessor :downloads_all
31
35
 
32
36
  attr_accessor :likes
33
37
 
38
+ attr_accessor :trending_score
39
+
40
+ # Server returns 0/1 (SQLite bool convention), not a JSON boolean.
34
41
  attr_accessor :gated
35
42
 
43
+ attr_accessor :main_size_bytes
44
+
45
+ # Human-formatted size (e.g. \"90.4 MB\").
46
+ attr_accessor :size_display
47
+
48
+ attr_accessor :age_days
49
+
50
+ # Server returns 0/1, not a JSON boolean.
51
+ attr_accessor :is_trending
52
+
53
+ # Server returns 0/1, not a JSON boolean.
54
+ attr_accessor :just_added
55
+
56
+ attr_accessor :description
57
+
58
+ attr_accessor :tags
59
+
60
+ attr_accessor :hf_url
61
+
36
62
  attr_accessor :created_at
37
63
 
64
+ attr_accessor :last_modified_at
65
+
38
66
  attr_accessor :first_seen_at
39
67
 
40
68
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -45,11 +73,22 @@ module Abliteration
45
73
  :'slug' => :'slug',
46
74
  :'category' => :'category',
47
75
  :'license' => :'license',
76
+ :'language' => :'language',
48
77
  :'downloads' => :'downloads',
49
78
  :'downloads_all' => :'downloads_all',
50
79
  :'likes' => :'likes',
80
+ :'trending_score' => :'trending_score',
51
81
  :'gated' => :'gated',
82
+ :'main_size_bytes' => :'main_size_bytes',
83
+ :'size_display' => :'size_display',
84
+ :'age_days' => :'age_days',
85
+ :'is_trending' => :'is_trending',
86
+ :'just_added' => :'just_added',
87
+ :'description' => :'description',
88
+ :'tags' => :'tags',
89
+ :'hf_url' => :'hf_url',
52
90
  :'created_at' => :'created_at',
91
+ :'last_modified_at' => :'last_modified_at',
53
92
  :'first_seen_at' => :'first_seen_at'
54
93
  }
55
94
  end
@@ -72,11 +111,22 @@ module Abliteration
72
111
  :'slug' => :'String',
73
112
  :'category' => :'String',
74
113
  :'license' => :'String',
114
+ :'language' => :'String',
75
115
  :'downloads' => :'Integer',
76
116
  :'downloads_all' => :'Integer',
77
117
  :'likes' => :'Integer',
118
+ :'trending_score' => :'Integer',
78
119
  :'gated' => :'Integer',
120
+ :'main_size_bytes' => :'Integer',
121
+ :'size_display' => :'String',
122
+ :'age_days' => :'Integer',
123
+ :'is_trending' => :'Integer',
124
+ :'just_added' => :'Integer',
125
+ :'description' => :'String',
126
+ :'tags' => :'Array<String>',
127
+ :'hf_url' => :'String',
79
128
  :'created_at' => :'String',
129
+ :'last_modified_at' => :'String',
80
130
  :'first_seen_at' => :'String'
81
131
  }
82
132
  end
@@ -88,11 +138,21 @@ module Abliteration
88
138
  :'slug',
89
139
  :'category',
90
140
  :'license',
141
+ :'language',
91
142
  :'downloads',
92
143
  :'downloads_all',
93
144
  :'likes',
145
+ :'trending_score',
94
146
  :'gated',
147
+ :'main_size_bytes',
148
+ :'size_display',
149
+ :'age_days',
150
+ :'is_trending',
151
+ :'just_added',
152
+ :'description',
153
+ :'hf_url',
95
154
  :'created_at',
155
+ :'last_modified_at',
96
156
  :'first_seen_at'
97
157
  ])
98
158
  end
@@ -133,6 +193,10 @@ module Abliteration
133
193
  self.license = attributes[:'license']
134
194
  end
135
195
 
196
+ if attributes.key?(:'language')
197
+ self.language = attributes[:'language']
198
+ end
199
+
136
200
  if attributes.key?(:'downloads')
137
201
  self.downloads = attributes[:'downloads']
138
202
  end
@@ -145,14 +209,56 @@ module Abliteration
145
209
  self.likes = attributes[:'likes']
146
210
  end
147
211
 
212
+ if attributes.key?(:'trending_score')
213
+ self.trending_score = attributes[:'trending_score']
214
+ end
215
+
148
216
  if attributes.key?(:'gated')
149
217
  self.gated = attributes[:'gated']
150
218
  end
151
219
 
220
+ if attributes.key?(:'main_size_bytes')
221
+ self.main_size_bytes = attributes[:'main_size_bytes']
222
+ end
223
+
224
+ if attributes.key?(:'size_display')
225
+ self.size_display = attributes[:'size_display']
226
+ end
227
+
228
+ if attributes.key?(:'age_days')
229
+ self.age_days = attributes[:'age_days']
230
+ end
231
+
232
+ if attributes.key?(:'is_trending')
233
+ self.is_trending = attributes[:'is_trending']
234
+ end
235
+
236
+ if attributes.key?(:'just_added')
237
+ self.just_added = attributes[:'just_added']
238
+ end
239
+
240
+ if attributes.key?(:'description')
241
+ self.description = attributes[:'description']
242
+ end
243
+
244
+ if attributes.key?(:'tags')
245
+ if (value = attributes[:'tags']).is_a?(Array)
246
+ self.tags = value
247
+ end
248
+ end
249
+
250
+ if attributes.key?(:'hf_url')
251
+ self.hf_url = attributes[:'hf_url']
252
+ end
253
+
152
254
  if attributes.key?(:'created_at')
153
255
  self.created_at = attributes[:'created_at']
154
256
  end
155
257
 
258
+ if attributes.key?(:'last_modified_at')
259
+ self.last_modified_at = attributes[:'last_modified_at']
260
+ end
261
+
156
262
  if attributes.key?(:'first_seen_at')
157
263
  self.first_seen_at = attributes[:'first_seen_at']
158
264
  end
@@ -183,11 +289,22 @@ module Abliteration
183
289
  slug == o.slug &&
184
290
  category == o.category &&
185
291
  license == o.license &&
292
+ language == o.language &&
186
293
  downloads == o.downloads &&
187
294
  downloads_all == o.downloads_all &&
188
295
  likes == o.likes &&
296
+ trending_score == o.trending_score &&
189
297
  gated == o.gated &&
298
+ main_size_bytes == o.main_size_bytes &&
299
+ size_display == o.size_display &&
300
+ age_days == o.age_days &&
301
+ is_trending == o.is_trending &&
302
+ just_added == o.just_added &&
303
+ description == o.description &&
304
+ tags == o.tags &&
305
+ hf_url == o.hf_url &&
190
306
  created_at == o.created_at &&
307
+ last_modified_at == o.last_modified_at &&
191
308
  first_seen_at == o.first_seen_at
192
309
  end
193
310
 
@@ -200,7 +317,7 @@ module Abliteration
200
317
  # Calculates hash code according to all attributes.
201
318
  # @return [Integer] Hash code
202
319
  def hash
203
- [id, author, slug, category, license, downloads, downloads_all, likes, gated, created_at, first_seen_at].hash
320
+ [id, author, slug, category, license, language, downloads, downloads_all, likes, trending_score, gated, main_size_bytes, size_display, age_days, is_trending, just_added, description, tags, hf_url, created_at, last_modified_at, first_seen_at].hash
204
321
  end
205
322
 
206
323
  # Builds the object from hash
@@ -14,10 +14,58 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Abliteration
17
- # The full dataset record, plus files and the passport when one exists.
18
17
  class DatasetDetail < ApiModelBase
19
18
  attr_accessor :id
20
19
 
20
+ attr_accessor :author
21
+
22
+ attr_accessor :slug
23
+
24
+ attr_accessor :category
25
+
26
+ attr_accessor :license
27
+
28
+ attr_accessor :language
29
+
30
+ # Recent-window downloads reported by the Hub.
31
+ attr_accessor :downloads
32
+
33
+ # All-time downloads reported by the Hub.
34
+ attr_accessor :downloads_all
35
+
36
+ attr_accessor :likes
37
+
38
+ attr_accessor :trending_score
39
+
40
+ # Server returns 0/1 (SQLite bool convention), not a JSON boolean.
41
+ attr_accessor :gated
42
+
43
+ attr_accessor :main_size_bytes
44
+
45
+ # Human-formatted size (e.g. \"90.4 MB\").
46
+ attr_accessor :size_display
47
+
48
+ attr_accessor :age_days
49
+
50
+ # Server returns 0/1, not a JSON boolean.
51
+ attr_accessor :is_trending
52
+
53
+ # Server returns 0/1, not a JSON boolean.
54
+ attr_accessor :just_added
55
+
56
+ attr_accessor :description
57
+
58
+ attr_accessor :tags
59
+
60
+ attr_accessor :hf_url
61
+
62
+ attr_accessor :created_at
63
+
64
+ attr_accessor :last_modified_at
65
+
66
+ attr_accessor :first_seen_at
67
+
68
+ # Per-file entries: path, type, size_bytes, is_lfs.
21
69
  attr_accessor :files
22
70
 
23
71
  attr_accessor :passport
@@ -26,6 +74,27 @@ module Abliteration
26
74
  def self.attribute_map
27
75
  {
28
76
  :'id' => :'id',
77
+ :'author' => :'author',
78
+ :'slug' => :'slug',
79
+ :'category' => :'category',
80
+ :'license' => :'license',
81
+ :'language' => :'language',
82
+ :'downloads' => :'downloads',
83
+ :'downloads_all' => :'downloads_all',
84
+ :'likes' => :'likes',
85
+ :'trending_score' => :'trending_score',
86
+ :'gated' => :'gated',
87
+ :'main_size_bytes' => :'main_size_bytes',
88
+ :'size_display' => :'size_display',
89
+ :'age_days' => :'age_days',
90
+ :'is_trending' => :'is_trending',
91
+ :'just_added' => :'just_added',
92
+ :'description' => :'description',
93
+ :'tags' => :'tags',
94
+ :'hf_url' => :'hf_url',
95
+ :'created_at' => :'created_at',
96
+ :'last_modified_at' => :'last_modified_at',
97
+ :'first_seen_at' => :'first_seen_at',
29
98
  :'files' => :'files',
30
99
  :'passport' => :'passport'
31
100
  }
@@ -45,6 +114,27 @@ module Abliteration
45
114
  def self.openapi_types
46
115
  {
47
116
  :'id' => :'String',
117
+ :'author' => :'String',
118
+ :'slug' => :'String',
119
+ :'category' => :'String',
120
+ :'license' => :'String',
121
+ :'language' => :'String',
122
+ :'downloads' => :'Integer',
123
+ :'downloads_all' => :'Integer',
124
+ :'likes' => :'Integer',
125
+ :'trending_score' => :'Integer',
126
+ :'gated' => :'Integer',
127
+ :'main_size_bytes' => :'Integer',
128
+ :'size_display' => :'String',
129
+ :'age_days' => :'Integer',
130
+ :'is_trending' => :'Integer',
131
+ :'just_added' => :'Integer',
132
+ :'description' => :'String',
133
+ :'tags' => :'Array<String>',
134
+ :'hf_url' => :'String',
135
+ :'created_at' => :'String',
136
+ :'last_modified_at' => :'String',
137
+ :'first_seen_at' => :'String',
48
138
  :'files' => :'Array<Object>',
49
139
  :'passport' => :'Passport'
50
140
  }
@@ -57,6 +147,13 @@ module Abliteration
57
147
  ])
58
148
  end
59
149
 
150
+ # List of class defined in allOf (OpenAPI v3)
151
+ def self.openapi_all_of
152
+ [
153
+ :'Dataset'
154
+ ]
155
+ end
156
+
60
157
  # Initializes the object
61
158
  # @param [Hash] attributes Model attributes in the form of hash
62
159
  def initialize(attributes = {})
@@ -77,6 +174,92 @@ module Abliteration
77
174
  self.id = attributes[:'id']
78
175
  end
79
176
 
177
+ if attributes.key?(:'author')
178
+ self.author = attributes[:'author']
179
+ end
180
+
181
+ if attributes.key?(:'slug')
182
+ self.slug = attributes[:'slug']
183
+ end
184
+
185
+ if attributes.key?(:'category')
186
+ self.category = attributes[:'category']
187
+ end
188
+
189
+ if attributes.key?(:'license')
190
+ self.license = attributes[:'license']
191
+ end
192
+
193
+ if attributes.key?(:'language')
194
+ self.language = attributes[:'language']
195
+ end
196
+
197
+ if attributes.key?(:'downloads')
198
+ self.downloads = attributes[:'downloads']
199
+ end
200
+
201
+ if attributes.key?(:'downloads_all')
202
+ self.downloads_all = attributes[:'downloads_all']
203
+ end
204
+
205
+ if attributes.key?(:'likes')
206
+ self.likes = attributes[:'likes']
207
+ end
208
+
209
+ if attributes.key?(:'trending_score')
210
+ self.trending_score = attributes[:'trending_score']
211
+ end
212
+
213
+ if attributes.key?(:'gated')
214
+ self.gated = attributes[:'gated']
215
+ end
216
+
217
+ if attributes.key?(:'main_size_bytes')
218
+ self.main_size_bytes = attributes[:'main_size_bytes']
219
+ end
220
+
221
+ if attributes.key?(:'size_display')
222
+ self.size_display = attributes[:'size_display']
223
+ end
224
+
225
+ if attributes.key?(:'age_days')
226
+ self.age_days = attributes[:'age_days']
227
+ end
228
+
229
+ if attributes.key?(:'is_trending')
230
+ self.is_trending = attributes[:'is_trending']
231
+ end
232
+
233
+ if attributes.key?(:'just_added')
234
+ self.just_added = attributes[:'just_added']
235
+ end
236
+
237
+ if attributes.key?(:'description')
238
+ self.description = attributes[:'description']
239
+ end
240
+
241
+ if attributes.key?(:'tags')
242
+ if (value = attributes[:'tags']).is_a?(Array)
243
+ self.tags = value
244
+ end
245
+ end
246
+
247
+ if attributes.key?(:'hf_url')
248
+ self.hf_url = attributes[:'hf_url']
249
+ end
250
+
251
+ if attributes.key?(:'created_at')
252
+ self.created_at = attributes[:'created_at']
253
+ end
254
+
255
+ if attributes.key?(:'last_modified_at')
256
+ self.last_modified_at = attributes[:'last_modified_at']
257
+ end
258
+
259
+ if attributes.key?(:'first_seen_at')
260
+ self.first_seen_at = attributes[:'first_seen_at']
261
+ end
262
+
80
263
  if attributes.key?(:'files')
81
264
  if (value = attributes[:'files']).is_a?(Array)
82
265
  self.files = value
@@ -109,6 +292,27 @@ module Abliteration
109
292
  return true if self.equal?(o)
110
293
  self.class == o.class &&
111
294
  id == o.id &&
295
+ author == o.author &&
296
+ slug == o.slug &&
297
+ category == o.category &&
298
+ license == o.license &&
299
+ language == o.language &&
300
+ downloads == o.downloads &&
301
+ downloads_all == o.downloads_all &&
302
+ likes == o.likes &&
303
+ trending_score == o.trending_score &&
304
+ gated == o.gated &&
305
+ main_size_bytes == o.main_size_bytes &&
306
+ size_display == o.size_display &&
307
+ age_days == o.age_days &&
308
+ is_trending == o.is_trending &&
309
+ just_added == o.just_added &&
310
+ description == o.description &&
311
+ tags == o.tags &&
312
+ hf_url == o.hf_url &&
313
+ created_at == o.created_at &&
314
+ last_modified_at == o.last_modified_at &&
315
+ first_seen_at == o.first_seen_at &&
112
316
  files == o.files &&
113
317
  passport == o.passport
114
318
  end
@@ -122,7 +326,7 @@ module Abliteration
122
326
  # Calculates hash code according to all attributes.
123
327
  # @return [Integer] Hash code
124
328
  def hash
125
- [id, files, passport].hash
329
+ [id, author, slug, category, license, language, downloads, downloads_all, likes, trending_score, gated, main_size_bytes, size_display, age_days, is_trending, just_added, description, tags, hf_url, created_at, last_modified_at, first_seen_at, files, passport].hash
126
330
  end
127
331
 
128
332
  # Builds the object from hash