class ModelDownloader extends Client
Class for downloading models from a server to Local or HDFS
- Alphabetic
- By Inheritance
- ModelDownloader
- Client
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ModelDownloader(spark: SparkSession, localPath: String, serverURL: String)
-
new
ModelDownloader(spark: SparkSession, localPath: URI, serverURL: URL = ModelDownloader.DefaultURL)
- spark
Spark session so that the downloader can save to HDFS
- localPath
path to a directory that will store the models (local or HDFS)
- serverURL
URL of the server which supplies models ( The default URL is subject to change)
Value Members
- def downloadByName(name: String): ModelSchema
-
def
downloadModel(model: ModelSchema): ModelSchema
Method to download a single model
Method to download a single model
- model
the remote model schema
- returns
the new local model schema with a URI that points to the model's location (on HDFS or local)
-
def
downloadModels(models: ArrayList[ModelSchema]): List[ModelSchema]
- models
A java iterator of remote model schemas for in the java api (for python wrapper)
- returns
A java List of local model schema whose URI's points to the model's location (on HDFS or local)
-
def
downloadModels(models: Iterable[ModelSchema] = remoteModels.asScala.toIterable): List[ModelSchema]
- models
An iterable of remote model schemas
- returns
An list of local model schema whose URI's points to the model's location (on HDFS or local)
-
def
localModels: Iterator[ModelSchema]
Function for querying the local repository for its registered models
Function for querying the local repository for its registered models
- returns
the model schemas found in the downloader's local path
- val localPath: URI
-
var
quiet: Boolean
- Definition Classes
- Client
-
def
remoteModels: Iterator[ModelSchema]
Function for querying the remote server for its registered models
Function for querying the remote server for its registered models
- returns
the model schemas found in remote repository accessed through the serverURL
-
def
repoTransfer[T <: Schema](schema: T, targetLocation: URI, source: Repository[T], target: Repository[T], overwrite: Boolean = false, closeStream: Boolean = true): T
- Definition Classes
- Client
- val serverURL: URL
- val spark: SparkSession