F

Flyte enables you to build & deploy data & ML pipelines, hassle-free. The infinitely scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks. Explore and Join the Flyte Community!

FileNotFoundError after version upgrade

Summary

The user is facing a FileNotFoundError after upgrading from version 1.11.0 to 1.12.3 or 1.13.5 while using Jupyter Notebook and nbdev for library creation. The error is linked to a missing directory and involves multiple calls in the Flytekit library. Despite being advised to try version 1.13.6b2, the user still encounters a similar error with a different traceback. They reverted to version 1.11.0, which resolved another issue with the remote client using the as_type parameter. The user inquires about a Jira ticket for tracking the issue and suggests opening a GitHub issue to document their experience.

Status
resolved
Tags
    Source
    #ask-the-community
      p

      pingsutw

      9/25/2024

      [flyte-bug]

      k

      kumare

      9/25/2024

      Can you open a GitHub issue and put your details there

      s

      stephfen

      9/25/2024

      Is there a Jira ticket I should follow?

      s

      stephfen

      9/25/2024

      Thanks, there is no rush, I just reverted back to a v1.11.0 version. (had hit a separate problem with the remote client and the type engine, but managed to fix that by passing as_type parameter).

      k

      kumare

      9/25/2024

      We are working on this and will resolve

      s

      stephfen

      9/25/2024

      Unfortunately the same error (slightly different traceback)

      │ in <module>:13                                                                                                  │
      │                                                                                                                 │
      │ ❱  13 @task(container_image=boto3_image_spec)                                                                   │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/task.py:352 in wrapper                                                                                │
      │                                                                                                                 │
      │ ❱ 352 │   │   task_instance = TaskPlugins.find_pythontask_plugin(type(task_config))(                            │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/tracker.py:81 in __call__                                                                             │
      │                                                                                                                 │
      │ ❱  81 │   │   o = super(InstanceTrackingMeta, cls).__call__(*args, **kwargs)                                    │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/python_function_task.py:133 in __init__                                                               │
      │                                                                                                                 │
      │ ❱ 133 │   │   name, _, _, _ = extract_task_module(task_function)                                                │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/tracker.py:332 in extract_task_module                                                                 │
      │                                                                                                                 │
      │ ❱ 332 │   │   mod_name = get_full_module_path(f, file_name)  # type: ignore                                     │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/tracker.py:344 in get_full_module_path                                                                │
      │                                                                                                                 │
      │ ❱ 344 │   │   new_mod_name = _mod_sanitizer.get_absolute_module_name(inspect.getabsfile(mod),                   │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/tracker.py:291 in get_absolute_module_name                                                            │
      │                                                                                                                 │
      │ ❱ 291 │   │   return self._resolve_abs_module_name(path, package_root)                                          │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/tracker.py:277 in _resolve_abs_module_name                                                            │
      │                                                                                                                 │
      │ ❱ 277 │   │   if "__init__.py" not in os.listdir(dirname):                                                      │
      ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
      FileNotFoundError: [Errno 2] No such file or directory: 
      '/var/folders/sn/cfpmtf0555dgbd6lv9ljn1yh0000gp/T/ipykernel_92213'```
      
      p

      pingsutw

      9/25/2024

      mind giving v1.13.6b2 a try. we fixed some issues in the tracker.py https://github.com/flyteorg/flytekit/releases/tag/v1.13.6b2

      s

      stephfen

      9/25/2024

      Hi, I have tried to upgrade from v1.11.0 to v1.12.3 or v1.13.5 but after the upgrade I am hitting a problem. I use jupyter notebook for development and then nbdev to create the library, and deploy from that. This has been working but after the upgrade, executing the cell with the task definition results in the following:

      │                                                                                                                 │
      │ ❱  13 @task(container_image=boto3_image_spec)                                                                   │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/task.py:328 in wrapper                                                                                │
      │                                                                                                                 │
      │ ❱ 328 │   │   task_instance = TaskPlugins.find_pythontask_plugin(type(task_config))(                            │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/tracker.py:85 in __call__                                                                             │
      │                                                                                                                 │
      │ ❱  85 │   │   o = super(InstanceTrackingMeta, cls).__call__(*args, **kwargs)                                    │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/python_function_task.py:134 in __init__                                                               │
      │                                                                                                                 │
      │ ❱ 134 │   │   name, _, _, _ = extract_task_module(task_function)                                                │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/tracker.py:336 in extract_task_module                                                                 │
      │                                                                                                                 │
      │ ❱ 336 │   │   mod_name = get_full_module_path(f, file_name)  # type: ignore                                     │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/tracker.py:348 in get_full_module_path                                                                │
      │                                                                                                                 │
      │ ❱ 348 │   │   new_mod_name = _mod_sanitizer.get_absolute_module_name(inspect.getabsfile(mod),                   │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/tracker.py:295 in get_absolute_module_name                                                            │
      │                                                                                                                 │
      │ ❱ 295 │   │   return self._resolve_abs_module_name(path, package_root)                                          │
      │                                                                                                                 │
      │ /Users/virtual_environments/.venv/lib/python3.11/site-packages/flyt │
      │ ekit/core/tracker.py:281 in _resolve_abs_module_name                                                            │
      │                                                                                                                 │
      │ ❱ 281 │   │   if "__init__.py" not in os.listdir(dirname):                                                      │
      ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
      FileNotFoundError: [Errno 2] No such file or directory: 
      '/var/folders/sn/cfpmtf0555dgbd6lv9ljn1yh0000gp/T/ipykernel_51609'```