Repositori ini berisi Proyek Konsep Bukti untuk Manajemen Studio Pembelajaran Mesin Azure .
Solusinya meliputi .NET Standard 2.0 Class Libraries ( DLL ), yang dapat dimasukkan dalam banyak aplikasi .NET dan digunakan untuk skala dan mengotomatiskan ruang kerja dan percobaan studio Azure ML.
Saat ini, proyek ini dalam fase pra -rilis - waspadai kemungkinan kesalahan dan pengecualian sebelum menggunakannya!
Gagasan membuat alat untuk mengelola Azure Machine Learning Studio lahir selama pertemuan dengan mitra kami Soneta/Enova365 .
Mitra kami sedang mencari solusi yang dapat membantu mengotomatisasi dan skala eksperimen di Azure ML Studio Portal. Setelah analisis awal dari alat yang tersedia, saya menemukan satu -satunya yang saya gunakan nanti sebagai basis untuk solusi saat ini ( Sumber: Modul PowerShell untuk Azure Machine Learning Studio & Web Services ) - Solusi ini dikembangkan untuk pengguna PowerShell, dan Implementasi Kode C# (SDK) membantu saya sebagai basis untuk membuat proyek ini.
Solusi ini dibuat untuk penggunaan sumber daya studio pembelajaran mesin Azure - ruang kerja, percobaan, basis data, modul, dll. Kami membutuhkan akun yang tepat untuk dapat bekerja dengan menggunakan pustaka ini.
Kami dapat membuat berbagai jenis ruang kerja, karena perpustakaan kami harus berurusan dengan segala jenis akun.
Kunjungi situs web utama Azure Machine Learning Studio dan cukup buat akun baru - https://studio.azureml.net/
Anda harus memperhatikan ini:

Atau, buat akun Azure dengan langganan.
Dan membuat ruang kerja dengan portal:




Azureml.studio.dll dan azureml.studio.core.dll adalah pustaka kelas yang ditulis dalam .NET Standard 2.0.
"Standar .NET adalah spesifikasi formal .NET API yang dimaksudkan untuk tersedia pada semua implementasi .NET. Motivasi di balik standar .NET adalah membangun keseragaman yang lebih besar dalam. NET Ekosistem. Ecma 335 terus membangun keseragaman. Liblir.
Anda dapat menggunakan DLL ini di Particluar, namun sebelum menggunakan tabel berikut dari semua versi .NET Standard dan platform yang didukung ( Sumber: .NET Standard ):
| .NET Standard | 1.0 | 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 2.0 |
|---|---|---|---|---|---|---|---|---|
| .NET Core | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 2.0 |
| .NET Framework | 4.5 | 4.5 | 4.5.1 | 4.6 | 4.6.1 | 4.6.1 | 4.6.1 | 4.6.1 |
| Mono | 4.6 | 4.6 | 4.6 | 4.6 | 4.6 | 4.6 | 4.6 | 5.4 |
| Xamarin.ios | 10.0 | 10.0 | 10.0 | 10.0 | 10.0 | 10.0 | 10.0 | 10.14 |
| Xamarin.mac | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.8 |
| Xamarin.android | 7.0 | 7.0 | 7.0 | 7.0 | 7.0 | 7.0 | 7.0 | 8.0 |
| Platform Windows universal | 10.0 | 10.0 | 10.0 | 10.0 | 10.0 | 10.0.16299 | 10.0.16299 | 10.0.16299 |
Anda mungkin memerlukan alat-alat seperti editor kode, IDE atau notepad, dan perpustakaan yang melaluinya Anda dapat membuat aplikasi .net. Dalam hal ini, saya menggunakan Visual Studio dengan kerangka kerja yang tepat untuk menjalankan aplikasi konsol sebagai contoh.
( dari sumber: https://github.com/hning86/azuremlps#configuration ):
ID Ruang Kerja

Token otorisasi ruang kerja

Lokasi


using AzureML . Studio . Core . Models ;
namespace AzureML . Studio . ConsoleApplicationExample
{
class Program
{
static void Main ( string [ ] args )
{
var studioClient = new StudioClient ( ) ;
var workspaceSettings = WorkspaceSettings ( ) ;
workspaceSettings . WorkspaceId = "XYZ" ;
workspaceSettings . AuthorizationToken = "######" ;
workspaceSettings . Location = "" ;
var workspace = studioClient . GetWorkspace ( workspaceSettings ) ;
.. .
.. .
} var workspace = studioClient . GetWorkspace ( workspaceSettings ) ; var workspace = studioClient . GetWorkspace ( "XYZ" , "######" , "" ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
var workspaces = studioClient . GetWorkspaces ( workspacesSettings ) ; var users = studioClient . GetWorkspaceUsers ( workspaceSettings ) ; var users = studioClient . GetWorkspaceUsers ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
var users = studioClient . GetWorkspaceUsers ( workspace ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
var workspaceUsersdictionary = studioClient . GetWorkspacesUsers ( workspacesSettings ) ; IEnumerable < Workspace > workspaces ;
var workspaceUsersdictionary = studioClient . GetWorkspacesUsers ( workspaces ) ; var workspaceUser = new WorkspaceUser (
new WorkspaceUserInternal ( ) {
User = new UserDetailInternal ( ) {
Email = "email" , Role = "role" } } ) ) ;
studioClient . AddUserToWorkspace ( workspaceSettings , workspaceUser ) ; studioClient . AddUserToWorkspace ( workspaceSettings , "email" , "role" ) ; studioClient . AddUserToWorkspace ( "XYZ" , "######" , "" , workspaceUser ) ; studioClient . AddUserToWorkspace ( "XYZ" , "######" , "" , "email" , "role" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . AddUserToWorkspace ( workspace , workspaceUser ) ; studioClient . AddUserToWorkspace ( workspace , "email" , "role" ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
var workspaceUser = new WorkspaceUser (
new WorkspaceUserInternal ( ) {
User = new UserDetailInternal ( ) {
Email = "email" , Role = "role" } } ) ) ;
studioClient . AddUserToWorkspaces ( workspacesSettings , workspaceUser ) ; studioClient . AddUserToWorkspaces ( workspacesSettings , "email" , "role" ) ; IEnumerable < Workspace > workspaces ;
studioClient . AddUserToWorkspaces ( workspaces , workspaceUser ) ; studioClient . AddUserToWorkspaces ( workspaces , "email" , "role" ) ; IEnumerable < WorkspaceUser > workspaceUsers ;
studioClient . AddUsersToWorkspace ( workspaceSettings , workspaceUsers ) ; studioClient . AddUsersToWorkspace ( "XYZ" , "######" , "" , workspaceUsers ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . AddUsersToWorkspace ( workspace , workspaceUsers ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
IEnumerable < WorkspaceUser > workspaceUsers ;
studioClient . AddUsersToWorkspaces ( workspacesSettings , workspaceUsers ) ; IEnumerable < Workspace > workspaces ;
studioClient . AddUsersToWorkspaces ( workspaces , workspaceUsers ) ; var datasets = studioClient . GetDatasetsFromWorkspace ( workspaceSettings ) ; var datasets = studioClient . GetDatasetsFromWorkspace ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
var datasets = studioClient . GetDatasetsFromWorkspace ( workspace ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
var workspaceDatasetsDictionary = studioClient . GetDatasetsFromWorkspaces ( workspacesSettings ) ; IEnumerable < Workspace > workspaces ;
var workspaceDatasetsDictionary = studioClient . GetDatasetsFromWorkspaces ( workspaces ) ; studioClient . DeleteDatasetFromWorkspace ( workspaceSettings , "datasetFamilyId" ) ; var dataset = new Dataset ( ) ;
dataset . FamilyId = "datasetFamilyId" ;
studioClient . DeleteDatasetFromWorkspace ( workspaceSettings , dataset ) ; studioClient . DeleteDatasetFromWorkspace ( "XYZ" , "######" , "" , dataset ) ; studioClient . DeleteDatasetFromWorkspace ( "XYZ" , "######" , "" , "datasetFamilyId" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . DeleteDatasetFromWorkspace ( workspace , "datasetFamilyId" ) studioClient . DeleteDatasetFromWorkspace ( workspace , dataset ) ; IEnumerable < Dataset > datasets ;
studioClient . DeleteDatasetsFromWorkspace ( workspaceSettings , datasets ) ; studioClient . DeleteDatasetsFromWorkspace ( "XYZ" , "######" , "" , datasets ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . DeleteDatasetsFromWorkspace ( workspace , datasets ) ; studioClient . DeleteAllDatasetsFromWorkspace ( workspaceSettings ) ; studioClient . DeleteAllDatasetsFromWorkspace ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . DeleteAllDatasetsFromWorkspace ( workspace ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
studioClient . DeleteAllDatasetsFromWorkspaces ( workspacesSettings ) ; IEnumerable < Workspace > workspaces ;
studioClient . DeleteAllDatasetsFromWorkspaces ( workspaces ) ; studioClient . DownloadDatasetFromWorkspace ( workspaceSettings , "datasetId" , "fileName" ) ; studioClient . DownloadDatasetFromWorkspace ( "XYZ" , "######" , "" , "datasetId" , "fileName" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . DownloadDatasetFromWorkspace ( workspace , "datasetId" , "fileName" ) ; var dataset = new Dataset ( ) ;
dataset . Id = "datasetId" ;
studioClient . DownloadDatasetFromWorkspace ( workspaceSettings , dataset , "fileName" ) ; studioClient . DownloadDatasetFromWorkspace ( "XYZ" , "######" , "" , dataset , "fileName" ) ; studioClient . DownloadDatasetFromWorkspace ( workspace , dataset , "fileName" ) ; IEnumerable < Dataset > datasets ;
studioClient . DownloadDatasetsFromWorkspace ( workspaceSettings , datasets ) ; studioClient . DownloadDatasetsFromWorkspace ( "XYZ" , "######" , "" , datasets ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . DownloadDatasetsFromWorkspace ( workspace , datasets ) ; studioClient . DownloadAllDatasetsFromWorkspace ( workspaceSettings ) ; studioClient . DownloadAllDatasetsFromWorkspace ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . DownloadAllDatasetsFromWorkspace ( workspace ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
studioClient . DownloadAllDatasetsFromWorkspaces ( workspacesSettings ) ; IEnumerable < Workspace > workspaces ;
studioClient . DownloadAllDatasetsFromWorkspaces ( workspaces ) ; Enum: ResourceFileFormat.CS
ResourceFileFormat resourceFileFormat ;
async studioClient . UploadResourceToWorkspace ( workspaceSettings , resourceFileFormat , " filePath " ) ; async studioClient . UploadResourceToWorkspace ( "XYZ" , "######" , "" , resourceFileFormat , "filePath" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
async studioClient . UploadResourceToWorkspace ( workspace , resourceFileFormat , " filePath " ) ; Enum: ResourceFileFormat.CS
IDictionary < string , ResourceFileFormat > filePathResourceFileFormatDict ;
studioClient . UploadResourcesToWorkspace ( workspaceSettings , filePathResourceFileFormatDict ) ; studioClient . UploadResourcesToWorkspace ( "XYZ" , "######" , "" , filePathResourceFileFormatDict ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . UploadResourcesToWorkspace ( workspace , filePathResourceFileFormatDict ) ; Enum: ResourceFileFormat.CS
IEnumerable < WorkspaceSettings > workspacesSettings ;
ResourceFileFormat resourceFileFormat ;
studioClient . UploadResourceToWorkspaces ( workspacesSettings , resourceFileFormat , "filePath" ) ; IEnumerable < Workspace > workspaces ;
studioClient . UploadResourceToWorkspaces ( workspaces , resourceFileFormat , "filePath" ) ; Enum: ResourceFileFormat.CS
IEnumerable < WorkspaceSettings > workspacesSettings ;
IDictionary < string , ResourceFileFormat > filePathResourceFileFormatDict ;
studioClient . UploadResourcesToWorkspaces ( workspacesSettings , filePathResourceFileFormatDict ) ; IEnumerable < Workspace > workspaces ;
studioClient . UploadResourcesToWorkspaces ( workspaces , filePathResourceFileFormatDict ) ; var experiment = studioClient . GetExperiment ( workspaceSettings , "experimentId" ) ; var experiment = studioClient . GetExperiment ( "XYZ" , "######" , "" , "experimentId" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
var experiment = studioClient . GetExperiment ( workspace , "experimentId" ) ; IEnumerable < string > experimentsIds ;
var experiments = studioClient . GetExperiments ( workspaceSettings , experimentsIds ) ; var experiments = studioClient . GetExperiments ( "XYZ" , "######" , "" , experimentsIds ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
var experiments = studioClient . GetExperiments ( workspace , experimentsIds ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
var workspaceExperimentsDict = studioClient . GetAllExperiments ( workspacesSettings ) ; IEnumerable < Workspace > workspaces ;
var workspaceExperimentsDict = studioClient . GetAllExperiments ( workspaces ) ; var experiments = studioClient . GetAllExperiments ( workspaceSettings ) ; var experiments = studioClient . GetAllExperiments ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
var experiments = studioClient . GetAllExperiments ( workspace ) ; studioClient . RunExperiment ( workspaceSettings , "experimentId" ) ; studioClient . RunExperiment ( "XYZ" , "######" , "" , "experimentId" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . RunExperiment ( workspace , "experimentId" ) ; var experiment = new Experiment ;
experiment . ExperimentId = "experimentId" ;
studioClient . RunExperiment ( workspaceSettings , experiment ) ; studioClient . RunExperiment ( "XYZ" , "######" , "" , experiment ) ; studioClient . RunExperiment ( workspace , experiment ) ; IEnumerable < string > experimentsIds ;
studioClient . RunExperiments ( workspaceSettings , experimentsIds ) ; studioClient . RunExperiments ( "XYZ" , "######" , "" , experimentsIds ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . RunExperiments ( workspace , experimentsIds ) ; IEnumerable < Experiment > experiments ;
studioClient . RunExperiments ( workspaceSettings , experiments ) ; studioClient . RunExperiments ( "XYZ" , "######" , "" , experiments ) ; studioClient . RunExperiments ( workspace , experiments ) ; studioClient . RunAllExperiments ( workspaceSettings ) ; studioClient . RunAllExperiments ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . RunAllExperiments ( workspace ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
studioClient . RunAllExperiments ( workspacesSettings ) ; IEnumerable < Workspace > workspaces ;
studioClient . RunAllExperiments ( workspaces ) ; studioClient . SaveExperiment ( workspaceSettings , "experimentId" ) ; studioClient . SaveExperiment ( "XYZ" , "######" , "" , "experimentId" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . SaveExperiment ( workspace , "experimentId" ) ; var experiment = new Experiment ;
experiment . ExperimentId = "experimentId" ;
studioClient . SaveExperiment ( workspaceSettings , experiment ) ; studioClient . SaveExperiment ( "XYZ" , "######" , "" , experiment ) ; studioClient . SaveExperiment ( workspace , experiment ) ; IEnumerable < string > experimentsIds ;
studioClient . SaveExperiments ( workspaceSettings , experimentsIds ) ; studioClient . SaveExperiments ( "XYZ" , "######" , "" , experimentsIds ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . SaveExperiments ( workspace , experimentsIds ) ; IEnumerable < Experiment > experiments ;
studioClient . SaveExperiments ( workspaceSettings , experiments ) ; studioClient . SaveExperiments ( "XYZ" , "######" , "" , experiments ) ; studioClient . SaveExperiments ( workspace , experiments ) ; studioClient . SaveAllExperiments ( workspaceSettings ) ; studioClient . SaveAllExperiments ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . SaveAllExperiments ( workspace ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
studioClient . SaveAllExperiments ( workspacesSettings ) ; IEnumerable < Workspace > workspaces ;
studioClient . SaveAllExperiments ( workspaces ) ; studioClient . SaveExperimentAs ( workspaceSettings , "experimentId" , "newName" ) ; studioClient . SaveExperimentAs ( "XYZ" , "######" , "" , "experimentId" , "newName" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . SaveExperimentAs ( workspace , "experimentId" , "newName" ) ; var experiment = new Experiment ;
experiment . ExperimentId = "experimentId" ;
studioClient . SaveExperimentAs ( workspaceSettings , experiment , "newName" ) ; studioClient . SaveExperimentAs ( "XYZ" , "######" , "" , experiment , "newName" ) ; studioClient . SaveExperimentAs ( workspace , experiment , "newName" ) ; studioClient . DeleteExperiment ( workspaceSettings , "experimentId" ) ; studioClient . DeleteExperiment ( "XYZ" , "######" , "" , "experimentId" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . DeleteExperiment ( workspace , "experimentId" ) ; var experiment = new Experiment ;
experiment . ExperimentId = "experimentId" ;
studioClient . DeleteExperiment ( workspaceSettings , experiment ) ; studioClient . DeleteExperiment ( "XYZ" , "######" , "" , experiment ) ; studioClient . DeleteExperiment ( workspace , experiment ) ; IEnumerable < string > experimentsIds ;
studioClient . DeleteExperiments ( workspaceSettings , experimentsIds ) ; studioClient . DeleteExperiments ( "XYZ" , "######" , "" , experimentsIds ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . DeleteExperiments ( workspace , experimentsIds ) ; IEnumerable < Experiment > experiments ;
studioClient . DeleteExperiments ( workspaceSettings , experiments ) ; studioClient . DeleteExperiments ( "XYZ" , "######" , "" , experiments ) ; studioClient . DeleteExperiments ( workspace , experiments ) ; studioClient . DeleteAllExperiments ( workspaceSettings ) ; studioClient . DeleteAllExperiments ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . DeleteAllExperiments ( workspace ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
studioClient . DeleteAllExperiments ( workspacesSettings ) ; IEnumerable < Workspace > workspaces ;
studioClient . DeleteAllExperiments ( workspaces ) ; studioClient . ExportExperiment ( workspaceSettings , "experimentId" ) ; studioClient . ExportExperiment ( "XYZ" , "######" , "" , "experimentId" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . ExportExperiment ( workspace , "experimentId" ) ; var experiment = new Experiment ;
experiment . ExperimentId = "experimentId" ;
studioClient . ExportExperiment ( workspaceSettings , experiment ) ; studioClient . ExportExperiment ( "XYZ" , "######" , "" , experiment ) ; studioClient . ExportExperiment ( workspace , experiment ) ; studioClient . ExportExperiment ( workspaceSettings , "experimentId" , "outputFilePath" ) ; studioClient . ExportExperiment ( "XYZ" , "######" , "" , "experimentId" , "outputFilePath" ) ; studioClient . ExportExperiment ( workspace , "experimentId" , "outputFilePath" ) ; studioClient . ExportExperiment ( workspaceSettings , experiment , "outputFilePath" ) ; studioClient . ExportExperiment ( "XYZ" , "######" , "" , experiment , "outputFilePath" ) ; studioClient . ExportExperiment ( workspace , experiment , "outputFilePath" ) ; IEnumerable < string > experimentsIds ;
studioClient . ExportExperiments ( workspaceSettings , experimentsIds ) ; studioClient . ExportExperiments ( "XYZ" , "######" , "" , experimentsIds ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . ExportExperiments ( workspace , experimentsIds ) ; IEnumerable < Experiment > experiments ;
studioClient . ExportExperiments ( workspaceSettings , experiments ) ; studioClient . ExportExperiments ( "XYZ" , "######" , "" , experiments ) ; studioClient . ExportExperiments ( workspace , experiments ) ; studioClient . ExportAllExperiments ( workspaceSettings ) ; studioClient . ExportAllExperiments ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . ExportAllExperiments ( workspace ) ; studioClient . ImportExperiment ( workspaceSettings , "inputFilePath" ) ; studioClient . ImportExperiment ( "XYZ" , "######" , "" , "inputFilePath" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . ImportExperiment ( workspace , "inputFilePath" ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
studioClient . ImportExperiment ( workspacesSettings , "inputFilePath" ) ; IEnumerable < Workspace > workspaces ;
studioClient . ImportExperiment ( workspaces , "inputFilePath" ) ; studioClient . ImportExperiment ( workspaceSettings , "inputFilePath" , "newName" ) ; studioClient . ImportExperiment ( "XYZ" , "######" , "" , "inputFilePath" , "newName" ) ; studioClient . ImportExperiment ( workspace , "inputFilePath" , "newName" ) ; studioClient . ImportExperiment ( workspacesSettings , "inputFilePath" , "newName" ) ; studioClient . ImportExperiment ( workspaces , "inputFilePath" , "newName" ) ; studioClient . CopyExperiment ( sourceWorkspaceSettings , "experimentId" , destinationWorkspaceSettings ) ; var experiment = new Experiment ;
experiment . ExperimentId = "experimentId" ;
studioClient . CopyExperiment ( sourceWorkspaceSettings , experiment , destinationWorkspaceSettings ) ; IEnumerable < string > experimentsIds ;
studioClient . CopyExperiments ( sourceWorkspaceSettings , experimentsIds , destinationWorkspaceSettings ) ; IEnumerable < Experiment > experiments ;
studioClient . CopyExperiments ( sourceWorkspaceSettings , experiments , destinationWorkspaceSettings ) ; studioClient . CopyAllExperiments ( sourceWorkspaceSettings , destinationWorkspaceSettings ) ; var userAsset = studioClient . GetTrainedModel ( workspaceSettings , "userAssetId" ) ; var userAsset = studioClient . GetTrainedModel ( "XYZ" , "######" , "" , "userAssetId" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
var userAsset = studioClient . GetTrainedModel ( workspace , "userAssetId" ) ; var userAssets = studioClient . GetTrainedModels ( workspaceSettings ) ; var userAssets = studioClient . GetTrainedModels ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
var userAssets = studioClient . GetTrainedModels ( workspace ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
var workspaceUserAssetsDict = studioClient . GetTrainedModels ( workspacesSettings ) ; IEnumerable < Workspace > workspaces ;
var workspaceUserAssetsDict = studioClient . GetTrainedModels ( workspaces ) ; var userAsset = studioClient . GetTransform ( workspaceSettings , "userAssetId" ) ; var userAsset = studioClient . GetTransform ( "XYZ" , "######" , "" , "userAssetId" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
var userAsset = studioClient . GetTransform ( workspace , "userAssetId" ) ; var userAssets = studioClient . GetTransforms ( workspaceSettings ) ; var userAssets = studioClient . GetTransforms ( "XYZ" , "######" , "" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
var userAssets = studioClient . GetTransforms ( workspace ) ; IEnumerable < WorkspaceSettings > workspacesSettings ;
var workspaceUserAssetsDict = studioClient . GetTransforms ( workspacesSettings ) ; IEnumerable < Workspace > workspaces ;
var workspaceUserAssetsDict = studioClient . GetTransforms ( workspaces ) ; studioClient . ModifyNodeParameter ( workspaceSettings , "experimentId" , "nodeNameComment" , "nodeParameterName" , "value" , "saveAs" ) ; studioClient . ModifyNodeParameter ( "XYZ" , "######" , "" , "experimentId" , "nodeNameComment" , "nodeParameterName" , "value" , "saveAs" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . ModifyNodeParameter ( workspace , "experimentId" , "nodeNameComment" , "nodeParameterName" , "value" , "saveAs" ) ; studioClient . ModifyNodeEdge ( workspaceSettings , "experimentId" , "sourceNodeComment" , "destinationNodeComment" , "saveAs" ) ; studioClient . ModifyNodeEdge ( "XYZ" , "######" , "" , "experimentId" , "sourceNodeComment" , "destinationNodeComment" , "saveAs" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . ModifyNodeEdge ( workspace , "experimentId" , "sourceNodeComment" , "destinationNodeComment" , "saveAs" ) ; studioClient . AddModule ( workspaceSettings , "experimentId" , "nameOfNewModule" , "saveAs" ) ; studioClient . AddModule ( "XYZ" , "######" , "" , "experimentId" , "nameOfNewModule" , "saveAs" ) ; var workspace = new Workspace ( ) ;
workspace . WorkspaceId = "XYZ" ;
workspace . AuthorizationToken . PrimaryToken = "######" ;
workspace . Region = "" ;
studioClient . AddModule ( workspace , "experimentId" , "nameOfNewModule" , "saveAs" ) ;Banyak baris kode yang hilang, namun pada keadaan ini Anda akan dapat melakukan banyak operasi dasar.
Ada proyek uji unit yang disertakan tetapi kosong dan akan selesai di iterasi pengembangan berikutnya. Sejauh ini saya telah menguji beberapa operasi penting dalam aplikasi konsol.
static void CopyExperimentFromWorkspaceToWorkspaceSamePricingSameRegion ( StudioClient studioClient )
{
var sourceWorkspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = "West Europe"
} ;
var destinationWorkspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = "West Europe"
} ;
//var experiments = studioClient.GetExperiments(sourceWorkspace);
var experimentId = "" ;
var experiment = studioClient . GetExperiment ( sourceWorkspace , experimentId ) ;
studioClient . CopyExperiment ( sourceWorkspace , experiment , destinationWorkspace ) ;
} static void CopyExperimentFromWorkspaceToWorkspaceDifferentPricingSameRegion ( StudioClient studioClient )
{
var sourceWorkspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = "West Europe"
} ;
var destinationWorkspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = "West Europe"
} ;
//var experiments = studioClient.GetExperiments(sourceWorkspace);
var experimentId = "" ;
var experiment = studioClient . GetExperiment ( sourceWorkspace , experimentId ) ;
studioClient . CopyExperiment ( sourceWorkspace , experiment , destinationWorkspace ) ;
} static void CopyExperimentFromWorkspaceToWorkspaceSamePricingDifferentRegion ( StudioClient studioClient )
{
var sourceWorkspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = "West Europe"
} ;
var destinationWorkspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = "West Europe"
} ;
//var experiments = studioClient.GetExperiments(sourceWorkspace);
var experimentId = "" ;
var experiment = studioClient . GetExperiment ( sourceWorkspace , experimentId ) ;
studioClient . ExportExperiment ( sourceWorkspace , experiment ) ;
var inputFilePath = @"C:...experimentFileName" ;
studioClient . ImportExperiment ( destinationWorkspace , inputFilePath , "Copied from other region" ) ;
} static void CopyExperimentFromWorkspaceToWorkspaceDifferentPricingDifferentRegion ( StudioClient studioClient )
{
var sourceWorkspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = "West Europe"
} ;
var destinationWorkspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = "West Europe"
} ;
//var experiments = studioClient.GetExperiments(sourceWorkspace);
var experimentId = "" ;
var experiment = studioClient . GetExperiment ( sourceWorkspace , experimentId ) ;
studioClient . ExportExperiment ( sourceWorkspace , experiment ) ;
var inputFilePath = @"C:...experimentFileName" ;
studioClient . ImportExperiment ( destinationWorkspace , inputFilePath , "Copied from other region" ) ;
}Seperti itulah tampilan portal:






Ubah nilai parameter simpul eksperimen dan menimpa eksperimen:
static void ModifyExperimentNodeAndOverwrite ( StudioClient studioClient )
{
var workspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = "West Europe"
} ;
//var experiments = studioClient.GetExperiments(sourceWorkspace);
var experimentId = "" ;
var experiment = studioClient . GetExperiment ( workspace , experimentId ) ;
studioClient . ModifyNodeParameter ( workspace , experimentId , "Import Data Comment" , "Database Query" , "SELECT Name, ProductNumber, CAST(Weight AS float) Weight r n FROM SalesLT.Product" ) ;
}Ubah nilai parameter simpul eksperimen dan menyimpan sebagai percobaan baru:
static void ModifyExperimentNodeAndSaveAsAnotherExperiment ( StudioClient studioClient )
{
var workspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = "West Europe"
} ;
//var experiments = studioClient.GetExperiments(sourceWorkspace);
var experimentId = "" ;
var experiment = studioClient . GetExperiment ( workspace , experimentId ) ;
studioClient . ModifyNodeParameter ( workspace , experimentId , "Import Data Comment" , "Database Query" , "SELECT Name, Color, CAST(Weight AS float) Weight r n FROM SalesLT.Product" , "Import Data - Experiment 2" ) ;
}Dari pandangan portal:




Ubah koneksi dalam modul (node) dan menimpa percobaan:
static void ModifyConnectionWithinTheModulesAndOverwrite ( StudioClient studioClient )
{
var workspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = ""
} ;
//var experiments = studioClient.GetExperiments(sourceWorkspace);
var experimentId = "" ;
var experiment = studioClient . GetExperiment ( workspace , experimentId ) ;
studioClient . ModifyNodeEdge ( workspace , experimentId , "CSV" , "Dataset" ) ;
}Ubah koneksi dalam modul (node) dan menabung sebagai percobaan baru:
static void ModifyConnectionWithinTheModulesAndSaveAsAnotherExperiment ( StudioClient studioClient )
{
var workspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = ""
} ;
//var experiments = studioClient.GetExperiments(sourceWorkspace);
var experimentId = "" ;
var experiment = studioClient . GetExperiment ( workspace , experimentId ) ;
studioClient . ModifyNodeEdge ( workspace , experimentId , "CSV" , "Dataset" , "Connect Modules - Experiment 2" ) ;
}Aaand dari tampilan portal:





Menambahkan modul baru ke dalam percobaan dan menimpanya:
static void AddModuleToTheExperimentAndOverwrite ( StudioClient studioClient )
{
var workspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = ""
} ;
//var experiments = studioClient.GetExperiments(sourceWorkspace);
var experimentId = "" ;
var experiment = studioClient . GetExperiment ( workspace , experimentId ) ;
var nameOfNewModule = "" ;
//nameOfNewModule hard-coded
//TODO: make a dictionary of <Module Names, Module IDs>
//EXAMPLES:
//Convert to TSV: 506153734175476c4f62416c57734963.1cdbcda42ece49088b87e6b636258d3d.v1-default-1644
//Convert to Dataset: 506153734175476c4f62416c57734963.72bf58e0fc874bb19704f1805003b975.v1-default-1642
studioClient . AddModule ( workspace , experimentId , nameOfNewModule ) ;
}Menambahkan modul baru ke percobaan dan menabung sebagai yang baru:
static void AddModuleToTheExperimentAndSaveAsAnotherExperiment ( StudioClient studioClient )
{
var workspace = new WorkspaceSettings ( )
{
WorkspaceId = "" ,
AuthorizationToken = "" ,
Location = ""
} ;
//var experiments = studioClient.GetExperiments(sourceWorkspace);
var experimentId = "" ;
var experiment = studioClient . GetExperiment ( workspace , experimentId ) ;
var nameOfNewModule = "" ;
//nameOfNewModule hard-coded
//TODO: make a dictionary of <Module Names, Module IDs>
//EXAMPLES:
//Convert to TSV: 506153734175476c4f62416c57734963.1cdbcda42ece49088b87e6b636258d3d.v1-default-1644
//Convert to Dataset: 506153734175476c4f62416c57734963.72bf58e0fc874bb19704f1805003b975.v1-default-1642
studioClient . AddModule ( workspace , experimentId , nameOfNewModule , "Connect Modules - Experiment 2" ) ;
}Kode Sumber Situs Web dan Tampilan Portal:


Ada banyak pemikiran yang saya miliki selama pengkodean solusi ini. Yang paling sulit untuk bersikap konsisten mengenai metode penamaan, kelas, atau bahkan menggambarkan ringkasan dari setiap contoh. Saya mencoba memastikan bahwa kode yang telah saya buat tidak akan menjadi spageti. Solusinya masih dalam pengembangan, dan dukungan berkelanjutan diperlukan! Tentu saja refactoring adalah suatu keharusan dalam banyak aspek dan beberapa prinsip harus diimplementasikan. Selain itu, beberapa metode masih menjadi misteri bagi saya, dan saya meninggalkannya di SDK ( Managementservice.cs ) - Anda perlu menemukannya!
Terlebih lagi, saya menemukan beberapa kesalahan portal itu sendiri. Bug -bug ini disembunyikan di suatu tempat dalam operasi salinan/penghematan tersebut.
Seperti yang saya tulis di The Begging-ini adalah versi pra-rilis yang berisi banyak kesalahan dan pengecualian yang tidak menangani (implementasi ini ada di daftar TODO saya). Menyadari!!!
Jangan ragu untuk berkontribusi, garpu, memodifikasi, bekerja sama. Saya harap perpustakaan ini akan membantu.