Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting modal.exception.DeprecationError: Deprecated on 2023-08-16: Calling Modal functions like f(...) is deprecated #77

Closed
ansuman13 opened this issue Mar 5, 2024 · 1 comment

Comments

@ansuman13
Copy link

I am trying to do setup, following SETUP.MD file, getting an error while running make document-store

Error log seems to suggest modal Deprecation Error coming from markdown.py.

Error Log:

Traceback (most recent call last):
  File "/pkg/modal/_container_entrypoint.py", line 463, in handle_input_exception
    yield
  File "/pkg/modal/_container_entrypoint.py", line 615, in run_inputs
    res = imp_fun.fun(*args, **kwargs)
  File "/root/markdown.py", line 69, in to_documents
    text = get_text_from(markdown_url)
  File "/pkg/modal/functions.py", line 1401, in __call__
    deprecation_error(
  File "/pkg/modal/exception.py", line 120, in deprecation_error
    raise DeprecationError(f"Deprecated on {date(*deprecated_on)}: {msg}")
modal.exception.DeprecationError: Deprecated on 2023-08-16: Calling Modal functions like `f(...)` is deprecated. Use `f.local(...)` if you want to call the function in the same Python process. Use `f.remote(...)` if you want to call the function in a Modal container in the cloud
Traceback (most recent call last):
  File "/pkg/modal/_container_entrypoint.py", line 463, in handle_input_exception
    yield
  File "/pkg/modal/_container_entrypoint.py", line 615, in run_inputs
    res = imp_fun.fun(*args, **kwargs)
  File "/root/markdown.py", line 69, in to_documents
    text = get_text_from(markdown_url)
  File "/pkg/modal/functions.py", line 1401, in __call__
    deprecation_error(
  File "/pkg/modal/exception.py", line 120, in deprecation_error
    raise DeprecationError(f"Deprecated on {date(*deprecated_on)}: {msg}")
modal.exception.DeprecationError: Deprecated on 2023-08-16: Calling Modal functions like `f(...)` is deprecated. Use `f.local(...)` if you want to call the function in the same Python process. Use `f.remote(...)` if you want to call the function in a Modal container in the cloud
Traceback (most recent call last):
  File "/pkg/modal/_container_entrypoint.py", line 463, in handle_input_exception
    yield
  File "/pkg/modal/_container_entrypoint.py", line 615, in run_inputs
    res = imp_fun.fun(*args, **kwargs)
  File "/root/markdown.py", line 69, in to_documents
    text = get_text_from(markdown_url)
  File "/pkg/modal/functions.py", line 1401, in __call__
    deprecation_error(
  File "/pkg/modal/exception.py", line 120, in deprecation_error
    raise DeprecationError(f"Deprecated on {date(*deprecated_on)}: {msg}")
modal.exception.DeprecationError: Deprecated on 2023-08-16: Calling Modal functions like `f(...)` is deprecated. Use `f.local(...)` if you want to call the function in the same Python process. Use `f.remote(...)` if you want to call the function in a Modal container in the cloud
Traceback (most recent call last):
  File "/pkg/modal/_container_entrypoint.py", line 463, in handle_input_exception
    yield
  File "/pkg/modal/_container_entrypoint.py", line 615, in run_inputs
    res = imp_fun.fun(*args, **kwargs)
  File "/root/markdown.py", line 69, in to_documents
    text = get_text_from(markdown_url)
  File "/pkg/modal/functions.py", line 1401, in __call__
    deprecation_error(
  File "/pkg/modal/exception.py", line 120, in deprecation_error
    raise DeprecationError(f"Deprecated on {date(*deprecated_on)}: {msg}")
modal.exception.DeprecationError: Deprecated on 2023-08-16: Calling Modal functions like `f(...)` is deprecated. Use `f.local(...)` if you want to call the function in the same Python process. Use `f.remote(...)` if you want to call the function in a Modal container in the cloud
Traceback (most recent call last):
  File "/pkg/modal/_container_entrypoint.py", line 463, in handle_input_exception
    yield
  File "/pkg/modal/_container_entrypoint.py", line 615, in run_inputs
    res = imp_fun.fun(*args, **kwargs)
  File "/root/markdown.py", line 69, in to_documents
    text = get_text_from(markdown_url)
  File "/pkg/modal/functions.py", line 1401, in __call__
    deprecation_error(
  File "/pkg/modal/exception.py", line 120, in deprecation_error
    raise DeprecationError(f"Deprecated on {date(*deprecated_on)}: {msg}")
modal.exception.DeprecationError: Deprecated on 2023-08-16: Calling Modal functions like `f(...)` is deprecated. Use `f.local(...)` if you want to call the function in the same Python process. Use `f.remote(...)` if you want to call the function in a Modal container in the cloud
Traceback (most recent call last):
  File "/pkg/modal/_container_entrypoint.py", line 463, in handle_input_exception
    yield
  File "/pkg/modal/_container_entrypoint.py", line 615, in run_inputs
    res = imp_fun.fun(*args, **kwargs)
  File "/root/markdown.py", line 69, in to_documents
    text = get_text_from(markdown_url)
  File "/pkg/modal/functions.py", line 1401, in __call__
    deprecation_error(
  File "/pkg/modal/exception.py", line 120, in deprecation_error
    raise DeprecationError(f"Deprecated on {date(*deprecated_on)}: {msg}")
modal.exception.DeprecationError: Deprecated on 2023-08-16: Calling Modal functions like `f(...)` is deprecated. Use `f.local(...)` if you want to call the function in the same Python process. Use `f.remote(...)` if you want to call the function in a Modal container in the cloud
Traceback (most recent call last):
  File "/pkg/modal/_container_entrypoint.py", line 463, in handle_input_exception
    yield
  File "/pkg/modal/_container_entrypoint.py", line 615, in run_inputs
    res = imp_fun.fun(*args, **kwargs)
  File "/root/markdown.py", line 69, in to_documents
    text = get_text_from(markdown_url)
  File "/pkg/modal/functions.py", line 1401, in __call__
    deprecation_error(
  File "/pkg/modal/exception.py", line 120, in deprecation_error
    raise DeprecationError(f"Deprecated on {date(*deprecated_on)}: {msg}")
modal.exception.DeprecationError: Deprecated on 2023-08-16: Calling Modal functions like `f(...)` is deprecated. Use `f.local(...)` if you want to call the function in the same Python process. Use `f.remote(...)` if you want to call the function in a Modal container in the cloud
Traceback (most recent call last):
  File "/pkg/modal/_container_entrypoint.py", line 463, in handle_input_exception
    yield
  File "/pkg/modal/_container_entrypoint.py", line 615, in run_inputs
    res = imp_fun.fun(*args, **kwargs)
  File "/root/markdown.py", line 69, in to_documents
    text = get_text_from(markdown_url)
  File "/pkg/modal/functions.py", line 1401, in __call__
    deprecation_error(
  File "/pkg/modal/exception.py", line 120, in deprecation_error
    raise DeprecationError(f"Deprecated on {date(*deprecated_on)}: {msg}")
modal.exception.DeprecationError: Deprecated on 2023-08-16: Calling Modal functions like `f(...)` is deprecated. Use `f.local(...)` if you want to call the function in the same Python process. Use `f.remote(...)` if you want to call the function in a Modal container in the cloud
Traceback (most recent call last):
  File "/pkg/modal/_container_entrypoint.py", line 463, in handle_input_exception
    yield
  File "/pkg/modal/_container_entrypoint.py", line 615, in run_inputs
    res = imp_fun.fun(*args, **kwargs)
  File "/root/markdown.py", line 69, in to_documents
    text = get_text_from(markdown_url)
  File "/pkg/modal/functions.py", line 1401, in __call__
    deprecation_error(
  File "/pkg/modal/exception.py", line 120, in deprecation_error
    raise DeprecationError(f"Deprecated on {date(*deprecated_on)}: {msg}")
modal.exception.DeprecationError: Deprecated on 2023-08-16: Calling Modal functions like `f(...)` is deprecated. Use `f.local(...)` if you want to call the function in the same Python process. Use `f.remote(...)` if you want to call the function in a Modal container in the cloud
Stopping app - uncaught exception raised locally: TypeError("'UserCodeException' object is not iterable").
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/ansumansingh/Downloads/ask-fsdl-main/etl/markdown.py:45 in main                           │
│                                                                                                  │
│    44documents = (                                                                          │
│ ❱  45 │   │   etl.shared.unchunk(  # each lecture creates multiple documents, so we flatten      │46 │   │   │   to_documents.map(                                                              │
│                                                                                                  │
│ /Users/ansumansingh/Downloads/ask-fsdl-main/etl/shared.py:66 in unchunk                          │
│                                                                                                  │
│    65"""Recombines a list of lists into a single list."""                                   │
│ ❱  66return [item for sublist in list_of_lists for item in sublist]                         │
│    67                                                                                            │
│                                                                                                  │
│ /Users/ansumansingh/Downloads/ask-fsdl-main/etl/shared.py:66 in <listcomp>                       │
│                                                                                                  │
│    65"""Recombines a list of lists into a single list."""                                   │
│ ❱  66return [item for sublist in list_of_lists for item in sublist]                         │
│    67                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
...
@charlesfrye
Copy link
Collaborator

Thanks for the report, ansmuan!

This repo is no longer being actively maintained. But I believe you can resolve the issue by switching adding .remote to any call that triggers the deprecation warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants