|
213 | 213 | "with open(\"VERSION\", \"r\") as f:\n",
|
214 | 214 | " CODE_VERSION = f.readline().strip()\n",
|
215 | 215 | "\n",
|
216 |
| - "if content[\"EC2\"] != \"\":\n", |
| 216 | + "if content[\"EC2\"] != \"YOUR_EC2_URL\":\n", |
217 | 217 | " mlflow.set_tracking_uri(f\"http://{content['EC2']}:5000\") \n",
|
218 | 218 | "else:\n",
|
219 |
| - " mlflow.set_tracking_uri(f\"http://127.0.0.1:5000\") \n", |
| 219 | + " raise ValueError(\"You must set an EC2 url!\\n\")\n", |
220 | 220 | "\n",
|
221 | 221 | "print(f\"Tracking Server URI: '{mlflow.get_tracking_uri()}'\")\n",
|
222 | 222 | "\n",
|
|
273 | 273 | }
|
274 | 274 | ],
|
275 | 275 | "source": [
|
| 276 | + "os.environ[\"AWS_ACCESS_KEY_ID\"] = content[\"AWS_ACCESS_KEY\"]\n", |
| 277 | + "os.environ[\"AWS_SECRET_ACCESS_KEY\"] =content[\"AWS_SECRET_KEY\"]\n", |
| 278 | + "\n", |
276 | 279 | "# downloading artifacts from the aws s3 bucket\n",
|
277 |
| - "!aws s3 cp --recursive s3://{content[\"s3\"]}/artifacts {ARTIFACTS_OUTPUT_PATH}\n", |
| 280 | + "!aws s3 cp --recursive s3://{content[\"S3\"]}/artifacts {ARTIFACTS_OUTPUT_PATH}\n", |
278 | 281 | "\n",
|
279 | 282 | "# downloading models from the aws s3 bucket\n",
|
280 |
| - "!aws s3 cp --recursive s3://{content[\"s3\"]}/features {FEATURES_OUTPUT_PATH}\n" |
| 283 | + "!aws s3 cp --recursive s3://{content[\"S3\"]}/features {FEATURES_OUTPUT_PATH}" |
281 | 284 | ]
|
282 | 285 | },
|
283 | 286 | {
|
|
543 | 546 | "source": [
|
544 | 547 | "models = [dt, rf, xg, lg]\n",
|
545 | 548 | "min_features = math.floor(X_train.shape[1] * 0.2)\n",
|
546 |
| - "max_features = math.floor(X_train.shape[1] * 0.3)\n", |
| 549 | + "max_features = math.floor(X_train.shape[1] * 0.5)\n", |
547 | 550 | "\n",
|
548 | 551 | "# creating a new mlflow's experiment\n",
|
549 | 552 | "experiment_id = mlflow.create_experiment(\n",
|
|
0 commit comments