arize-phoenix 1.9.1rc3__py3-none-any.whl → 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of arize-phoenix might be problematic. Click here for more details.

phoenix/server/app.py CHANGED
@@ -163,6 +163,7 @@ def create_app(
163
163
  traces: Optional[Traces] = None,
164
164
  evals: Optional[Evals] = None,
165
165
  debug: bool = False,
166
+ read_only: bool = False,
166
167
  ) -> Starlette:
167
168
  graphql = GraphQLWithContext(
168
169
  schema=schema,
@@ -180,7 +181,7 @@ def create_app(
180
181
  debug=debug,
181
182
  routes=(
182
183
  []
183
- if traces is None
184
+ if traces is None or read_only
184
185
  else [
185
186
  Route(
186
187
  "/v1/spans",
@@ -194,7 +195,7 @@ def create_app(
194
195
  )
195
196
  + (
196
197
  []
197
- if evals is None
198
+ if evals is None or read_only
198
199
  else [
199
200
  Route(
200
201
  "/v1/evaluations",
phoenix/server/main.py CHANGED
@@ -93,6 +93,7 @@ if __name__ == "__main__":
93
93
  parser.add_argument("--export_path")
94
94
  parser.add_argument("--host", type=str, required=False)
95
95
  parser.add_argument("--port", type=int, required=False)
96
+ parser.add_argument("--read-only", type=bool, default=False)
96
97
  parser.add_argument("--no-internet", action="store_true")
97
98
  parser.add_argument("--umap_params", type=str, required=False, default=DEFAULT_UMAP_PARAMS_STR)
98
99
  parser.add_argument("--debug", action="store_false")
@@ -172,6 +173,7 @@ if __name__ == "__main__":
172
173
  n_neighbors=int(umap_params_list[1]),
173
174
  n_samples=int(umap_params_list[2]),
174
175
  )
176
+ read_only = args.read_only
175
177
  logger.info(f"Server umap params: {umap_params}")
176
178
  app = create_app(
177
179
  export_path=export_path,
@@ -181,6 +183,7 @@ if __name__ == "__main__":
181
183
  evals=evals,
182
184
  corpus=None if corpus_dataset is None else create_model_from_datasets(corpus_dataset),
183
185
  debug=args.debug,
186
+ read_only=read_only,
184
187
  )
185
188
  host = args.host or get_env_host()
186
189
  port = args.port or get_env_port()