Documentation ¶
Index ¶
- type Account
- type AccountSession
- func (s *AccountSession) CreateCredential(params CreateCredentialParams) (*Credential, error)
- func (s *AccountSession) GetCredentials(params GetCredentialsParams) (*Credentials, error)
- func (s *AccountSession) GetMachineLearningResources() (*Resources, error)
- func (s *AccountSession) GetMachineLearningResourcesWithEndpoint(nextURL *string) (*Resources, error)
- func (s *AccountSession) GetObjectStorageResources() (*Resources, error)
- func (s *AccountSession) GetObjectStorageResourcesWithEndpoint(nextURL *string) (*Resources, error)
- type Accounts
- type BluemixSubscriptions
- type ComputeConfiguration
- type Connection
- type ContentStatus
- type CosHmacKeys
- type CreateCredentialParams
- type Credential
- type CredentialSession
- func (s *CredentialSession) CancelRun(modelID string) error
- func (s *CredentialSession) DownloadDirs(bucket string, modelLocation string, modelID string, modelsToDownload []string) error
- func (s *CredentialSession) GetEndpointForBucket(bucket string) (string, error)
- func (s *CredentialSession) GetObject(bucket string, key string) (*s3.GetObjectOutput, error)
- func (s *CredentialSession) GetTrainingRun(modelID string) (*Model, error)
- func (s *CredentialSession) ListAllBucket() (*s3.ListBucketsExtendedOutput, error)
- func (s *CredentialSession) ListTrainingRuns() (*Models, error)
- func (s *CredentialSession) MonitorRun(modelID string, cb func(string)) error
- func (s *CredentialSession) StartTraining(trainingZip string, projectName string, bucket *s3.BucketExtended, ...) (*Model, error)
- type CredentialSet
- type Credentials
- type Entity
- type Error
- type ErrorMessage
- type Execution
- type Framework
- type GetCredentialsParams
- type HMACParameters
- type History
- type IdentityEndpoints
- type Linkages
- type Location
- type Metadata
- type Model
- type ModelDefinition
- type Models
- type OrganizationsRegion
- type PaymentMethod
- type PlanHistory
- type Resource
- type Resources
- type Runtimes
- type Session
- type SocketMessage
- type SocketMessageStatus
- type Status
- type Subscriptions
- type Target
- type TermsAndConditions
- type Token
- type TrainingDataReference
- type TrainingDef
- type TrainingDefinition
- type TrainingDefinitionRes
- type TrainingDefinitionVersion
- type TrainingResultsReference
- type TrainingRun
- type TrainingScriptRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountSession ¶
type AccountSession struct {
Token *Token
}
func (*AccountSession) CreateCredential ¶
func (s *AccountSession) CreateCredential(params CreateCredentialParams) (*Credential, error)
func (*AccountSession) GetCredentials ¶
func (s *AccountSession) GetCredentials(params GetCredentialsParams) (*Credentials, error)
func (*AccountSession) GetMachineLearningResources ¶
func (s *AccountSession) GetMachineLearningResources() (*Resources, error)
func (*AccountSession) GetMachineLearningResourcesWithEndpoint ¶
func (s *AccountSession) GetMachineLearningResourcesWithEndpoint(nextURL *string) (*Resources, error)
func (*AccountSession) GetObjectStorageResources ¶
func (s *AccountSession) GetObjectStorageResources() (*Resources, error)
func (*AccountSession) GetObjectStorageResourcesWithEndpoint ¶
func (s *AccountSession) GetObjectStorageResourcesWithEndpoint(nextURL *string) (*Resources, error)
type BluemixSubscriptions ¶
type BluemixSubscriptions struct { Type string `json:"type"` State string `json:"state"` PaymentMethod PaymentMethod `json:"payment_method"` SubscriptionID string `json:"subscription_id"` PartNumber string `json:"part_number"` SubscriptionTags []interface{} `json:"subscriptionTags"` PaygPendingTimestamp string `json:"payg_pending_timestamp"` History []interface{} `json:"history"` CurrentStateTimestamp string `json:"current_state_timestamp"` SoftlayerAccountID string `json:"softlayer_account_id"` BillingSystem string `json:"billing_system"` AdditionalCharges []interface{} `json:"additional_charges"` }
type ComputeConfiguration ¶
type ComputeConfiguration struct {
Name string `json:"name"`
}
type Connection ¶
type ContentStatus ¶
type ContentStatus struct {
State string `json:"state"`
}
type CosHmacKeys ¶
type CreateCredentialParams ¶
type CreateCredentialParams struct { Name string `json:"name"` Source string `json:"source"` Role string `json:"role"` Parameters HMACParameters `json:"parameters"` }
type Credential ¶
type Credential struct { ID string `json:"id"` GUID string `json:"guid"` URL string `json:"url"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` DeletedAt interface{} `json:"deleted_at"` CreatedBy string `json:"created_by"` UpdatedBy string `json:"updated_by"` DeletedBy string `json:"deleted_by"` SourceCrn string `json:"source_crn"` Name string `json:"name"` Role string `json:"role"` Crn string `json:"crn"` State string `json:"state"` AccountID string `json:"account_id"` ResourceGroupID string `json:"resource_group_id"` ResourceID string `json:"resource_id"` Credentials CredentialSet `json:"credentials"` IamCompatible bool `json:"iam_compatible"` Migrated bool `json:"migrated"` ResourceInstanceURL string `json:"resource_instance_url"` ResourceAliasURL interface{} `json:"resource_alias_url"` }
type CredentialSession ¶
type CredentialSession struct { Token *Token AccessKeyID string SecretAccessKey string InstanceID string URL string }
func AuthenticateFromCredentials ¶
func AuthenticateFromCredentials(wmlInstanceID, wmlAPIKey, wmlURL, cosAccessKey, cosSecretKey string) (*CredentialSession, error)
func AuthenticateFromFile ¶
func AuthenticateFromFile(filepath string) (*CredentialSession, error)
func (*CredentialSession) CancelRun ¶
func (s *CredentialSession) CancelRun(modelID string) error
func (*CredentialSession) DownloadDirs ¶
func (*CredentialSession) GetEndpointForBucket ¶
func (s *CredentialSession) GetEndpointForBucket(bucket string) (string, error)
func (*CredentialSession) GetObject ¶
func (s *CredentialSession) GetObject(bucket string, key string) (*s3.GetObjectOutput, error)
func (*CredentialSession) GetTrainingRun ¶
func (s *CredentialSession) GetTrainingRun(modelID string) (*Model, error)
func (*CredentialSession) ListAllBucket ¶
func (s *CredentialSession) ListAllBucket() (*s3.ListBucketsExtendedOutput, error)
func (*CredentialSession) ListTrainingRuns ¶
func (s *CredentialSession) ListTrainingRuns() (*Models, error)
func (*CredentialSession) MonitorRun ¶
func (s *CredentialSession) MonitorRun(modelID string, cb func(string)) error
func (*CredentialSession) StartTraining ¶
func (s *CredentialSession) StartTraining(trainingZip string, projectName string, bucket *s3.BucketExtended, output *s3.BucketExtended, steps int, gpu string, framework string, frameworkVersion string, pythonVersion string) (*Model, error)
type CredentialSet ¶
type CredentialSet struct { Apikey string `json:"apikey"` CosHmacKeys CosHmacKeys `json:"cos_hmac_keys"` Endpoints string `json:"endpoints"` IamApikeyDescription string `json:"iam_apikey_description"` IamApikeyName string `json:"iam_apikey_name"` IamRoleCrn string `json:"iam_role_crn"` IamServiceidCrn string `json:"iam_serviceid_crn"` ResourceInstanceID string `json:"resource_instance_id"` }
type Credentials ¶
type Credentials struct { RowsCount int `json:"rows_count"` NextURL interface{} `json:"next_url"` Resources []Credential `json:"resources"` }
type Entity ¶
type Entity struct { Name string `json:"name"` Type string `json:"type"` State string `json:"state"` Owner string `json:"owner"` OwnerUserid string `json:"owner_userid"` OwnerUniqueID string `json:"owner_unique_id"` OwnerIamID string `json:"owner_iam_id"` CustomerID string `json:"customer_id"` CountryCode string `json:"country_code"` CurrencyCode string `json:"currency_code"` BillingCountryCode string `json:"billing_country_code"` IsIBMer bool `json:"isIBMer"` TermsAndConditions TermsAndConditions `json:"terms_and_conditions"` MigratedState string `json:"migrated_state"` Tags []interface{} `json:"tags"` TeamDirectoryEnabled bool `json:"team_directory_enabled"` OrganizationsRegion []OrganizationsRegion `json:"organizations_region"` Linkages []Linkages `json:"linkages"` Subscriptions []Subscriptions `json:"subscriptions"` BluemixSubscriptions []BluemixSubscriptions `json:"bluemix_subscriptions"` SubscriptionID string `json:"subscription_id"` ConfigurationID string `json:"configuration_id"` Onboarded int `json:"onboarded"` }
type ErrorMessage ¶
type Execution ¶
type Execution struct { Command string `json:"command"` ComputeConfiguration ComputeConfiguration `json:"compute_configuration"` }
type GetCredentialsParams ¶
type HMACParameters ¶
type HMACParameters struct {
HMAC bool `json:"HMAC"`
}
type IdentityEndpoints ¶
type IdentityEndpoints struct { Issuer string `json:"issuer"` AuthorizationEndpoint string `json:"authorization_endpoint"` TokenEndpoint string `json:"token_endpoint"` PasscodeEndpoint string `json:"passcode_endpoint"` UserinfoEndpoint string `json:"userinfo_endpoint"` JwksURI string `json:"jwks_uri"` ResponseTypesSupported []string `json:"response_types_supported"` GrantTypesSupported []string `json:"grant_types_supported"` SubjectTypesSupported []string `json:"subject_types_supported"` TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"` IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"` ScopesSupported []string `json:"scopes_supported"` ClaimsSupported []string `json:"claims_supported"` }
func GetIdentityEndpoints ¶
func GetIdentityEndpoints() (*IdentityEndpoints, error)
type Model ¶
type Model struct { Metadata Metadata `json:"metadata"` Entity TrainingRun `json:"entity"` }
type ModelDefinition ¶
type OrganizationsRegion ¶
type PaymentMethod ¶
type PlanHistory ¶
type Resource ¶
type Resource struct { ID string `json:"id"` GUID string `json:"guid"` URL string `json:"url"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` DeletedAt interface{} `json:"deleted_at"` CreatedBy string `json:"created_by"` UpdatedBy string `json:"updated_by"` DeletedBy string `json:"deleted_by"` ScheduledReclaimAt interface{} `json:"scheduled_reclaim_at"` RestoredAt interface{} `json:"restored_at"` ScheduledReclaimBy string `json:"scheduled_reclaim_by"` RestoredBy string `json:"restored_by"` Name string `json:"name"` RegionID string `json:"region_id"` AccountID string `json:"account_id"` ResourcePlanID string `json:"resource_plan_id"` ResourceGroupID string `json:"resource_group_id"` ResourceGroupCrn string `json:"resource_group_crn"` TargetCrn string `json:"target_crn"` Crn string `json:"crn"` State string `json:"state"` Type string `json:"type"` ResourceID string `json:"resource_id"` DashboardURL string `json:"dashboard_url"` LastOperation interface{} `json:"last_operation"` ResourceAliasesURL string `json:"resource_aliases_url"` ResourceBindingsURL string `json:"resource_bindings_url"` ResourceKeysURL string `json:"resource_keys_url"` PlanHistory []PlanHistory `json:"plan_history"` Migrated bool `json:"migrated"` ControlledBy string `json:"controlled_by"` }
type Session ¶
type Session struct {
Token *Token
}
func Authenticate ¶
func (*Session) BindAccountToToken ¶
func (s *Session) BindAccountToToken(account Account) (*AccountSession, error)
func (*Session) GetAccounts ¶
type SocketMessage ¶
type SocketMessage struct {
Status SocketMessageStatus `json:"status"`
}
type SocketMessageStatus ¶
type Subscriptions ¶
type Subscriptions struct { PlanID string `json:"planId"` PartNumber string `json:"partNumber"` AccountID string `json:"accountId"` StartDate string `json:"startDate"` EndDate string `json:"endDate"` NumberOfInstancesAllowed string `json:"numberOfInstancesAllowed"` OrderReferenceNumber string `json:"orderReferenceNumber"` AddedBy string `json:"addedBy"` GUID string `json:"guid"` NumberOfInstancesProvisioned string `json:"numberOfInstancesProvisioned,omitempty"` }
type TermsAndConditions ¶
type TrainingDataReference ¶
type TrainingDataReference struct { Type string `json:"type"` Connection Connection `json:"connection"` Location Location `json:"location"` }
type TrainingDef ¶
type TrainingDef struct { Name string `json:"name"` Framework Framework `json:"framework"` TrainingDefinitionVersion TrainingDefinitionVersion `json:"training_definition_version"` }
type TrainingDefinition ¶
type TrainingDefinitionRes ¶
type TrainingDefinitionRes struct { Metadata Metadata `json:"metadata"` Entity TrainingDef `json:"entity"` }
type TrainingDefinitionVersion ¶
type TrainingDefinitionVersion struct { GUID string `json:"guid"` URL string `json:"url"` ContentURL string `json:"content_url"` ContentStatus ContentStatus `json:"content_status"` }
type TrainingResultsReference ¶
type TrainingResultsReference struct { Type string `json:"type"` Connection Connection `json:"connection"` Location Location `json:"location"` }
type TrainingRun ¶
type TrainingRun struct { ModelDefinition ModelDefinition `json:"model_definition"` TrainingDataReference TrainingDataReference `json:"training_data_reference"` TrainingResultsReference TrainingResultsReference `json:"training_results_reference"` Status Status `json:"status"` }
type TrainingScriptRes ¶
type TrainingScriptRes struct {
Ok string `json:"ok"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.