openlayer 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +34 -0
- data/examples/staging/.DS_Store +0 -0
- data/examples/staging/commit.yaml +2 -0
- data/examples/staging/model/model_config.yaml +12 -0
- data/examples/staging/validation/dataset_config.yaml +12 -0
- data/lib/openlayer/client.rb +48 -3
- data/lib/openlayer/object.rb +28 -0
- data/lib/openlayer/objects/project.rb +185 -0
- data/lib/openlayer/objects/project_version.rb +89 -0
- data/lib/openlayer/services/s3_presigned_client.rb +47 -0
- data/lib/openlayer/services/tar_file_helper.rb +55 -0
- data/lib/openlayer/version.rb +1 -1
- data/lib/openlayer.rb +6 -1
- data/openlayer.gemspec +4 -0
- metadata +68 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9124105239930d01d444266033af79f2e1d2a7e6048b587e13dc6cfa1d00a0c3
|
4
|
+
data.tar.gz: 869c8e6a79e351d2b5047272558e4b33fb7e794276731cfbe4e246410804d57b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaa1a3ec31f4dd6ef75ba1f3acd5d50cb49318ac899dd3ec0442ddbe332abebe1ff6c39b042f4cc9ec66b05bd59790baf4bcf2ebe26f601b36d823e228940f0a
|
7
|
+
data.tar.gz: 7d76c46e8c8b5d468a16421dc9d859c6768cdb1981afcd72b73cbfcfa307d3bdce1cd37f16066f4b46d7ab248ab1aef2cfe6f79ae20cee2ec0a72fc71fe667ed
|
data/README.md
CHANGED
@@ -13,6 +13,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
13
13
|
|
14
14
|
## Usage
|
15
15
|
|
16
|
+
### Inference Monitoring Mode
|
16
17
|
```ruby
|
17
18
|
client = Openlayer::Client.new(api_key: "YOUR_OPENLAYER_API_KEY")
|
18
19
|
inference_pipeline = client.inference_pipeline("YOUR_INFERENCE_PIPELINE_ID")
|
@@ -24,6 +25,39 @@ inference_pipeline.stream_data(
|
|
24
25
|
)
|
25
26
|
```
|
26
27
|
|
28
|
+
|
29
|
+
|
30
|
+
### Projects
|
31
|
+
#### Load Project
|
32
|
+
Loads an existing project from the Openlayer platform.
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
client = Openlayer::Client.new(api_key: "YOUR_OPENLAYER_API_KEY")
|
36
|
+
project = client.load_project(name: "your_project_name")
|
37
|
+
```
|
38
|
+
|
39
|
+
#### Development Mode for CI/CD
|
40
|
+
```ruby
|
41
|
+
client = Openlayer::Client.new(api_key: "YOUR_OPENLAYER_API_KEY")
|
42
|
+
project = client.load_project(name: "your_project_name")
|
43
|
+
|
44
|
+
|
45
|
+
project.add_dataset(file_path: "DATASET_FILE_PATH", dataset_config_file_path: "DATASET_CONFIG_FILE_PATH")
|
46
|
+
project.add_model(model_config_file_path: "MODEL_CONFIG_PATH")
|
47
|
+
project.commit(message: "This is a commit message")
|
48
|
+
version = project.push
|
49
|
+
|
50
|
+
version.wait_for_completion(timeout: 500)
|
51
|
+
version.print_test_report
|
52
|
+
|
53
|
+
if version.failing_test_count > 0:
|
54
|
+
puts "Failing pipeline due to failing goals."
|
55
|
+
exit(1)
|
56
|
+
```
|
57
|
+
|
58
|
+
- Check the example in `examples/staging` for what the YAMLs look like.
|
59
|
+
- Check the [Dataset Config](https://docs.openlayer.com/how-to-guides/write-dataset-configs/llm-dataset-config) and the [Model Config](https://docs.openlayer.com/how-to-guides/write-model-configs/llm-config) docs on Openlayer to see additional attributes for the configs.
|
60
|
+
|
27
61
|
## Development
|
28
62
|
|
29
63
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
Binary file
|
data/lib/openlayer/client.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "faraday"
|
4
|
+
require "faraday/multipart"
|
4
5
|
|
5
6
|
module Openlayer
|
6
7
|
class Client
|
@@ -14,19 +15,63 @@ module Openlayer
|
|
14
15
|
@stubs = stubs
|
15
16
|
end
|
16
17
|
|
18
|
+
def inference_pipeline(inference_pipeline_id)
|
19
|
+
InferencePipeline.new(self, inference_pipeline_id)
|
20
|
+
end
|
21
|
+
|
22
|
+
def load_project(name:)
|
23
|
+
Project.from_response self, connection.get("projects", project_search_params(name: name))
|
24
|
+
end
|
25
|
+
|
26
|
+
def presigned_url(object_name: nil, workspace_id: nil)
|
27
|
+
handle_response connection.post(
|
28
|
+
"storage/presigned-url?objectName=staging", presigned_url_params(object_name: object_name,
|
29
|
+
workspace_id: workspace_id)
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
def load_project_version(id:, payload: {})
|
34
|
+
ProjectVersion.from_response self, connection.post("projects/#{id}/versions", payload)
|
35
|
+
end
|
36
|
+
|
17
37
|
def connection
|
18
38
|
@connection ||= Faraday.new do |conn|
|
19
39
|
conn.url_prefix = BASE_URL
|
20
40
|
conn.request :authorization, "Bearer", api_key
|
21
41
|
conn.request :json
|
22
42
|
conn.response :json, content_type: "application/json"
|
23
|
-
conn.response :logger
|
24
43
|
conn.adapter adapter, @stubs
|
25
44
|
end
|
26
45
|
end
|
27
46
|
|
28
|
-
|
29
|
-
|
47
|
+
private
|
48
|
+
|
49
|
+
def project_search_params(name:)
|
50
|
+
{ version: "0.1.0a25", name: name }
|
51
|
+
end
|
52
|
+
|
53
|
+
def presigned_url_params(object_name: nil, workspace_id: nil)
|
54
|
+
{ "objectName": object_name, "workspaceId": workspace_id, version: "0.1.0a25" }.compact
|
55
|
+
end
|
56
|
+
|
57
|
+
def handle_response(response)
|
58
|
+
message = response.body["error"]
|
59
|
+
case response.status
|
60
|
+
when 200
|
61
|
+
response.body
|
62
|
+
when 401
|
63
|
+
raise Error, message
|
64
|
+
when 404
|
65
|
+
raise Error, message
|
66
|
+
when 422
|
67
|
+
raise Error, message
|
68
|
+
when 500
|
69
|
+
raise Error, message
|
70
|
+
when 200..299
|
71
|
+
response.body
|
72
|
+
else
|
73
|
+
raise Error, message
|
74
|
+
end
|
30
75
|
end
|
31
76
|
end
|
32
77
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
module Openlayer
|
5
|
+
class Object
|
6
|
+
def initialize(attributes)
|
7
|
+
@attributes = OpenStruct.new(attributes)
|
8
|
+
end
|
9
|
+
|
10
|
+
def method_missing(method, *args, &block)
|
11
|
+
method = snake_to_camel(method.to_s)
|
12
|
+
attribute = @attributes.send(method, *args, &block)
|
13
|
+
attribute.is_a?(Hash) ? Object.new(attribute) : attribute
|
14
|
+
end
|
15
|
+
|
16
|
+
def respond_to_missing?(_method, _include_private = false)
|
17
|
+
true
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def snake_to_camel(snake_str)
|
23
|
+
snake_str.split("_").each_with_index.map do |part, index|
|
24
|
+
index.zero? ? part : part.capitalize
|
25
|
+
end.join
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,185 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "fileutils"
|
4
|
+
require "find"
|
5
|
+
require "yaml"
|
6
|
+
require "pry"
|
7
|
+
|
8
|
+
module Openlayer
|
9
|
+
class Project < Object
|
10
|
+
class Error < StandardError; end
|
11
|
+
class NotFoundError < StandardError; end
|
12
|
+
class TarFileNotFoundError < StandardError; end
|
13
|
+
|
14
|
+
class CommitLengthError < StandardError
|
15
|
+
def message
|
16
|
+
"Commit message must be between 1 and 140 characters"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
attr_reader :client, :workspace_id,
|
21
|
+
:data_tarfile_path, :s3_presigned_body,
|
22
|
+
:commit_message, :project_path
|
23
|
+
|
24
|
+
REQUIRED_TARFILE_STRUCTURE = [
|
25
|
+
"staging/commit.yaml",
|
26
|
+
"staging/validation/dataset_config.yaml",
|
27
|
+
"staging/validation/dataset.csv",
|
28
|
+
"staging/model/model_config.yaml"
|
29
|
+
].freeze
|
30
|
+
|
31
|
+
COMMIT_LENGTH = (1..140).freeze
|
32
|
+
|
33
|
+
def self.from_response(client, response)
|
34
|
+
attributes_first_project = handle_response(response)&.dig("items")&.first
|
35
|
+
raise NotFoundError if attributes_first_project.nil?
|
36
|
+
|
37
|
+
new(client, attributes_first_project)
|
38
|
+
end
|
39
|
+
|
40
|
+
def initialize(client, attributes)
|
41
|
+
@client = client
|
42
|
+
super(attributes)
|
43
|
+
@data_tarfile_path = "#{Dir.home}/.openlayer/#{id}_staging.tar"
|
44
|
+
@project_path = "#{Dir.home}/.openlayer/#{id}"
|
45
|
+
init_staging_directories
|
46
|
+
end
|
47
|
+
|
48
|
+
def add_dataset(file_path:, dataset_config: nil, dataset_config_file_path: nil)
|
49
|
+
raise ArgumentError, "dataset config is required" if dataset_config.nil? && dataset_config_file_path.nil?
|
50
|
+
|
51
|
+
copy_file(file_path, "staging/validation/dataset.csv")
|
52
|
+
copy_or_create_config(dataset_config,
|
53
|
+
dataset_config_file_path,
|
54
|
+
"staging/validation/dataset_config.yaml")
|
55
|
+
end
|
56
|
+
|
57
|
+
def add_model(model_config: nil, model_config_file_path: nil)
|
58
|
+
raise ArgumentError, "model config is required" if model_config.nil? && model_config_file_path.nil?
|
59
|
+
|
60
|
+
copy_or_create_config(model_config,
|
61
|
+
model_config_file_path,
|
62
|
+
"staging/model/model_config.yaml")
|
63
|
+
end
|
64
|
+
|
65
|
+
def status
|
66
|
+
puts "Staging Area:"
|
67
|
+
Find.find(File.join(project_path, "/staging")) do |path|
|
68
|
+
puts path if File.file?(path)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def commit(message)
|
73
|
+
raise CommitLengthError unless COMMIT_LENGTH.include? message.length
|
74
|
+
|
75
|
+
@commit_message = message
|
76
|
+
commit_hash = {
|
77
|
+
"date": DateTime.now.strftime("%a %b %d %H:%M:%S %Y"),
|
78
|
+
"message": message
|
79
|
+
}
|
80
|
+
write_hash_to_file(commit_hash, "staging/commit.yaml")
|
81
|
+
end
|
82
|
+
|
83
|
+
def push
|
84
|
+
create_and_validate_tar_file
|
85
|
+
s3_client = create_s3_client
|
86
|
+
s3_client.post(s3_payload)
|
87
|
+
client.load_project_version(id: id, payload: version_payload)
|
88
|
+
end
|
89
|
+
|
90
|
+
private
|
91
|
+
|
92
|
+
def init_staging_directories
|
93
|
+
FileUtils.mkdir_p(File.join(project_path, "staging"))
|
94
|
+
FileUtils.mkdir_p(File.join(project_path, "staging/validation"))
|
95
|
+
FileUtils.mkdir_p(File.join(project_path, "staging/model"))
|
96
|
+
end
|
97
|
+
|
98
|
+
def copy_or_create_config(config_hash, config_file_path, destination)
|
99
|
+
if config_file_path.nil?
|
100
|
+
write_hash_to_file(config_hash, destination)
|
101
|
+
else
|
102
|
+
copy_file(config_file_path, destination)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
def copy_file(file_path, destination)
|
107
|
+
FileUtils.copy(file_path, File.join(project_path, destination))
|
108
|
+
end
|
109
|
+
|
110
|
+
def write_hash_to_file(hash, destination)
|
111
|
+
File.open(File.join(project_path, destination), "w") do |file|
|
112
|
+
file.write hash.to_yaml
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
def create_s3_client
|
117
|
+
@s3_presigned_body = client.presigned_url(workspace_id: workspace_id, object_name: "staging")
|
118
|
+
S3PresignedClient.new(s3_presigned_body)
|
119
|
+
end
|
120
|
+
|
121
|
+
def create_and_validate_tar_file
|
122
|
+
TarFileHelper.create_tar_from_folders([File.join(project_path, "staging")], data_tarfile_path)
|
123
|
+
validate_tarfile(data_tarfile_path)
|
124
|
+
end
|
125
|
+
|
126
|
+
def validate_tarfile(file_path)
|
127
|
+
raise TarFileNotFoundError unless File.exist?(file_path)
|
128
|
+
|
129
|
+
TarFileHelper.validate_structure(file_path, REQUIRED_TARFILE_STRUCTURE)
|
130
|
+
end
|
131
|
+
|
132
|
+
def s3_payload
|
133
|
+
{
|
134
|
+
"file" => Faraday::Multipart::FilePart.new(data_tarfile_path, "application/x-tar")
|
135
|
+
}
|
136
|
+
end
|
137
|
+
|
138
|
+
def version_payload
|
139
|
+
{
|
140
|
+
"storageUri": s3_presigned_body["storageUri"],
|
141
|
+
"commit": { "message": commit_message }
|
142
|
+
}
|
143
|
+
end
|
144
|
+
|
145
|
+
def self.handle_response(response)
|
146
|
+
message = response.body["error"]
|
147
|
+
case response.status
|
148
|
+
when 200
|
149
|
+
response.body
|
150
|
+
when 401
|
151
|
+
raise Error, message
|
152
|
+
when 404
|
153
|
+
raise Error, message
|
154
|
+
when 422
|
155
|
+
raise Error, message
|
156
|
+
when 500
|
157
|
+
raise Error, message
|
158
|
+
when 200..299
|
159
|
+
response.body
|
160
|
+
else
|
161
|
+
raise Error, message
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
def handle_response(response)
|
166
|
+
message = response.body["error"]
|
167
|
+
case response.status
|
168
|
+
when 200
|
169
|
+
response.body
|
170
|
+
when 401
|
171
|
+
raise Error, message
|
172
|
+
when 404
|
173
|
+
raise Error, message
|
174
|
+
when 422
|
175
|
+
raise Error, message
|
176
|
+
when 500
|
177
|
+
raise Error, message
|
178
|
+
when 200..299
|
179
|
+
response.body
|
180
|
+
else
|
181
|
+
raise Error, message
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
class ProjectVersion < Object
|
5
|
+
attr_reader :client, :project_version_id, :all_attributes_hash
|
6
|
+
|
7
|
+
def self.from_response(client, response)
|
8
|
+
attributes = handle_response(response)
|
9
|
+
new(client, attributes)
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(client, attributes)
|
13
|
+
@client = client
|
14
|
+
super(attributes)
|
15
|
+
@project_version_id = commit.projectVersionId
|
16
|
+
end
|
17
|
+
|
18
|
+
def print_status_report
|
19
|
+
puts "Status: #{status}"
|
20
|
+
puts "Status Message: #{status_message}" unless status_message.nil?
|
21
|
+
end
|
22
|
+
|
23
|
+
def print_test_report
|
24
|
+
puts "Failing Test Count: #{failing_test_count}"
|
25
|
+
puts "Passing Test Count: #{passing_test_count}"
|
26
|
+
puts "Total Test Count: #{total_test_count}"
|
27
|
+
end
|
28
|
+
|
29
|
+
def to_h
|
30
|
+
@attributes.to_h
|
31
|
+
end
|
32
|
+
|
33
|
+
def wait_for_completion(timeout: 300, interval: 10)
|
34
|
+
start_time = Time.now
|
35
|
+
while Time.now - start_time < timeout
|
36
|
+
refresh
|
37
|
+
break if status == "completed" || status == "failed"
|
38
|
+
|
39
|
+
sleep interval
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def refresh
|
44
|
+
@attributes = OpenStruct.new handle_response client.connection.get("versions/#{project_version_id}")
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def self.handle_response(response)
|
50
|
+
message = response.body["error"]
|
51
|
+
case response.status
|
52
|
+
when 200
|
53
|
+
response.body
|
54
|
+
when 401
|
55
|
+
raise Error, message
|
56
|
+
when 404
|
57
|
+
raise Error, message
|
58
|
+
when 422
|
59
|
+
raise Error, message
|
60
|
+
when 500
|
61
|
+
raise Error, message
|
62
|
+
when 200..299
|
63
|
+
response.body
|
64
|
+
else
|
65
|
+
raise Error, message
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def handle_response(response)
|
70
|
+
message = response.body["error"]
|
71
|
+
case response.status
|
72
|
+
when 200
|
73
|
+
response.body
|
74
|
+
when 401
|
75
|
+
raise Error, message
|
76
|
+
when 404
|
77
|
+
raise Error, message
|
78
|
+
when 422
|
79
|
+
raise Error, message
|
80
|
+
when 500
|
81
|
+
raise Error, message
|
82
|
+
when 200..299
|
83
|
+
response.body
|
84
|
+
else
|
85
|
+
raise Error, message
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
class S3PresignedClient
|
5
|
+
attr_reader :presigned_url, :payload_fields, :s3_conn
|
6
|
+
|
7
|
+
def initialize(presigned_url)
|
8
|
+
@presigned_url = presigned_url
|
9
|
+
@payload_fields = presigned_url["fields"]
|
10
|
+
@s3_conn = Faraday.new(url: presigned_url["url"]) do |f|
|
11
|
+
f.request :multipart
|
12
|
+
f.adapter :net_http
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def post(data)
|
17
|
+
handle_response @s3_conn.post("/", merge_fields(data))
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def merge_fields(data)
|
23
|
+
payload_fields.merge!(data)
|
24
|
+
end
|
25
|
+
|
26
|
+
def handle_response(response)
|
27
|
+
message = response.body["error"]
|
28
|
+
case response.status
|
29
|
+
when 200
|
30
|
+
return response
|
31
|
+
when 401
|
32
|
+
raise Error, message
|
33
|
+
when 404
|
34
|
+
raise Error, message
|
35
|
+
when 422
|
36
|
+
raise Error, message
|
37
|
+
when 500
|
38
|
+
raise Error, message
|
39
|
+
when 200..299
|
40
|
+
return response
|
41
|
+
else
|
42
|
+
raise Error, message
|
43
|
+
end
|
44
|
+
response
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rubygems/package"
|
4
|
+
require "fileutils"
|
5
|
+
require "zlib"
|
6
|
+
require "logger"
|
7
|
+
|
8
|
+
module Openlayer
|
9
|
+
class TarFileHelper
|
10
|
+
LOGGER = Logger.new($stdout)
|
11
|
+
|
12
|
+
def self.create_tar_from_folders(folders, tar_file_name)
|
13
|
+
File.open(tar_file_name, "wb") do |file|
|
14
|
+
Gem::Package::TarWriter.new(Zlib::GzipWriter.open(file)) do |tar|
|
15
|
+
folders.each do |folder|
|
16
|
+
base_name = File.basename(folder)
|
17
|
+
add_directory_to_tar(tar, folder, base_name)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.validate_structure(file_path, required_structure)
|
24
|
+
tarfile_structure = []
|
25
|
+
begin
|
26
|
+
Gem::Package::TarReader.new(Zlib::GzipReader.open(file_path)).each do |entry|
|
27
|
+
tarfile_structure << entry.full_name
|
28
|
+
end
|
29
|
+
rescue Zlib::GzipFile::Error => e
|
30
|
+
stacktrace = e.backtrace.join("\n")
|
31
|
+
LOGGER.error("ERROR: #{e.message}\n #{stacktrace}")
|
32
|
+
return nil
|
33
|
+
end
|
34
|
+
|
35
|
+
required_structure.each do |required_file|
|
36
|
+
raise Error, "Missing file: #{required_file}" unless tarfile_structure.include?(required_file)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.add_directory_to_tar(tar, folder, base_name)
|
41
|
+
Dir[File.join(folder, "**/*")].each do |file|
|
42
|
+
mode = File.stat(file).mode
|
43
|
+
relative_file = File.join(base_name, file.sub("#{folder}/", ""))
|
44
|
+
|
45
|
+
if File.directory?(file)
|
46
|
+
tar.mkdir(relative_file, mode)
|
47
|
+
else
|
48
|
+
tar.add_file_simple(relative_file, mode, File.size(file)) do |io|
|
49
|
+
File.open(file, "rb") { |f| io.write(f.read) }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
data/lib/openlayer/version.rb
CHANGED
data/lib/openlayer.rb
CHANGED
@@ -5,7 +5,12 @@ require_relative "openlayer/version"
|
|
5
5
|
module Openlayer
|
6
6
|
autoload :Client, "openlayer/client"
|
7
7
|
autoload :Error, "openlayer/error"
|
8
|
+
autoload :Object, "openlayer/object"
|
8
9
|
autoload :InferencePipeline, "openlayer/inference_pipeline"
|
10
|
+
autoload :S3PresignedClient, "openlayer/services/s3_presigned_client"
|
11
|
+
autoload :TarFileHelper, "openlayer/services/tar_file_helper"
|
9
12
|
|
10
|
-
#
|
13
|
+
# Classes used to return a nicer object wrapping the response data
|
14
|
+
autoload :Project, "openlayer/objects/project"
|
15
|
+
autoload :ProjectVersion, "openlayer/objects/project_version"
|
11
16
|
end
|
data/openlayer.gemspec
CHANGED
@@ -34,7 +34,11 @@ Gem::Specification.new do |spec|
|
|
34
34
|
|
35
35
|
# Uncomment to register a new dependency of your gem
|
36
36
|
# spec.add_dependency "example-gem", "~> 1.0"
|
37
|
+
spec.add_dependency "date"
|
37
38
|
spec.add_dependency "faraday", "~> 2.9.0"
|
39
|
+
spec.add_dependency "faraday-multipart"
|
40
|
+
spec.add_dependency "yaml"
|
41
|
+
spec.add_dependency "zlib"
|
38
42
|
|
39
43
|
# For more information and examples about making a new gem, check out our
|
40
44
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openlayer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jose Fernando Davila
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: date
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: faraday
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -24,6 +38,48 @@ dependencies:
|
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: 2.9.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday-multipart
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yaml
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: zlib
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
27
83
|
description: Openlayer api wrapper
|
28
84
|
email:
|
29
85
|
- davila.jose23@gmail.com
|
@@ -37,10 +93,19 @@ files:
|
|
37
93
|
- LICENSE
|
38
94
|
- README.md
|
39
95
|
- Rakefile
|
96
|
+
- examples/staging/.DS_Store
|
97
|
+
- examples/staging/commit.yaml
|
98
|
+
- examples/staging/model/model_config.yaml
|
99
|
+
- examples/staging/validation/dataset_config.yaml
|
40
100
|
- lib/openlayer.rb
|
41
101
|
- lib/openlayer/client.rb
|
42
102
|
- lib/openlayer/error.rb
|
43
103
|
- lib/openlayer/inference_pipeline.rb
|
104
|
+
- lib/openlayer/object.rb
|
105
|
+
- lib/openlayer/objects/project.rb
|
106
|
+
- lib/openlayer/objects/project_version.rb
|
107
|
+
- lib/openlayer/services/s3_presigned_client.rb
|
108
|
+
- lib/openlayer/services/tar_file_helper.rb
|
44
109
|
- lib/openlayer/version.rb
|
45
110
|
- openlayer.gemspec
|
46
111
|
- sig/openlayer.rbs
|
@@ -65,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
130
|
- !ruby/object:Gem::Version
|
66
131
|
version: '0'
|
67
132
|
requirements: []
|
68
|
-
rubygems_version: 3.3
|
133
|
+
rubygems_version: 3.5.3
|
69
134
|
signing_key:
|
70
135
|
specification_version: 4
|
71
136
|
summary: Openlayer api wrapper
|