|
79 | 79 | "\n", |
80 | 80 | "catalog = catalog.strip()\n", |
81 | 81 | "db = db.strip()\n", |
82 | | - "model_name = model_name.strip()\n", |
| 82 | + "model_name = model_name.strip() \n", |
83 | 83 | "\n", |
84 | 84 | "model_version = int(model_version)\n" |
85 | 85 | ] |
|
436 | 436 | " client.delete_model_version_tag(f\"{target_catalog}.{db}.{model_name}\",f\"{target_model_version}\" , \"has_description\")\n", |
437 | 437 | " client.delete_model_version_tag(f\"{target_catalog}.{db}.{model_name}\",f\"{target_model_version}\" , \"champion_smape_passed\")\n" |
438 | 438 | ] |
| 439 | + }, |
| 440 | + { |
| 441 | + "cell_type": "code", |
| 442 | + "execution_count": 0, |
| 443 | + "metadata": { |
| 444 | + "application/vnd.databricks.v1+cell": { |
| 445 | + "cellMetadata": {}, |
| 446 | + "inputWidgets": {}, |
| 447 | + "nuid": "599b20bb-d38c-4a8d-8062-b2d5f92f779b", |
| 448 | + "showTitle": false, |
| 449 | + "tableResultSettingsMap": {}, |
| 450 | + "title": "" |
| 451 | + } |
| 452 | + }, |
| 453 | + "outputs": [], |
| 454 | + "source": [ |
| 455 | + "\n", |
| 456 | + "from mlflow.deployments import get_deploy_client\n", |
| 457 | + "\n", |
| 458 | + "client = get_deploy_client(\"databricks\")\n", |
| 459 | + "endpoint = client.create_endpoint(\n", |
| 460 | + " name=\"unity-catalog-model-endpoint\",\n", |
| 461 | + " config={\n", |
| 462 | + " \"served_entities\": [\n", |
| 463 | + " {\n", |
| 464 | + " \"name\": \"ads-entity\"\n", |
| 465 | + " \"entity_name\": \"catalog.schema.my-ads-model\",\n", |
| 466 | + " \"entity_version\": \"3\",\n", |
| 467 | + " \"workload_size\": \"Small\",\n", |
| 468 | + " \"scale_to_zero_enabled\": true\n", |
| 469 | + " }\n", |
| 470 | + " ],\n", |
| 471 | + " \"traffic_config\": {\n", |
| 472 | + " \"routes\": [\n", |
| 473 | + " {\n", |
| 474 | + " \"served_model_name\": \"my-ads-model-3\",\n", |
| 475 | + " \"traffic_percentage\": 100\n", |
| 476 | + " }\n", |
| 477 | + " ]\n", |
| 478 | + " }\n", |
| 479 | + " }\n", |
| 480 | + ")" |
| 481 | + ] |
439 | 482 | } |
440 | 483 | ], |
441 | 484 | "metadata": { |
|
461 | 504 | "_sqldf" |
462 | 505 | ] |
463 | 506 | }, |
464 | | - "pythonIndentUnit": 4 |
| 507 | + "pythonIndentUnit": 4, |
| 508 | + "widgetLayout": [ |
| 509 | + { |
| 510 | + "breakBefore": false, |
| 511 | + "name": "model_name", |
| 512 | + "width": 182 |
| 513 | + }, |
| 514 | + { |
| 515 | + "breakBefore": false, |
| 516 | + "name": "model_version", |
| 517 | + "width": 182 |
| 518 | + }, |
| 519 | + { |
| 520 | + "breakBefore": false, |
| 521 | + "name": "source_catalog", |
| 522 | + "width": 182 |
| 523 | + }, |
| 524 | + { |
| 525 | + "breakBefore": false, |
| 526 | + "name": "source_db", |
| 527 | + "width": 182 |
| 528 | + }, |
| 529 | + { |
| 530 | + "breakBefore": false, |
| 531 | + "name": "target_catalog", |
| 532 | + "width": 182 |
| 533 | + }, |
| 534 | + { |
| 535 | + "breakBefore": false, |
| 536 | + "name": "validation_data", |
| 537 | + "width": 182 |
| 538 | + } |
| 539 | + ] |
465 | 540 | }, |
466 | 541 | "notebookName": "Model Validation", |
467 | 542 | "widgets": { |
|
538 | 613 | "name": "source_catalog", |
539 | 614 | "options": { |
540 | 615 | "widgetType": "text", |
541 | | - "autoCreated": null, |
| 616 | + "autoCreated": false, |
542 | 617 | "validationRegex": null |
543 | 618 | } |
544 | 619 | } |
|
590 | 665 | "name": "target_catalog", |
591 | 666 | "options": { |
592 | 667 | "widgetType": "text", |
593 | | - "autoCreated": null, |
| 668 | + "autoCreated": false, |
594 | 669 | "validationRegex": null |
595 | 670 | } |
596 | 671 | } |
|
0 commit comments