|
113 | 113 | }
|
114 | 114 | ],
|
115 | 115 | "source": [
|
116 |
| - "import autogen\n", |
117 | 116 | "import types\n",
|
| 117 | + "\n", |
118 | 118 | "import httpx\n",
|
119 | 119 | "from synapse.ml.fabric.credentials import get_openai_httpx_sync_client\n",
|
120 | 120 | "\n",
|
| 121 | + "import autogen\n", |
| 122 | + "\n", |
121 | 123 | "http_client = get_openai_httpx_sync_client()\n",
|
122 |
| - "http_client.__deepcopy__ = types.MethodType(lambda self, memo: self, http_client) # https://microsoft.github.io/autogen/docs/topics/llm_configuration#adding-http-client-in-llm_config-for-proxy\n", |
| 124 | + "http_client.__deepcopy__ = types.MethodType(\n", |
| 125 | + " lambda self, memo: self, http_client\n", |
| 126 | + ") # https://microsoft.github.io/autogen/docs/topics/llm_configuration#adding-http-client-in-llm_config-for-proxy\n", |
123 | 127 | "\n",
|
124 | 128 | "config_list = [\n",
|
125 | 129 | " {\n",
|
|
439 | 443 | ],
|
440 | 444 | "source": [
|
441 | 445 | "import tempfile\n",
|
| 446 | + "\n", |
442 | 447 | "from autogen.coding import LocalCommandLineCodeExecutor\n",
|
443 | 448 | "\n",
|
444 | 449 | "# Create a temporary directory to store the code files.\n",
|
|
484 | 489 | " human_input_mode=\"NEVER\",\n",
|
485 | 490 | " max_consecutive_auto_reply=5,\n",
|
486 | 491 | " retrieve_config={\n",
|
487 |
| - " \"docs_path\": [\"https://learn.microsoft.com/en-us/fabric/get-started/microsoft-fabric-overview\", \n", |
488 |
| - " \"https://learn.microsoft.com/en-us/fabric/data-science/tuning-automated-machine-learning-visualizations\"],\n", |
| 492 | + " \"docs_path\": [\n", |
| 493 | + " \"https://learn.microsoft.com/en-us/fabric/get-started/microsoft-fabric-overview\",\n", |
| 494 | + " \"https://learn.microsoft.com/en-us/fabric/data-science/tuning-automated-machine-learning-visualizations\",\n", |
| 495 | + " ],\n", |
489 | 496 | " \"chunk_token_size\": 2000,\n",
|
490 | 497 | " \"model\": config_list[0][\"model\"],\n",
|
491 | 498 | " \"vector_db\": \"chroma\", # to use the deprecated `client` parameter, set to None and uncomment the line above\n",
|
|
2869 | 2876 | }
|
2870 | 2877 | ],
|
2871 | 2878 | "source": [
|
| 2879 | + "import flaml.visualization as fviz\n", |
| 2880 | + "from flaml import AutoML\n", |
2872 | 2881 | "from sklearn.datasets import fetch_california_housing\n",
|
2873 | 2882 | "from sklearn.model_selection import train_test_split\n",
|
2874 |
| - "from flaml import AutoML\n", |
2875 |
| - "import flaml.visualization as fviz\n", |
2876 | 2883 | "\n",
|
2877 | 2884 | "# Load the California housing data and split it into train and test sets\n",
|
2878 | 2885 | "housing = fetch_california_housing()\n",
|
|
0 commit comments