DescribeImage¶
-
class
DescribeImage.DescribeImage(concurrency=1, concurrentTimeout=100.0, errorCol=None, handler=None, imageBytes=None, imageUrl=None, language=None, maxCandidates=None, outputCol=None, subscriptionKey=None, timeout=60.0, url=None)[source]¶ Bases:
mmlspark.Utils.ComplexParamsMixin,pyspark.ml.util.JavaMLReadable,pyspark.ml.util.JavaMLWritable,pyspark.ml.wrapper.JavaTransformerParameters: - concurrency (int) – max number of concurrent calls (default: 1)
- concurrentTimeout (double) – max number seconds to wait on futures if concurrency >= 1 (default: 100.0)
- errorCol (str) – column to hold http errors (default: [self.uid]_error)
- handler (object) – Which strategy to use when handling requests (default: UserDefinedFunction(<function2>,StringType,None))
- imageBytes (object) – bytestream of the image to use
- imageUrl (object) – the url of the image to use
- language (object) – Language of image description (default: ServiceParamData(None,Some(en)))
- maxCandidates (object) – Maximum candidate descriptions to return (default: ServiceParamData(None,Some(1)))
- outputCol (str) – The name of the output column (default: [self.uid]_output)
- subscriptionKey (object) – the API key to use
- timeout (double) – number of seconds to wait before closing the connection (default: 60.0)
- url (str) – Url of the service
-
getConcurrentTimeout()[source]¶ Returns: max number seconds to wait on futures if concurrency >= 1 (default: 100.0) Return type: double
-
getErrorCol()[source]¶ Returns: column to hold http errors (default: [self.uid]_error) Return type: str
-
getHandler()[source]¶ Returns: Which strategy to use when handling requests (default: UserDefinedFunction(<function2>,StringType,None)) Return type: object
-
getLanguage()[source]¶ Returns: Language of image description (default: ServiceParamData(None,Some(en))) Return type: object
-
getMaxCandidates()[source]¶ Returns: Maximum candidate descriptions to return (default: ServiceParamData(None,Some(1))) Return type: object
-
getOutputCol()[source]¶ Returns: The name of the output column (default: [self.uid]_output) Return type: str
-
getTimeout()[source]¶ Returns: number of seconds to wait before closing the connection (default: 60.0) Return type: double
-
setConcurrency(value)[source]¶ Parameters: concurrency (int) – max number of concurrent calls (default: 1)
-
setConcurrentTimeout(value)[source]¶ Parameters: concurrentTimeout (double) – max number seconds to wait on futures if concurrency >= 1 (default: 100.0)
-
setErrorCol(value)[source]¶ Parameters: errorCol (str) – column to hold http errors (default: [self.uid]_error)
-
setHandler(value)[source]¶ Parameters: handler (object) – Which strategy to use when handling requests (default: UserDefinedFunction(<function2>,StringType,None))
-
setLanguage(value)[source]¶ Parameters: language (object) – Language of image description (default: ServiceParamData(None,Some(en)))
-
setLanguageCol(value)[source]¶ Parameters: language (object) – Language of image description (default: ServiceParamData(None,Some(en)))
-
setMaxCandidates(value)[source]¶ Parameters: maxCandidates (object) – Maximum candidate descriptions to return (default: ServiceParamData(None,Some(1)))
-
setMaxCandidatesCol(value)[source]¶ Parameters: maxCandidates (object) – Maximum candidate descriptions to return (default: ServiceParamData(None,Some(1)))
-
setOutputCol(value)[source]¶ Parameters: outputCol (str) – The name of the output column (default: [self.uid]_output)
-
setParams(concurrency=1, concurrentTimeout=100.0, errorCol=None, handler=None, imageBytes=None, imageUrl=None, language=None, maxCandidates=None, outputCol=None, subscriptionKey=None, timeout=60.0, url=None)[source]¶ Set the (keyword only) parameters
Parameters: - concurrency (int) – max number of concurrent calls (default: 1)
- concurrentTimeout (double) – max number seconds to wait on futures if concurrency >= 1 (default: 100.0)
- errorCol (str) – column to hold http errors (default: [self.uid]_error)
- handler (object) – Which strategy to use when handling requests (default: UserDefinedFunction(<function2>,StringType,None))
- imageBytes (object) – bytestream of the image to use
- imageUrl (object) – the url of the image to use
- language (object) – Language of image description (default: ServiceParamData(None,Some(en)))
- maxCandidates (object) – Maximum candidate descriptions to return (default: ServiceParamData(None,Some(1)))
- outputCol (str) – The name of the output column (default: [self.uid]_output)
- subscriptionKey (object) – the API key to use
- timeout (double) – number of seconds to wait before closing the connection (default: 60.0)
- url (str) – Url of the service