Permalink
Browse files

Rename features to columns

  • Loading branch information...
deliahu committed Feb 9, 2019
1 parent d5f5d7c commit 10b1af2610497b571913fb15d1cf9fdbf173f527
Showing with 2,434 additions and 2,437 deletions.
  1. +36 −36 cli/cmd/get.go
  2. +61 −61 cli/cmd/init.go
  3. +16 −16 cli/cmd/status.go
  4. +14 −14 docs/applications/advanced/templates.md
  5. +8 −8 docs/applications/implementations/aggregators.md
  6. +6 −6 docs/applications/implementations/models.md
  7. +13 −13 docs/applications/implementations/transformers.md
  8. +8 −8 docs/applications/resources/aggregates.md
  9. +5 −5 docs/applications/resources/aggregators.md
  10. +1 −1 docs/applications/resources/apis.md
  11. +25 −25 docs/applications/resources/data-types.md
  12. +14 −14 docs/applications/resources/environments.md
  13. +10 −10 docs/applications/resources/models.md
  14. +2 −2 docs/applications/resources/overview.md
  15. +21 −21 docs/applications/resources/{raw-features.md → raw-columns.md}
  16. +17 −17 docs/applications/resources/{transformed-features.md → transformed-columns.md}
  17. +7 −7 docs/applications/resources/transformers.md
  18. +11 −11 docs/operator/cli.md
  19. +40 −40 docs/quick-start.md
  20. +2 −2 docs/summary.md
  21. +2 −1 examples/fraud/implementations/models/dnn.py
  22. +2 −1 examples/fraud/implementations/models/dnn_weighted.py
  23. +3 −3 examples/fraud/implementations/transformers/weight.py
  24. +33 −33 examples/fraud/resources/features.yaml
  25. +5 −5 examples/fraud/resources/models.yaml
  26. +154 −0 examples/fraud/resources/raw_columns.yaml
  27. +0 −154 examples/fraud/resources/raw_features.yaml
  28. +12 −12 examples/fraud/resources/templates.yaml
  29. +3 −3 examples/fraud/resources/transformers.yaml
  30. +19 −19 examples/insurance/resources/features.yaml
  31. +2 −2 examples/insurance/resources/models.yaml
  32. +2 −2 examples/iris/implementations/models/dnn.py
  33. +9 −9 examples/iris/resources/aggregates.yaml
  34. +10 −10 examples/iris/resources/environments.yaml
  35. +2 −2 examples/iris/resources/models.yaml
  36. +10 −10 examples/iris/resources/{raw_features.yaml → raw_columns.yaml}
  37. +10 −10 examples/iris/resources/{transformed_features.yaml → transformed_columns.yaml}
  38. +2 −2 examples/mnist/implementations/models/dnn.py
  39. +6 −6 examples/mnist/resources/models.yaml
  40. +11 −0 examples/mnist/resources/raw_columns.yaml
  41. +0 −11 examples/mnist/resources/raw_features.yaml
  42. +2 −2 examples/mnist/resources/{transformed_features.yaml → transformed_columns.yaml}
  43. +3 −3 examples/mnist/resources/transformers.yaml
  44. +5 −5 examples/poker/implementations/models/dnn.py
  45. +2 −2 examples/poker/resources/models.yaml
  46. +22 −22 examples/poker/resources/{raw_features.yaml → raw_columns.yaml}
  47. +2 −2 examples/reviews/implementations/aggregators/max_length.py
  48. +3 −3 examples/reviews/implementations/aggregators/vocab.py
  49. +4 −2 examples/reviews/implementations/models/sentiment_linear.py
  50. +3 −3 examples/reviews/resources/aggregates.yaml
  51. +4 −4 examples/reviews/resources/aggregators.yaml
  52. +4 −4 examples/reviews/resources/environments.yaml
  53. +4 −4 examples/reviews/resources/models.yaml
  54. +7 −0 examples/reviews/resources/raw_columns.yaml
  55. +0 −7 examples/reviews/resources/raw_features.yaml
  56. +4 −4 examples/reviews/resources/{transformed_features.yaml → transformed_columns.yaml}
  57. +3 −3 examples/reviews/resources/transformers.yaml
  58. +67 −67 pkg/aggregators/aggregators.yaml
  59. +2 −2 pkg/aggregators/bucket_boundaries.py
  60. +2 −2 pkg/aggregators/class_distribution.py
  61. +2 −2 pkg/aggregators/index_string.py
  62. +122 −0 pkg/api/context/columns.go
  63. +96 −0 pkg/api/context/columns_test.go
  64. +29 −29 pkg/api/context/context.go
  65. +15 −15 pkg/api/context/data_types_test.go
  66. +21 −21 pkg/api/context/dependencies.go
  67. +0 −122 pkg/api/context/features.go
  68. +0 −96 pkg/api/context/features_test.go
  69. +3 −3 pkg/api/context/models.go
  70. +88 −0 pkg/api/context/raw_columns.go
  71. +0 −88 pkg/api/context/raw_features.go
  72. +35 −35 pkg/api/context/serialize.go
  73. +13 −13 pkg/api/context/{transformed_features.go → transformed_columns.go}
  74. +4 −4 pkg/api/resource/status.go
  75. +24 −24 pkg/api/resource/type.go
  76. +2 −2 pkg/api/userconfig/aggregates.go
  77. +35 −35 pkg/api/userconfig/{feature_type.go → column_type.go}
  78. +98 −0 pkg/api/userconfig/columns.go
  79. +55 −55 pkg/api/userconfig/config.go
  80. +18 −17 pkg/api/userconfig/config_key.go
  81. +12 −12 pkg/api/userconfig/environments.go
  82. +25 −25 pkg/api/userconfig/errors.go
  83. +0 −98 pkg/api/userconfig/features.go
  84. +8 −8 pkg/api/userconfig/inputs.go
  85. +11 −11 pkg/api/userconfig/models.go
  86. +62 −62 pkg/api/userconfig/{raw_features.go → raw_columns.go}
  87. +1 −1 pkg/api/userconfig/templates.go
  88. +21 −21 pkg/api/userconfig/{transformed_features.go → transformed_columns.go}
  89. +1 −1 pkg/api/userconfig/transformers.go
  90. +58 −58 pkg/api/userconfig/validators.go
  91. +150 −150 pkg/api/userconfig/validators_test.go
  92. +3 −3 pkg/consts/consts.go
  93. +9 −9 pkg/operator/context/aggregates.go
  94. +8 −8 pkg/operator/context/autogenerator.go
  95. +6 −6 pkg/operator/context/context.go
  96. +5 −5 pkg/operator/context/environment.go
  97. +5 −5 pkg/operator/context/models.go
  98. +102 −0 pkg/operator/context/raw_columns.go
  99. +0 −102 pkg/operator/context/raw_features.go
  100. +31 −31 pkg/operator/context/{transformed_features.go → transformed_columns.go}
  101. +3 −3 pkg/operator/context/transformers.go
  102. +31 −31 pkg/operator/workloads/data_job.go
  103. +4 −4 pkg/operator/workloads/data_status.go
  104. +3 −3 pkg/transformers/bucketize.py
  105. +3 −3 pkg/transformers/index_string.py
  106. +2 −2 pkg/transformers/normalize.py
  107. +9 −9 pkg/transformers/transformers.yaml
  108. +14 −14 pkg/workloads/consts.py
  109. +64 −64 pkg/workloads/lib/context.py
  110. +15 −15 pkg/workloads/lib/test/context_test.py
  111. +18 −18 pkg/workloads/lib/test/util_test.py
  112. +33 −33 pkg/workloads/lib/tf_lib.py
  113. +15 −15 pkg/workloads/lib/util.py
  114. +50 −54 pkg/workloads/spark_job/spark_job.py
  115. +110 −111 pkg/workloads/spark_job/spark_util.py
  116. +2 −2 pkg/workloads/spark_job/test/conftest.py
  117. +73 −76 pkg/workloads/spark_job/test/spark_util_test.py
  118. +47 −47 pkg/workloads/tf_api/api.py
  119. +3 −3 pkg/workloads/tf_train/train_util.py
@@ -118,12 +118,12 @@ func printResourceByName(resourceName string, resourcesRes *schema.GetResourcesR
errors.Exit(err)
}
switch resourceType := rs.GetResourceType(); resourceType {
case resource.RawFeatureType:
describeRawFeature(resourceName, resourcesRes)
case resource.RawColumnType:
describeRawColumn(resourceName, resourcesRes)
case resource.AggregateType:
describeAggregate(resourceName, resourcesRes)
case resource.TransformedFeatureType:
describeTransformedFeature(resourceName, resourcesRes)
case resource.TransformedColumnType:
describeTransformedColumn(resourceName, resourcesRes)
case resource.TrainingDatasetType:
describeTrainingDataset(resourceName, resourcesRes)
case resource.ModelType:
@@ -137,12 +137,12 @@ func printResourceByName(resourceName string, resourcesRes *schema.GetResourcesR

func printResourcesByType(resourceType resource.Type, resourcesRes *schema.GetResourcesResponse) {
switch resourceType {
case resource.RawFeatureType:
printRawFeatures(resourcesRes.DataStatuses, resourcesRes.Context)
case resource.RawColumnType:
printRawColumns(resourcesRes.DataStatuses, resourcesRes.Context)
case resource.AggregateType:
printAggregates(resourcesRes.DataStatuses, resourcesRes.Context)
case resource.TransformedFeatureType:
printTransformedFeatures(resourcesRes.DataStatuses, resourcesRes.Context)
case resource.TransformedColumnType:
printTransformedColumns(resourcesRes.DataStatuses, resourcesRes.Context)
case resource.TrainingDatasetType:
printTrainingData(resourcesRes.DataStatuses, resourcesRes.Context)
case resource.ModelType:
@@ -156,12 +156,12 @@ func printResourcesByType(resourceType resource.Type, resourcesRes *schema.GetRe

func printResourceByNameAndType(resourceName string, resourceType resource.Type, resourcesRes *schema.GetResourcesResponse) {
switch resourceType {
case resource.RawFeatureType:
describeRawFeature(resourceName, resourcesRes)
case resource.RawColumnType:
describeRawColumn(resourceName, resourcesRes)
case resource.AggregateType:
describeAggregate(resourceName, resourcesRes)
case resource.TransformedFeatureType:
describeTransformedFeature(resourceName, resourcesRes)
case resource.TransformedColumnType:
describeTransformedColumn(resourceName, resourcesRes)
case resource.TrainingDatasetType:
describeTrainingDataset(resourceName, resourcesRes)
case resource.ModelType:
@@ -174,14 +174,14 @@ func printResourceByNameAndType(resourceName string, resourceType resource.Type,
}

func printAllResources(resourcesRes *schema.GetResourcesResponse) {
printTitle("Raw Features")
printRawFeatures(resourcesRes.DataStatuses, resourcesRes.Context)
printTitle("Raw Columns")
printRawColumns(resourcesRes.DataStatuses, resourcesRes.Context)

printTitle("Aggregates")
printAggregates(resourcesRes.DataStatuses, resourcesRes.Context)

printTitle("Transformed Features")
printTransformedFeatures(resourcesRes.DataStatuses, resourcesRes.Context)
printTitle("Transformed Columns")
printTransformedColumns(resourcesRes.DataStatuses, resourcesRes.Context)

printTitle("Training Datasets")
printTrainingData(resourcesRes.DataStatuses, resourcesRes.Context)
@@ -193,16 +193,16 @@ func printAllResources(resourcesRes *schema.GetResourcesResponse) {
printAPIs(resourcesRes.APIGroupStatuses)
}

func printRawFeatures(dataStatuses map[string]*resource.DataStatus, ctx *context.Context) {
if len(ctx.RawFeatures) == 0 {
func printRawColumns(dataStatuses map[string]*resource.DataStatus, ctx *context.Context) {
if len(ctx.RawColumns) == 0 {
fmt.Println("None")
return
}

printDataResourcesHeader()
strings := make(map[string]string)
for name, rawFeature := range ctx.RawFeatures {
strings[name] = dataResourceRow(name, rawFeature, dataStatuses)
for name, rawColumn := range ctx.RawColumns {
strings[name] = dataResourceRow(name, rawColumn, dataStatuses)
}
printStrings(strings)
}
@@ -221,16 +221,16 @@ func printAggregates(dataStatuses map[string]*resource.DataStatus, ctx *context.
printStrings(strings)
}

func printTransformedFeatures(dataStatuses map[string]*resource.DataStatus, ctx *context.Context) {
if len(ctx.TransformedFeatures) == 0 {
func printTransformedColumns(dataStatuses map[string]*resource.DataStatus, ctx *context.Context) {
if len(ctx.TransformedColumns) == 0 {
fmt.Println("None")
return
}

printDataResourcesHeader()
strings := make(map[string]string)
for name, transformedFeature := range ctx.TransformedFeatures {
strings[name] = dataResourceRow(name, transformedFeature, dataStatuses)
for name, transformedColumn := range ctx.TransformedColumns {
strings[name] = dataResourceRow(name, transformedColumn, dataStatuses)
}
printStrings(strings)
}
@@ -278,15 +278,15 @@ func printAPIs(apiGroupStatuses map[string]*resource.APIGroupStatus) {
printStrings(strings)
}

func describeRawFeature(name string, resourcesRes *schema.GetResourcesResponse) {
rawFeature := resourcesRes.Context.RawFeatures[name]
if rawFeature == nil {
fmt.Println("Raw feature " + name + " does not exist")
func describeRawColumn(name string, resourcesRes *schema.GetResourcesResponse) {
rawColumn := resourcesRes.Context.RawColumns[name]
if rawColumn == nil {
fmt.Println("Raw column " + name + " does not exist")
os.Exit(0)
}
dataStatus := resourcesRes.DataStatuses[rawFeature.GetID()]
dataStatus := resourcesRes.DataStatuses[rawColumn.GetID()]
printDataStatusSummary(dataStatus)
printResource(rawFeature.GetUserConfig())
printResource(rawColumn.GetUserConfig())
}

func describeAggregate(name string, resourcesRes *schema.GetResourcesResponse) {
@@ -321,15 +321,15 @@ func describeAggregate(name string, resourcesRes *schema.GetResourcesResponse) {
printResource(aggregate.Aggregate)
}

func describeTransformedFeature(name string, resourcesRes *schema.GetResourcesResponse) {
transformedFeature := resourcesRes.Context.TransformedFeatures[name]
if transformedFeature == nil {
fmt.Println("Transformed feature " + name + " does not exist")
func describeTransformedColumn(name string, resourcesRes *schema.GetResourcesResponse) {
transformedColumn := resourcesRes.Context.TransformedColumns[name]
if transformedColumn == nil {
fmt.Println("Transformed column " + name + " does not exist")
os.Exit(0)
}
dataStatus := resourcesRes.DataStatuses[transformedFeature.ID]
dataStatus := resourcesRes.DataStatuses[transformedColumn.ID]
printDataStatusSummary(dataStatus)
printResource(transformedFeature.TransformedFeature)
printResource(transformedColumn.TransformedColumn)
}

func describeTrainingDataset(name string, resourcesRes *schema.GetResourcesResponse) {
Oops, something went wrong.

0 comments on commit 10b1af2

Please sign in to comment.