replicate-client 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/replicate-client/training.rb +34 -5
- data/lib/replicate-client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41640838ca41928bec457c4d1d15c6db9a72b04b8461d6b0827f57016c72bec3
|
4
|
+
data.tar.gz: 656d100154913dff9c7a91cda77a170fc8929eb1521fb2f67abda82191115712
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfee565e469de91d00a4ae6901995f4f7f311c6b9eec57f334c74fd67b15026168e6fd71b6e50f71487deb085eee6afb9369508f3511aa20395c8f321b77a5f1
|
7
|
+
data.tar.gz: f19e8a56c38d67c650acf91c787421b902b943b04cc645bae27851ee4801c245c0a2daead92517b6b60cdfaa9442f30d6484c265512720e97282c97ea60d7ea4
|
data/Gemfile.lock
CHANGED
@@ -125,12 +125,12 @@ module ReplicateClient
|
|
125
125
|
# The full model name in the format "owner/name".
|
126
126
|
#
|
127
127
|
# @return [String]
|
128
|
-
attr_accessor :
|
128
|
+
attr_accessor :model_full_name
|
129
129
|
|
130
130
|
# The version ID of the model being trained.
|
131
131
|
#
|
132
132
|
# @return [String]
|
133
|
-
attr_accessor :
|
133
|
+
attr_accessor :version_id
|
134
134
|
|
135
135
|
# The input data provided for the training.
|
136
136
|
#
|
@@ -150,9 +150,14 @@ module ReplicateClient
|
|
150
150
|
|
151
151
|
# The timestamp when the training was completed.
|
152
152
|
#
|
153
|
-
# @return [
|
153
|
+
# @return [Time, nil]
|
154
154
|
attr_accessor :completed_at
|
155
155
|
|
156
|
+
# The timestamp when the training was started.
|
157
|
+
#
|
158
|
+
# @return [Time, nil]
|
159
|
+
attr_accessor :started_at
|
160
|
+
|
156
161
|
# The logs generated during the training process.
|
157
162
|
#
|
158
163
|
# @return [String]
|
@@ -173,6 +178,11 @@ module ReplicateClient
|
|
173
178
|
# @return [Hash, nil]
|
174
179
|
attr_accessor :output
|
175
180
|
|
181
|
+
# The metrics generated during the training process.
|
182
|
+
#
|
183
|
+
# @return [Hash, nil]
|
184
|
+
attr_accessor :metrics
|
185
|
+
|
176
186
|
# Initialize a new training instance.
|
177
187
|
#
|
178
188
|
# @param attributes [Hash] The attributes of the training.
|
@@ -232,6 +242,20 @@ module ReplicateClient
|
|
232
242
|
reset_attributes(attributes)
|
233
243
|
end
|
234
244
|
|
245
|
+
# The model instance of the training.
|
246
|
+
#
|
247
|
+
# @return [ReplicateClient::Model]
|
248
|
+
def model
|
249
|
+
@model ||= ReplicateClient::Model.find(model_full_name, version_id: version_id)
|
250
|
+
end
|
251
|
+
|
252
|
+
# The version instance of the training.
|
253
|
+
#
|
254
|
+
# @return [ReplicateClient::Model::Version]
|
255
|
+
def version
|
256
|
+
@version ||= model.version
|
257
|
+
end
|
258
|
+
|
235
259
|
private
|
236
260
|
|
237
261
|
# Set the attributes of the training.
|
@@ -241,8 +265,8 @@ module ReplicateClient
|
|
241
265
|
# @return [void]
|
242
266
|
def reset_attributes(attributes)
|
243
267
|
@id = attributes["id"]
|
244
|
-
@
|
245
|
-
@
|
268
|
+
@model_full_name = attributes["model"]
|
269
|
+
@version_id = attributes["version"]
|
246
270
|
@input = attributes["input"]
|
247
271
|
@status = attributes["status"]
|
248
272
|
@created_at = attributes["created_at"]
|
@@ -251,6 +275,11 @@ module ReplicateClient
|
|
251
275
|
@error = attributes["error"]
|
252
276
|
@urls = attributes["urls"]
|
253
277
|
@output = attributes["output"]
|
278
|
+
@started_at = attributes["started_at"]
|
279
|
+
@metrics = attributes["metrics"]
|
280
|
+
|
281
|
+
@model = nil
|
282
|
+
@version = nil
|
254
283
|
end
|
255
284
|
end
|
256
285
|
end
|