Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
feat(cloud.ai): rework ai training routes + notebook routes (#324)
Browse files Browse the repository at this point in the history
ref: MLS-1708
Rework AI Training Routes + Notebook routes

Signed-off-by: Adrien Carreira <[email protected]>
  • Loading branch information
XciD authored May 26, 2021
1 parent 1aa8f26 commit 1040f41
Show file tree
Hide file tree
Showing 16 changed files with 75 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiCapabilitiesTrainingFeatureV6', ($resource) => {
const resource = $resource('/cloud/project/:serviceName/ai/capabilities/training/feature', {
const resource = $resource('/cloud/project/:serviceName/ai/capabilities/feature', {
serviceName: '@serviceName',
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiCapabilitiesTrainingPresetImageV6', ($resource) => {
const resource = $resource('/cloud/project/:serviceName/ai/capabilities/training/presetImage', {
const resource = $resource('/cloud/project/:serviceName/ai/job/capabilities/presetImage', {
serviceName: '@serviceName',
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiCapabilitiesTrainingRegionV6', ($resource) => {
const resource = $resource('/cloud/project/:serviceName/ai/capabilities/training/region', {
const resource = $resource('/cloud/project/:serviceName/ai/capabilities/region', {
serviceName: '@serviceName',
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiCapabilitiesTrainingRegionGpuV6', ($resource) => $resource('/cloud/project/:serviceName/ai/capabilities/training/region/:region/gpu', {
.service('OvhApiCloudProjectAiCapabilitiesTrainingRegionGpuV6', ($resource) => $resource('/cloud/project/:serviceName/ai/capabilities/region/:region/gpu', {
serviceName: '@serviceName',
region: '@region',
}));
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiCapabilitiesTrainingRegionResourceV6', ($resource) => $resource('/cloud/project/:serviceName/ai/capabilities/training/region/:region/resource', {
.service('OvhApiCloudProjectAiCapabilitiesTrainingRegionResourceV6', ($resource) => $resource('/cloud/project/:serviceName/ai/capabilities/region/:region/resource', {
serviceName: '@serviceName',
region: '@region',
}));
1 change: 1 addition & 0 deletions src/api/cloud/project/ai/cloud-project-ai.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAi', ($injector) => ({
Serving: () => $injector.get('OvhApiCloudProjectAiServing'),
Notebook: () => $injector.get('OvhApiCloudProjectAiNotebook'),
Capabilities: () => $injector.get('OvhApiCloudProjectAiCapabilities'),
Training: () => $injector.get('OvhApiCloudProjectAiTraining'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiNotebookCapabilities', ($injector) => ({
Editor: () => $injector.get('OvhApiCloudProjectAiNotebookCapabilitiesEditor'),
Framework: () => $injector.get('OvhApiCloudProjectAiNotebookCapabilitiesFramework'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiNotebookCapabilitiesEditor', ($injector) => ({
v6: () => $injector.get('OvhApiCloudProjectAiNotebookCapabilitiesEditorV6'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiNotebookCapabilitiesEditorV6', ($resource) => {
const resource = $resource('/cloud/project/:serviceName/ai/notebook/capabilities/editor', {
serviceName: '@serviceName',
});

return resource;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiNotebookCapabilitiesFramework', ($injector) => ({
v6: () => $injector.get('OvhApiCloudProjectAiNotebookCapabilitiesFrameworkV6'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiNotebookCapabilitiesFrameworkV6', ($resource) => {
const resource = $resource('/cloud/project/:serviceName/ai/notebook/capabilities/framework', {
serviceName: '@serviceName',
});

return resource;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiNotebook', ($injector) => ({
v6: () => $injector.get('OvhApiCloudProjectAiNotebookV6'),
Capabilities: () => $injector.get('OvhApiCloudProjectAiNotebookCapabilities'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiNotebookV6', ($resource) => $resource('/cloud/project/:serviceName/ai/notebook/:notebookId', {
serviceName: '@serviceName',
notebookId: '@notebookId',
}, {
start: {
method: 'PUT',
url: '/cloud/project/:serviceName/ai/notebook/:notebookId/start',
},
stop: {
method: 'PUT',
url: '/cloud/project/:serviceName/ai/notebook/:notebookId/stop',
},
log: {
method: 'GET',
url: '/cloud/project/:serviceName/ai/notebook/:notebookId/log',
},
}));
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiTrainingAuthorizationV6', ($resource) => $resource('/cloud/project/:serviceName/ai/training/authorization', {
.service('OvhApiCloudProjectAiTrainingAuthorizationV6', ($resource) => $resource('/cloud/project/:serviceName/ai/authorization', {
serviceName: '@serviceName',
}, {
save: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiTrainingJobV6', ($resource) => $resource('/cloud/project/:serviceName/ai/training/job/:jobId', {
.service('OvhApiCloudProjectAiTrainingJobV6', ($resource) => $resource('/cloud/project/:serviceName/ai/job/:jobId', {
serviceName: '@serviceName',
jobId: '@jobId',
}, {
kill: {
method: 'POST',
url: '/cloud/project/:serviceName/ai/training/job/:jobId/kill',
method: 'PUT',
url: '/cloud/project/:serviceName/ai/job/:jobId/kill',
},
logs: {
method: 'GET',
url: '/cloud/project/:serviceName/ai/training/job/:jobId/logs',
url: '/cloud/project/:serviceName/ai/job/:jobId/logs',
},
log: {
method: 'GET',
url: '/cloud/project/:serviceName/ai/job/:jobId/log',
},
}));
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectAiTrainingRegistryV6', ($resource) => $resource('/cloud/project/:serviceName/ai/training/registry/:registryId', {
.service('OvhApiCloudProjectAiTrainingRegistryV6', ($resource) => $resource('/cloud/project/:serviceName/ai/registry/:registryId', {
serviceName: '@serviceName',
registryId: '@registryId',
}));

0 comments on commit 1040f41

Please sign in to comment.