You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (Jira)" <ji...@apache.org> on 2019/09/16 20:32:00 UTC
[jira] [Resolved] (SPARK-22381) Add StringParam that supports valid
options
[ https://issues.apache.org/jira/browse/SPARK-22381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen resolved SPARK-22381.
-------------------------------
Resolution: Won't Fix
> Add StringParam that supports valid options
> -------------------------------------------
>
> Key: SPARK-22381
> URL: https://issues.apache.org/jira/browse/SPARK-22381
> Project: Spark
> Issue Type: New Feature
> Components: ML
> Affects Versions: 2.2.0
> Reporter: yuhao yang
> Priority: Minor
>
> During test with https://issues.apache.org/jira/browse/SPARK-22331, I found it might be a good idea to include the possible options in a StringParam.
> A StringParam extends Param[String] and allow user to specify the valid options in Array[String] (case insensitive).
> So far it can help achieve three goals:
> 1. Make the StringParam aware of its possible options and support native validations.
> 2. StringParam can list the supported options when user input wrong value.
> 3. allow automatic unit test coverage for case-insensitive String param
> and IMO it also decrease the code redundancy.
> The StringParam is designed to be completely compatible with existing Param[String], just adding the extra logic for supporting options, which means we don't need to convert all Param[String] to StringParam until we feel comfortable to do that.
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org