We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix simple typo: ouput -> output
# Issue Type

[x] Bug (Typo)

# Steps to Replicate

1. Examine optimus/ml/encoding.py.
2. Search for ouput.

# Expected Behaviour

1. Should read output.



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `optimus/ml/encoding.py`
Content:
```
1 from pyspark.ml import feature, Pipeline
2 from pyspark.ml.feature import StringIndexer, IndexToString, OneHotEncoder, VectorAssembler, Normalizer
3 
4 from optimus.helpers.check import is_dataframe, is_, is_str
5 from optimus.helpers.columns import parse_columns, name_col, get_output_cols
6 from optimus.helpers.constants import Actions
7 from optimus.helpers.raiseit import RaiseIt
8 
9 
10 def n_gram(df, input_col, n=2):
11     """
12     Converts the input array of strings inside of a Spark DF into an array of n-grams.
13     :param df: Pyspark dataframe to analyze
14     :param input_col: Column to analyzer.
15     :param n: number of elements per n-gram >=1.
16     :return: Spark DataFrame with n-grams calculated.
17     """
18 
19     is_dataframe(df)
20 
21     tokenizer = feature.Tokenizer().setInputCol(input_col) | feature.StopWordsRemover()
22     count = feature.CountVectorizer()
23     gram = feature.NGram(n=n) | feature.CountVectorizer()
24     tf = tokenizer | (count, gram) | feature.VectorAssembler()
25     tfidf = tf | feature.IDF().setOutputCol('features')
26 
27     tfidf_model = tfidf.fit(df)
28     df_model = tfidf_model.transform(df)
29     return df_model, tfidf_model
30 
31 
32 def string_to_index(df, input_cols, output_cols=None, columns=None, **kargs):
33     """
34     Maps a string column of labels to an ML column of label indices. If the input column is
35     numeric, we cast it to string and index the string values.
36     :param df: Dataframe to be transformed
37     :param input_cols: Columns to be indexed.
38     :param output_cols:Column where the ouput is going to be saved
39     :return: Dataframe with indexed columns.
40     """
41     df_actual = df
42 
43     if columns is None:
44         input_cols = parse_columns(df, input_cols)
45         if output_cols is None:
46             output_cols = [name_col(input_col, "index_to_string") for input_col in input_cols]
47         output_cols = get_output_cols(input_cols, output_cols)
48     else:
49         input_cols, output_cols = zip(*columns)
50 
51     indexers = [StringIndexer(inputCol=input_col, outputCol=output_col, **kargs).fit(df) for input_col, output_col
52                 in zip(list(set(input_cols)), list(set(output_cols)))]
53 
54     pipeline = Pipeline(stages=indexers)
55     df = pipeline.fit(df).transform(df)
56 
57     df = df.preserve_meta(df_actual, Actions.STRING_TO_INDEX.value, output_cols)
58 
59     return df
60 
61 
62 def index_to_string(df, input_cols, output_col=None, **kargs):
63     """
64     Maps a column of indices back to a new column of corresponding string values. The index-string mapping is
65     either from the ML attributes of the input column, or from user-supplied labels (which take precedence over
66     ML attributes).
67     :param df: Dataframe to be transformed.
68     :param input_cols: Columns to be indexed.
69     :param output_col: Column where the output is going to be saved.
70     :return: Dataframe with indexed columns.
71     """
72 
73     input_cols = parse_columns(df, input_cols)
74     if output_col is None:
75         output_col = name_col(input_cols, "index_to_string")
76 
77     indexers = [IndexToString(inputCol=column, outputCol=output_col, **kargs) for column in
78                 list(set(input_cols))]
79 
80     pipeline = Pipeline(stages=indexers)
81     df = pipeline.fit(df).transform(df)
82 
83     return df
84 
85 
86 def one_hot_encoder(df, input_cols, output_col=None, **kargs):
87     """
88     Maps a column of label indices to a column of binary vectors, with at most a single one-value.
89     :param df: Dataframe to be transformed.
90     :param input_cols: Columns to be encoded.
91     :param output_col: Column where the output is going to be saved.
92     :return: Dataframe with encoded columns.
93     """
94 
95     input_cols = parse_columns(df, input_cols)
96 
97     if output_col is None:
98         output_col = name_col(input_cols, "one_hot_encoder")
99 
100     encode = [OneHotEncoder(inputCol=column, outputCol=output_col, **kargs) for column in
101               list(set(input_cols))]
102 
103     pipeline = Pipeline(stages=encode)
104     df = pipeline.fit(df).transform(df)
105 
106     return df
107 
108 
109 # TODO: Must we use the pipeline version?
110 def vector_assembler(df, input_cols, output_col=None):
111     """
112     Combines a given list of columns into a single vector column.
113     :param df: Dataframe to be transformed.
114     :param input_cols: Columns to be assembled.
115     :param output_col: Column where the output is going to be saved.
116     :return: Dataframe with assembled column.
117     """
118 
119     input_cols = parse_columns(df, input_cols)
120 
121     if output_col is None:
122         output_col = name_col(input_cols, "vector_assembler")
123 
124     assembler = [VectorAssembler(inputCols=input_cols, outputCol=output_col)]
125 
126     pipeline = Pipeline(stages=assembler)
127     df = pipeline.fit(df).transform(df)
128 
129     return df
130 
131 
132 def normalizer(df, input_cols, output_col=None, p=2.0):
133     """
134     Transforms a dataset of Vector rows, normalizing each Vector to have unit norm. It takes parameter p, which
135     specifies the p-norm used for normalization. (p=2) by default.
136     :param df: Dataframe to be transformed
137     :param input_cols: Columns to be normalized.
138     :param output_col: Column where the output is going to be saved.
139     :param p:  p-norm used for normalization.
140     :return: Dataframe with normalized columns.
141     """
142 
143     # Check if columns argument must be a string or list datat ype:
144     if not is_(input_cols, (str, list)):
145         RaiseIt.type_error(input_cols, ["str", "list"])
146 
147     if is_str(input_cols):
148         input_cols = [input_cols]
149 
150     if is_(input_cols, (float, int)):
151         RaiseIt.type_error(input_cols, ["float", "int"])
152 
153     # Try to create a vector
154     if len(input_cols) > 1:
155         df = df.cols.cast(input_cols, "vector")
156 
157     if output_col is None:
158         output_col = name_col(input_cols, "normalizer")
159 
160     # TODO https://developer.ibm.com/code/2018/04/10/improve-performance-ml-pipelines-wide-dataframes-apache-spark-2-3/
161     normal = [Normalizer(inputCol=col_name, outputCol=output_col, p=p) for col_name in
162               list(set(input_cols))]
163 
164     pipeline = Pipeline(stages=normal)
165 
166     df = pipeline.fit(df).transform(df)
167 
168     return df
169
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/optimus/ml/encoding.py b/optimus/ml/encoding.py
--- a/optimus/ml/encoding.py
+++ b/optimus/ml/encoding.py
@@ -35,7 +35,7 @@
     numeric, we cast it to string and index the string values.
     :param df: Dataframe to be transformed
     :param input_cols: Columns to be indexed.
-    :param output_cols:Column where the ouput is going to be saved
+    :param output_cols:Column where the output is going to be saved
     :return: Dataframe with indexed columns.
     """
     df_actual = df

{"golden_diff": "diff --git a/optimus/ml/encoding.py b/optimus/ml/encoding.py\n--- a/optimus/ml/encoding.py\n+++ b/optimus/ml/encoding.py\n@@ -35,7 +35,7 @@\n     numeric, we cast it to string and index the string values.\n     :param df: Dataframe to be transformed\n     :param input_cols: Columns to be indexed.\n-    :param output_cols:Column where the ouput is going to be saved\n+    :param output_cols:Column where the output is going to be saved\n     :return: Dataframe with indexed columns.\n     \"\"\"\n     df_actual = df\n", "issue": "Fix simple typo: ouput -> output\n# Issue Type\n\n[x] Bug (Typo)\n\n# Steps to Replicate\n\n1. Examine optimus/ml/encoding.py.\n2. Search for ouput.\n\n# Expected Behaviour\n\n1. Should read output.\n\n\n", "before_files": [{"content": "from pyspark.ml import feature, Pipeline\nfrom pyspark.ml.feature import StringIndexer, IndexToString, OneHotEncoder, VectorAssembler, Normalizer\n\nfrom optimus.helpers.check import is_dataframe, is_, is_str\nfrom optimus.helpers.columns import parse_columns, name_col, get_output_cols\nfrom optimus.helpers.constants import Actions\nfrom optimus.helpers.raiseit import RaiseIt\n\n\ndef n_gram(df, input_col, n=2):\n    \"\"\"\n    Converts the input array of strings inside of a Spark DF into an array of n-grams.\n    :param df: Pyspark dataframe to analyze\n    :param input_col: Column to analyzer.\n    :param n: number of elements per n-gram >=1.\n    :return: Spark DataFrame with n-grams calculated.\n    \"\"\"\n\n    is_dataframe(df)\n\n    tokenizer = feature.Tokenizer().setInputCol(input_col) | feature.StopWordsRemover()\n    count = feature.CountVectorizer()\n    gram = feature.NGram(n=n) | feature.CountVectorizer()\n    tf = tokenizer | (count, gram) | feature.VectorAssembler()\n    tfidf = tf | feature.IDF().setOutputCol('features')\n\n    tfidf_model = tfidf.fit(df)\n    df_model = tfidf_model.transform(df)\n    return df_model, tfidf_model\n\n\ndef string_to_index(df, input_cols, output_cols=None, columns=None, **kargs):\n    \"\"\"\n    Maps a string column of labels to an ML column of label indices. If the input column is\n    numeric, we cast it to string and index the string values.\n    :param df: Dataframe to be transformed\n    :param input_cols: Columns to be indexed.\n    :param output_cols:Column where the ouput is going to be saved\n    :return: Dataframe with indexed columns.\n    \"\"\"\n    df_actual = df\n\n    if columns is None:\n        input_cols = parse_columns(df, input_cols)\n        if output_cols is None:\n            output_cols = [name_col(input_col, \"index_to_string\") for input_col in input_cols]\n        output_cols = get_output_cols(input_cols, output_cols)\n    else:\n        input_cols, output_cols = zip(*columns)\n\n    indexers = [StringIndexer(inputCol=input_col, outputCol=output_col, **kargs).fit(df) for input_col, output_col\n                in zip(list(set(input_cols)), list(set(output_cols)))]\n\n    pipeline = Pipeline(stages=indexers)\n    df = pipeline.fit(df).transform(df)\n\n    df = df.preserve_meta(df_actual, Actions.STRING_TO_INDEX.value, output_cols)\n\n    return df\n\n\ndef index_to_string(df, input_cols, output_col=None, **kargs):\n    \"\"\"\n    Maps a column of indices back to a new column of corresponding string values. The index-string mapping is\n    either from the ML attributes of the input column, or from user-supplied labels (which take precedence over\n    ML attributes).\n    :param df: Dataframe to be transformed.\n    :param input_cols: Columns to be indexed.\n    :param output_col: Column where the output is going to be saved.\n    :return: Dataframe with indexed columns.\n    \"\"\"\n\n    input_cols = parse_columns(df, input_cols)\n    if output_col is None:\n        output_col = name_col(input_cols, \"index_to_string\")\n\n    indexers = [IndexToString(inputCol=column, outputCol=output_col, **kargs) for column in\n                list(set(input_cols))]\n\n    pipeline = Pipeline(stages=indexers)\n    df = pipeline.fit(df).transform(df)\n\n    return df\n\n\ndef one_hot_encoder(df, input_cols, output_col=None, **kargs):\n    \"\"\"\n    Maps a column of label indices to a column of binary vectors, with at most a single one-value.\n    :param df: Dataframe to be transformed.\n    :param input_cols: Columns to be encoded.\n    :param output_col: Column where the output is going to be saved.\n    :return: Dataframe with encoded columns.\n    \"\"\"\n\n    input_cols = parse_columns(df, input_cols)\n\n    if output_col is None:\n        output_col = name_col(input_cols, \"one_hot_encoder\")\n\n    encode = [OneHotEncoder(inputCol=column, outputCol=output_col, **kargs) for column in\n              list(set(input_cols))]\n\n    pipeline = Pipeline(stages=encode)\n    df = pipeline.fit(df).transform(df)\n\n    return df\n\n\n# TODO: Must we use the pipeline version?\ndef vector_assembler(df, input_cols, output_col=None):\n    \"\"\"\n    Combines a given list of columns into a single vector column.\n    :param df: Dataframe to be transformed.\n    :param input_cols: Columns to be assembled.\n    :param output_col: Column where the output is going to be saved.\n    :return: Dataframe with assembled column.\n    \"\"\"\n\n    input_cols = parse_columns(df, input_cols)\n\n    if output_col is None:\n        output_col = name_col(input_cols, \"vector_assembler\")\n\n    assembler = [VectorAssembler(inputCols=input_cols, outputCol=output_col)]\n\n    pipeline = Pipeline(stages=assembler)\n    df = pipeline.fit(df).transform(df)\n\n    return df\n\n\ndef normalizer(df, input_cols, output_col=None, p=2.0):\n    \"\"\"\n    Transforms a dataset of Vector rows, normalizing each Vector to have unit norm. It takes parameter p, which\n    specifies the p-norm used for normalization. (p=2) by default.\n    :param df: Dataframe to be transformed\n    :param input_cols: Columns to be normalized.\n    :param output_col: Column where the output is going to be saved.\n    :param p:  p-norm used for normalization.\n    :return: Dataframe with normalized columns.\n    \"\"\"\n\n    # Check if columns argument must be a string or list datat ype:\n    if not is_(input_cols, (str, list)):\n        RaiseIt.type_error(input_cols, [\"str\", \"list\"])\n\n    if is_str(input_cols):\n        input_cols = [input_cols]\n\n    if is_(input_cols, (float, int)):\n        RaiseIt.type_error(input_cols, [\"float\", \"int\"])\n\n    # Try to create a vector\n    if len(input_cols) > 1:\n        df = df.cols.cast(input_cols, \"vector\")\n\n    if output_col is None:\n        output_col = name_col(input_cols, \"normalizer\")\n\n    # TODO https://developer.ibm.com/code/2018/04/10/improve-performance-ml-pipelines-wide-dataframes-apache-spark-2-3/\n    normal = [Normalizer(inputCol=col_name, outputCol=output_col, p=p) for col_name in\n              list(set(input_cols))]\n\n    pipeline = Pipeline(stages=normal)\n\n    df = pipeline.fit(df).transform(df)\n\n    return df\n", "path": "optimus/ml/encoding.py"}], "after_files": [{"content": "from pyspark.ml import feature, Pipeline\nfrom pyspark.ml.feature import StringIndexer, IndexToString, OneHotEncoder, VectorAssembler, Normalizer\n\nfrom optimus.helpers.check import is_dataframe, is_, is_str\nfrom optimus.helpers.columns import parse_columns, name_col, get_output_cols\nfrom optimus.helpers.constants import Actions\nfrom optimus.helpers.raiseit import RaiseIt\n\n\ndef n_gram(df, input_col, n=2):\n    \"\"\"\n    Converts the input array of strings inside of a Spark DF into an array of n-grams.\n    :param df: Pyspark dataframe to analyze\n    :param input_col: Column to analyzer.\n    :param n: number of elements per n-gram >=1.\n    :return: Spark DataFrame with n-grams calculated.\n    \"\"\"\n\n    is_dataframe(df)\n\n    tokenizer = feature.Tokenizer().setInputCol(input_col) | feature.StopWordsRemover()\n    count = feature.CountVectorizer()\n    gram = feature.NGram(n=n) | feature.CountVectorizer()\n    tf = tokenizer | (count, gram) | feature.VectorAssembler()\n    tfidf = tf | feature.IDF().setOutputCol('features')\n\n    tfidf_model = tfidf.fit(df)\n    df_model = tfidf_model.transform(df)\n    return df_model, tfidf_model\n\n\ndef string_to_index(df, input_cols, output_cols=None, columns=None, **kargs):\n    \"\"\"\n    Maps a string column of labels to an ML column of label indices. If the input column is\n    numeric, we cast it to string and index the string values.\n    :param df: Dataframe to be transformed\n    :param input_cols: Columns to be indexed.\n    :param output_cols:Column where the output is going to be saved\n    :return: Dataframe with indexed columns.\n    \"\"\"\n    df_actual = df\n\n    if columns is None:\n        input_cols = parse_columns(df, input_cols)\n        if output_cols is None:\n            output_cols = [name_col(input_col, \"index_to_string\") for input_col in input_cols]\n        output_cols = get_output_cols(input_cols, output_cols)\n    else:\n        input_cols, output_cols = zip(*columns)\n\n    indexers = [StringIndexer(inputCol=input_col, outputCol=output_col, **kargs).fit(df) for input_col, output_col\n                in zip(list(set(input_cols)), list(set(output_cols)))]\n\n    pipeline = Pipeline(stages=indexers)\n    df = pipeline.fit(df).transform(df)\n\n    df = df.preserve_meta(df_actual, Actions.STRING_TO_INDEX.value, output_cols)\n\n    return df\n\n\ndef index_to_string(df, input_cols, output_col=None, **kargs):\n    \"\"\"\n    Maps a column of indices back to a new column of corresponding string values. The index-string mapping is\n    either from the ML attributes of the input column, or from user-supplied labels (which take precedence over\n    ML attributes).\n    :param df: Dataframe to be transformed.\n    :param input_cols: Columns to be indexed.\n    :param output_col: Column where the output is going to be saved.\n    :return: Dataframe with indexed columns.\n    \"\"\"\n\n    input_cols = parse_columns(df, input_cols)\n    if output_col is None:\n        output_col = name_col(input_cols, \"index_to_string\")\n\n    indexers = [IndexToString(inputCol=column, outputCol=output_col, **kargs) for column in\n                list(set(input_cols))]\n\n    pipeline = Pipeline(stages=indexers)\n    df = pipeline.fit(df).transform(df)\n\n    return df\n\n\ndef one_hot_encoder(df, input_cols, output_col=None, **kargs):\n    \"\"\"\n    Maps a column of label indices to a column of binary vectors, with at most a single one-value.\n    :param df: Dataframe to be transformed.\n    :param input_cols: Columns to be encoded.\n    :param output_col: Column where the output is going to be saved.\n    :return: Dataframe with encoded columns.\n    \"\"\"\n\n    input_cols = parse_columns(df, input_cols)\n\n    if output_col is None:\n        output_col = name_col(input_cols, \"one_hot_encoder\")\n\n    encode = [OneHotEncoder(inputCol=column, outputCol=output_col, **kargs) for column in\n              list(set(input_cols))]\n\n    pipeline = Pipeline(stages=encode)\n    df = pipeline.fit(df).transform(df)\n\n    return df\n\n\n# TODO: Must we use the pipeline version?\ndef vector_assembler(df, input_cols, output_col=None):\n    \"\"\"\n    Combines a given list of columns into a single vector column.\n    :param df: Dataframe to be transformed.\n    :param input_cols: Columns to be assembled.\n    :param output_col: Column where the output is going to be saved.\n    :return: Dataframe with assembled column.\n    \"\"\"\n\n    input_cols = parse_columns(df, input_cols)\n\n    if output_col is None:\n        output_col = name_col(input_cols, \"vector_assembler\")\n\n    assembler = [VectorAssembler(inputCols=input_cols, outputCol=output_col)]\n\n    pipeline = Pipeline(stages=assembler)\n    df = pipeline.fit(df).transform(df)\n\n    return df\n\n\ndef normalizer(df, input_cols, output_col=None, p=2.0):\n    \"\"\"\n    Transforms a dataset of Vector rows, normalizing each Vector to have unit norm. It takes parameter p, which\n    specifies the p-norm used for normalization. (p=2) by default.\n    :param df: Dataframe to be transformed\n    :param input_cols: Columns to be normalized.\n    :param output_col: Column where the output is going to be saved.\n    :param p:  p-norm used for normalization.\n    :return: Dataframe with normalized columns.\n    \"\"\"\n\n    # Check if columns argument must be a string or list datat ype:\n    if not is_(input_cols, (str, list)):\n        RaiseIt.type_error(input_cols, [\"str\", \"list\"])\n\n    if is_str(input_cols):\n        input_cols = [input_cols]\n\n    if is_(input_cols, (float, int)):\n        RaiseIt.type_error(input_cols, [\"float\", \"int\"])\n\n    # Try to create a vector\n    if len(input_cols) > 1:\n        df = df.cols.cast(input_cols, \"vector\")\n\n    if output_col is None:\n        output_col = name_col(input_cols, \"normalizer\")\n\n    # TODO https://developer.ibm.com/code/2018/04/10/improve-performance-ml-pipelines-wide-dataframes-apache-spark-2-3/\n    normal = [Normalizer(inputCol=col_name, outputCol=output_col, p=p) for col_name in\n              list(set(input_cols))]\n\n    pipeline = Pipeline(stages=normal)\n\n    df = pipeline.fit(df).transform(df)\n\n    return df\n", "path": "optimus/ml/encoding.py"}]}