diff --git a/examples/dynamic_cloud_cluster.ipynb b/examples/dynamic_cloud_cluster.ipynb index a32ad21..6928c71 100644 --- a/examples/dynamic_cloud_cluster.ipynb +++ b/examples/dynamic_cloud_cluster.ipynb @@ -444,6 +444,12 @@ " os.environ[\"TRAINS_API_SECRET_KEY\"] = TRAINS_SECRET_KEY\n", " api_client = APIClient()\n", "\n", + " # Verify the requested queues exist and create those that doesn't exist\n", + " all_queues = [q.name for q in list(api_client.queues.get_all())]\n", + " missing_queues = [q for q in QUEUES if q not in all_queues]\n", + " for q in missing_queues:\n", + " api_client.queues.create(q)\n", + "\n", " idle_workers = {}\n", " while True:\n", " queue_name_to_id = {\n",