@@ -28,7 +28,7 @@ Sklearn
28
28
sklearn_estimator = LogisticRegression()
29
29
sklearn_estimator.fit(X_train, y_train)
30
30
31
- # Instantite ads.model.framework.sklearn_model.SklearnModel using the sklearn LogisticRegression model
31
+ # Instantiate ads.model.framework.sklearn_model.SklearnModel using the sklearn LogisticRegression model
32
32
sklearn_model = SklearnModel(
33
33
estimator=sklearn_estimator, artifact_dir=tempfile.mkdtemp()
34
34
)
@@ -75,7 +75,7 @@ Create a model, prepare it, verify that it works, save it to the model catalog,
75
75
xgboost_estimator = xgb.XGBClassifier()
76
76
xgboost_estimator.fit(X_train, y_train)
77
77
78
- # Instantite ads.model.framework.xgboost_model.XGBoostModel using the trained XGBoost Model
78
+ # Instantiate ads.model.framework.xgboost_model.XGBoostModel using the trained XGBoost Model
79
79
xgboost_model = XGBoostModel(estimator=xgboost_estimator, artifact_dir=tempfile.mkdtemp())
80
80
81
81
# Autogenerate score.py, pickled model, runtime.yaml, input_schema.json and output_schema.json
@@ -121,7 +121,7 @@ Create a model, prepare it, verify that it works, save it to the model catalog,
121
121
}
122
122
lightgbm_estimator = lgb.train(param, train)
123
123
124
- # Instantite ads.model.lightgbm_model.XGBoostModel using the trained LGBM Model
124
+ # Instantiate ads.model.lightgbm_model.XGBoostModel using the trained LGBM Model
125
125
lightgbm_model = LightGBMModel(estimator=lightgbm_estimator, artifact_dir=tempfile.mkdtemp())
126
126
127
127
# Autogenerate score.py, pickled model, runtime.yaml, input_schema.json and output_schema.json
@@ -162,7 +162,7 @@ Create a model, prepare it, verify that it works, save it to the model catalog,
162
162
# create random test data
163
163
test_data = torch.randn(1, 3, 224, 224)
164
164
165
- # Instantite ads.model.framework.pytorch_model.PyTorchModel using the pre-trained PyTorch Model
165
+ # Instantiate ads.model.framework.pytorch_model.PyTorchModel using the pre-trained PyTorch Model
166
166
artifact_dir=tempfile.mkdtemp()
167
167
torch_model = PyTorchModel(torch_estimator, artifact_dir=artifact_dir)
168
168
@@ -228,7 +228,7 @@ Create a model, prepare it, verify that it works, save it to the model catalog,
228
228
pipeline = Pipeline(stages=[tokenizer, hashingTF, lr])
229
229
model = pipeline.fit(training)
230
230
231
- # Instantite ads.model.framework.spark_model.SparkPipelineModel using the pre-trained Spark Pipeline Model
231
+ # Instantiate ads.model.framework.spark_model.SparkPipelineModel using the pre-trained Spark Pipeline Model
232
232
spark_model = SparkPipelineModel(estimator=model, artifact_dir=tempfile.mkdtemp())
233
233
spark_model.prepare(inference_conda_env="pyspark32_p38_cpu_v2",
234
234
X_sample = training,
@@ -273,7 +273,7 @@ Create a model, prepare it, verify that it works, save it to the model catalog,
273
273
tf_estimator.compile(optimizer="adam", loss=loss_fn, metrics=["accuracy"])
274
274
tf_estimator.fit(x_train, y_train, epochs=1)
275
275
276
- # Instantite ads.model.framework.tensorflow_model.TensorFlowModel using the pre-trained TensorFlow Model
276
+ # Instantiate ads.model.framework.tensorflow_model.TensorFlowModel using the pre-trained TensorFlow Model
277
277
tf_model = TensorFlowModel(tf_estimator, artifact_dir=tempfile.mkdtemp())
278
278
279
279
# Autogenerate score.py, pickled model, runtime.yaml, input_schema.json and output_schema.json
@@ -320,7 +320,7 @@ Other Frameworks
320
320
# Get predictions
321
321
preds = catboost_estimator.predict(X_test)
322
322
323
- # Instantite ads.model.generic_model.GenericModel using the trained Custom Model using the trained CatBoost Classifier model
323
+ # Instantiate ads.model.generic_model.GenericModel using the trained Custom Model using the trained CatBoost Classifier model
324
324
catboost_model = GenericModel(estimator=catboost_estimator, artifact_dir=tempfile.mkdtemp())
325
325
326
326
# Autogenerate score.py, pickled model, runtime.yaml, input_schema.json and output_schema.json
@@ -351,7 +351,7 @@ With Model Version Set
351
351
return x ** 2
352
352
model = Toy()
353
353
354
- # Instantite ads.model.generic_model.GenericModel using the trained Custom Model
354
+ # Instantiate ads.model.generic_model.GenericModel using the trained Custom Model
355
355
generic_model = GenericModel(estimator=model, artifact_dir=tempfile.mkdtemp())
356
356
generic_model.summary_status()
357
357
0 commit comments