flyte 0.2.0b25__py3-none-any.whl → 0.2.0b27__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 flyte might be problematic. Click here for more details.

flyte/remote/_logs.py CHANGED
@@ -10,8 +10,10 @@ from rich.panel import Panel
10
10
  from rich.text import Text
11
11
 
12
12
  from flyte._initialize import ensure_client, get_client
13
+ from flyte._logging import logger
13
14
  from flyte._protos.logs.dataplane import payload_pb2
14
15
  from flyte._protos.workflow import run_definition_pb2, run_logs_service_pb2
16
+ from flyte._tools import ipython_check, ipywidgets_check
15
17
  from flyte.errors import LogsNotYetAvailableError
16
18
  from flyte.syncify import syncify
17
19
 
@@ -158,6 +160,12 @@ class Logs:
158
160
  """
159
161
  if attempt < 1:
160
162
  raise ValueError("Attempt number must be greater than 0.")
163
+
164
+ if ipython_check():
165
+ if not ipywidgets_check():
166
+ logger.warning("IPython widgets is not available, defaulting to console output.")
167
+ raw = True
168
+
161
169
  if raw:
162
170
  console = Console()
163
171
  async for line in cls.tail.aio(action_id=action_id, attempt=attempt):
flyte/remote/_project.py CHANGED
@@ -6,10 +6,11 @@ from typing import AsyncIterator, Iterator, Literal, Tuple, Union
6
6
  import rich.repr
7
7
  from flyteidl.admin import common_pb2, project_pb2
8
8
 
9
- from flyte._initialize import ensure_client, get_client, get_common_config
9
+ from flyte._initialize import ensure_client, get_client
10
10
  from flyte.syncify import syncify
11
11
 
12
12
 
13
+ # TODO Add support for orgs again
13
14
  @dataclass
14
15
  class Project:
15
16
  """
@@ -32,7 +33,7 @@ class Project:
32
33
  resp = await service.GetProject(
33
34
  project_pb2.ProjectGetRequest(
34
35
  id=name,
35
- org=org,
36
+ # org=org,
36
37
  )
37
38
  )
38
39
  return cls(resp)
@@ -57,7 +58,7 @@ class Project:
57
58
  sort_pb2 = common_pb2.Sort(
58
59
  key=sort_by[0], direction=common_pb2.Sort.ASCENDING if sort_by[1] == "asc" else common_pb2.Sort.DESCENDING
59
60
  )
60
- org = get_common_config().org
61
+ # org = get_common_config().org
61
62
  while True:
62
63
  resp = await get_client().project_domain_service.ListProjects( # type: ignore
63
64
  project_pb2.ProjectListRequest(
@@ -65,7 +66,7 @@ class Project:
65
66
  token=token,
66
67
  filters=filters,
67
68
  sort_by=sort_pb2,
68
- org=org,
69
+ # org=org,
69
70
  )
70
71
  )
71
72
  token = resp.token