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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efa5152767827d0b6d95d1b83cf211c9dfb82d11885401c74394d6dbd068949e
4
- data.tar.gz: '040619b058d796d577bb7d1b75e21d84af4e1999b3ccebcc5b168ba5469241f6'
3
+ metadata.gz: 41640838ca41928bec457c4d1d15c6db9a72b04b8461d6b0827f57016c72bec3
4
+ data.tar.gz: 656d100154913dff9c7a91cda77a170fc8929eb1521fb2f67abda82191115712
5
5
  SHA512:
6
- metadata.gz: 706867512328515a36e3af092bdd9bfb39a633e476cd37b7c4afc9f3e492be7f427c61eedc58e4ccaa85f151c5a4e17291bdcbbe1e7dc5a627c366c85dbf3125
7
- data.tar.gz: 9a0c11660772e9f85f2e59676ce854cf9e2f4d79e2d8d701d6df6340bed17484a0297a13d1115eaed5d2b10a815be06d41feed24dce049ebdb7f2afd89ed6930
6
+ metadata.gz: dfee565e469de91d00a4ae6901995f4f7f311c6b9eec57f334c74fd67b15026168e6fd71b6e50f71487deb085eee6afb9369508f3511aa20395c8f321b77a5f1
7
+ data.tar.gz: f19e8a56c38d67c650acf91c787421b902b943b04cc645bae27851ee4801c245c0a2daead92517b6b60cdfaa9442f30d6484c265512720e97282c97ea60d7ea4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- replicate-client (0.1.3)
4
+ replicate-client (0.1.4)
5
5
  faraday (>= 1)
6
6
 
7
7
  GEM
@@ -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 :model
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 :version
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 [String, nil]
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
- @model = attributes["model"]
245
- @version = attributes["version"]
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReplicateClient
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: replicate-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Player