Zum Inhalt springen

Modal Release Notes

Einträge
40
Quellen
1
Zuletzt aktualisiert

Folge Modal, um die Release Notes in deinen Feed zu holen.

Modal

Modal 1.3.1: Python-3.14t-Verbesserungen und benutzerdefinierte Domains

Experimentelle Verbesserungen für Python 3.14t in Containern, benutzerdefinierte Domains für Sandboxes und neue CLI-Befehle.

  • We've improved our experimental support for Python 3.14t (free-threaded Python) inside Modal containers.
    • The container environment will now use the Python implementation of the Protobuf runtime rather than the incompatible upb implementation.
    • As 3.14t images are not being published to the official source for our prebuilt modal.Image.debian_slim() images, we recommend using modal.Image.from_registry to build a 3.14t Image:
      modal.Image.from_registry("debian:bookworm-slim", add_python="3.14t")
      
    • Note that 3.14t support is available only on the 2025.06 Image Builder Version.
    • Support is still experimental, so please share any issues that you encounter running 3.14t in Modal containers.
  • It's now possible to provide a custom_domain for a modal.Sandbox:
    sb = modal.Sandbox.create(..., custom_domain="sandboxes.mydomain.com")
    
    Note that Sandbox custom domains work differently from Function custom domains and must currently be set up manually by Modal; please get in touch if this feature interests you.
  • We added a new modal token info CLI command to retrieve information about the credentials that are currently in use.
  • We added a --timestamps flag to a number of CLI entrypoints (modal run, modal serve, modal deploy, and modal container logs) to show timestamps in the logging output. …

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.3.0: Unterstützung für Python 3.14

Python 3.14 wird unterstützt, Python 3.9 wird nicht mehr unterstützt, und experimentelle Warnungen für asynchrone Kontexte wurden eingeführt.

Modal now supports Python 3.14. Python 3.14t (the free-threading build) support is currently a work in progress, because we are waiting for dependencies to be updated with free-threaded support. Additionally, Modal no longer supports Python 3.9, which has reached end-of-life.

We are adding experimental support for detecting cases where Modal's blocking APIs are used in async contexts (which can be a source of bugs or performance issues). You can opt into runtime warnings by setting MODAL_ASYNC_WARNINGS=1 as an environment variable or async_warnings = true as a config field. We will enable these warnings by default in the future; please report any apparent false positives or other issues while support is experimental.

This release also includes a small number of deprecations and behavioral changes:

  • The Modal SDK will no longer propagate grpclib.GRPCError types out to the user; our own modal.Error subtypes will be used instead. To avoid disrupting user code that has relied on GRPCError exceptions for control flow, we are temporarily making some exception types inherit from GRPCError so that they will also be caught by except grpclib.GRPCError statements. Accessing the .status attribute of the exception will issue a deprecation warning, but warnings cannot be issued if the exception object is only caught and there is no other interaction with it. We advise proactively migrating any exception handling to use Modal types…

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.2.6: Fehlerbehebung bei Sandbox-Ausgabe

Ein Fehler beim Iterieren über Ausgabeströme von modal.Sandbox.exec wurde behoben.

  • Fixed bug where iterating on a modal.Sandbox.exec output stream could raise unauthenticated errors.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.2.5: Benannte Funktionen und Shell-Verbesserungen

Benannte Funktionen ohne Serialisierung, modal shell mit Image-ID und verbesserte Leistung beim Hinzufügen lokaler Verzeichnisse.

  • It is now possible to set a custom name= for a Function without using serialized=True. This can be useful when decorating a function multiple times, e.g. applying multiple Modal configurations to the same implementation.
  • It is now possible to start modal shell with a Modal Image ID (modal shell im-abc123). Additionally, modal shell will now warn if you pass invalid combinations of arguments (like --cpu together with the ID of an already running Sandbox, etc.).
  • Fixed a bug in modal shell that caused e.g. vi to fail with unicode decode errors.
  • Fixed a thread-safety issue in modal.Sandbox resource cleanup.
  • Improved performance when adding large local directories to an Image.
  • Improved async Sandbox performance by not blocking the event loop while reading from stdout or stderr.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.2.4: Fehlerbehebung und HTTP/2-Option

Ein Fehler bei stderr=StreamType.STDOUT in Sandbox.exec wurde behoben, und eine neue Option für HTTP/2 in modal.forward wurde hinzugefügt.

  • Fixed a bug in modal.Sandbox.exec when using stderr=StreamType.STDOUT (introduced in v1.2.3).
  • Added a new h2_enabled option in modal.forward, which enables HTTP/2 advertisement in TLS establishment.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.2.3: Nicht-preemptible CPU-Funktionen und sanftes Herunterfahren

CPU-Funktionen können nicht-preemptible Kapazität nutzen, und das CLI unterstützt sanftes Stoppen von Containern.

  • CPU Functions can now be configured to run on non-preemptible capacity by setting nonpreemptible=True in the @app.function() or @app.cls() decorator. This feature is not currently available when requesting a GPU. Note that non-preemptibility incurs a 3x multiplier on CPU and memory pricing. See the Guide for more information on preemptions.
  • The Modal client can now respond more gracefully to server throttling (e.g., rate limiting) by backing off and automatically retrying. This behavior can be controlled with a new MODAL_MAX_THROTTLE_WAIT config variable. Setting the config to 0 will preserve the previous behavior and treat rate limits as an exception; setting it to a nonzero number (the unit is seconds) will allow a limited duration of retries.
  • The modal.Sandbox.exec implementation has been rewritten to be more reliable and efficient.
  • Added a new --add-local flag to modal shell, allowing local files and directories to be included in the shell's container.
  • Fixed a bug introduced in v1.2.2 where some Modal objects (e.g., modal.FunctionCall) were not usable after being captured in a Memory Snapshot. The bug would result in a has no loader function error when the object was used.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.2.2: Volume-Mounts für Images und JSON-Konfiguration

Image.run_commands unterstützt Volume-Mounts, alle Objekte akzeptieren ein optionales Client-Objekt, und modal config show liefert gültiges JSON.

  • modal.Image.run_commands now supports modal.Volume mounts. This can be helpful for accelerating builds by keeping a package manager cache on the Volume:

    cache_vol = modal.Volume.from_name("cache-mount")
    cmd_using_cache = "..."
    image = modal.Image.debian_slim().run_commands(cmd_using_cache, volumes={"/cache": cache_vol})
    
  • All Modal objects now accept an optional modal.Client object in their constructor methods. Passing an explicit client can be helpful in cases where Modal credentials are retrieved from within the Python process that is making requests.

  • The name= passed to modal.Sandbox.create and modal.Sandbox.from_name is now required to follow other Modal object naming rules (must contain only alphanumeric characters, dashes, periods, or underscores and cannot exceed 64 characters). Passing an invalid name will now error.

  • modal.CloudBucketMount now supports force_path_style=True to disable virtual-host-style addressing. See mountpoint-s3 endpoints docs for details.

  • The output from modal config show is now valid JSON and can be parsed by CLI tools such as jq.

  • Fixed a bug where App tags were not attached to Image builds that occur when first deploying the App.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.2.1: Konfigurierbare Dev-Suffixe

Der Standard-Suffix -dev für URLs ephemerer Apps kann jetzt über Konfiguration überschrieben werden.

  • It's now possible to override the default -dev suffix applied to the autogenerated URLs for ephemeral Apps (i.e., when using modal serve) via a new dev_suffix field in the .modal.toml config file, or equivalently with the MODAL_DEV_SUFFIX environment variable. This can help avoid collisions when multiple users of a workspace are working on the same codebase simultaneously.
  • Fixed a bug where reading long stdout/stderr from modal.Sandbox.exec() could break in text=True mode.
  • Fixed a bug where the status code was not checked when downloading a file from a Volume.
  • modal run --detach ... will now exit more gracefully if you lose internet connection while your App is running.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.2.0: App-Tags und Billing-API

Einführung von App-Tags für organisatorische Metadaten und einer Billing-API zur Kostenaufschlüsselung nach Apps.

In this release, we're introducing the concept of "App tags", which are simple key-value metadata that can be included to provide additional organizational context. Tags can be defined as part of the modal.App constructor:

app = modal.App("llm-inference-server", tags={"team": "genai-platform"})

Tags can also be added to an active App via the new modal.App.set_tags() method, and current tags can be retrieved with the new modal.App.get_tags().

This release also introduces a new API for generating a tabular billing report: modal.billing.workspace_billing_report(). The billing API will report the cost incurred by each App, aggregated over time intervals (currently supporting a daily or hourly resolution). The report can optionally include App tags, allowing you to perform cost allocation using your own organizational schema.

Note that the initial release of the billing API is a private beta. Please get in touch to discuss access.

This release also includes some internal changes to Function input/output serialization. These changes will provide better support for calling into Modal Functions from our modal-js and modal-go SDKs. Versions 0.4 or later of modal-js and modal-go will only be able to invoke Functions in Apps deployed with version 1.2 or later of the Python SDK.

Other new features and improvements: …

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.1.4: Neue Timeout-Parameter und Sandbox-Verbesserungen

Neue Parameter startup_timeout und idle_timeout für Funktionen und Sandboxes, cluster_id in Cluster-Informationen, Fehler bei block_network mit Ports, HTTP-408-Fehlercode für ASGI-Apps und Warnung bei ungültigen Sandbox-Namen.

  • Added a startup_timeout parameter to the @app.function() and @app.cls() decorators. When used, this configures the timeout applied to each container's startup period separately from the input timeout. For backwards compatibility, timeout still applies to the startup phase when startup_timeout is unset.
  • Added an optional idle_timeout parameter to modal.Sandbox.create(). When provided, Sandboxes will terminate after idle_timeout seconds of idleness.
  • The dataclass returned by modal.experimental.get_cluster_info() now includes a cluster_id field to identify the clustered set of containers.
  • When block_network=True is set in modal.Sandbox.create(), we now raise an error if any of encrypted_ports, h2_ports, or unencrypted_ports are also set.
  • Functions decorated with @modal.asgi_app() now return an HTTP 408 (request timeout) error code instead of a 502 (gateway timeout) in rare cases when an input fails to arrive at the container, e.g. due to cancellation.
  • modal.Sandbox.create() now warns when an invalid name= is passed, applying the same rules as other Modal object names: names must be alphanumeric and not longer than 64 characters. This will become an error in the future.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.1.3: Fehlerbehebungen bei FunctionCall und Volume

Behobene Fehler bei der Abfrage von FunctionCall über from_id und verbesserte Robustheit von modal volume get durch Retries.

  • Fixed a bug introduced in v1.1.2 that causes invocation of modal.FunctionCall.get, modal.FunctionCall.get_call_graph, modal.FunctionCall.cancel, and modal.FunctionCall.gather to fail when the FunctionCall object is retrieved via modal.FunctionCall.from_id.
  • Added retries to improve the robustness of modal volume get

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.1.2: Neue Objektverwaltungs-API

Einführung des .objects-Namespaces für die imperative Verwaltung von Volume, Secret, Dict und Queue mit Methoden wie create, delete und list; ältere statische Delete-Methoden werden als veraltet markiert.

We're introducing a new API pattern for imperative management of Modal resource types (modal.Volume, modal.Secret, modal.Dict, and modal.Queue). The API is accessible through the .objects namespace on each class. The object management namespace has methods for the following operations:

  • .objects.create(name) creates an object on our backend. E.g., with modal.Volume.objects.create:
    modal.Volume.objects.create("huggingface-cache", environment_name="dev")
    
  • .objects.delete(name) deletes the object with that name. E.g., with modal.Secret.objects.delete:
    modal.Secret.objects.delete("aws-token")
    
  • .objects.list() returns a list of object instances. E.g., with modal.Queue.objects.list:
    for queue in modal.Queue.objects.list():
        queue_info = queue.info()
        print(queue_info.name, queue_info.created_at, queue.len())
    

With the introduction of these APIs, we're replacing a few older methods with similar functionality:

  • Static .delete() methods on the resource types themselves are being deprecated, because they are too easily confused with operations on the contents of a resource (i.e., calling modal.Dict.delete(key_name) is an easy mistake that can have significant adverse consequences). …

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.1.1: Benannte Sandboxes und weitere Verbesserungen

Einführung benannter Sandboxes mit eindeutiger Namensvergabe, .name-Eigenschaft und .info()-Methode für Ressourcen, verbesserte Portabilität von uv_pip_install, Unterstützung für experimentelle Optionen und bessere Jupyter-Ausgabe.

We're introducing the concept of "named Sandboxes" for usecases where Sandboxes need to have unique ownership over a resource. A named Sandbox can be created by passing name= to modal.Sandbox.create(), and it can be retrieved with the new modal.Sandbox.from_name() constructor. Only one running Sandbox can use a given name (scoped within the App that is managing the Sandbox) at any time, so trying to create a Sandbox with a name that is already taken will fail. Sandboxes release their name when they terminate. See the guide for more information about using this new feature.

Other changes:

  • We've made an internal change to the modal.Image.uv_pip_install method to make it more portable across different base Images. As a consequence, Images built with this method on 1.1.0 will need to rebuild the next time they are used.
  • We've added a .name property and .info() method to modal.Dict, modal.Queue, modal.Volume, and modal.Secret objects.
  • Sandboxes now support experimental_options configuration for enabling preview functionality.
  • We've Improved Modal's rich output when used in a Jupyter notebook.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.1.0: Image Builder 2025.06 und uv-Unterstützung

Unterstützung für den neuen Image Builder 2025.06 (Preview) und neue Methoden modal.Image.uv_pip_install und modal.Image.uv_sync für den Bau von Images mit uv.

This release introduces support for the 2025.06 Image Builder Version, which is in a "preview" state. The new image builder includes several major changes to how the Modal client dependencies are included in Modal Images. These improvements should greatly reduce the risk of conflicts with user code dependencies. They also allow Modal Sandboxes to easily be used with existing Images or Dockerfiles that are not themselves compatible with the Modal client library. You can see more details and update your Workspace on its Image Config page. Please share any issues that you encounter as we work to make the version stable.

We're also introducing first-class support for building Modal Images with the uv package manager through the new modal.Image.uv_pip_install and modal.Image.uv_sync methods:

import modal

# uv_pip_install accepts a list of packages, like pip_install, but up to 50% faster
image = modal.Image.debian_slim().uv_pip_install("torch==2.7.1", "numpy==2.3.1")

# uv_sync accepts a local `uv_project_dir` (defaulting to the local working directory)
# and uses the pyproject.toml and uv.lock files to specify the environment
image = modal.Image.debian_slim().uv_sync()
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.0.5: Schreibschutz für Volumes und Fehlerbehebungen

Neue Methode modal.Volume.read_only zum Schreibschutz, allmähliche Korrektur eines Exceptions-Wrapping-Fehlers bei map/starmap und Vererbung von modal.parameter in vererbten Klassen.

  • Added a modal.Volume.read_only method, which will configure a Volume instance to disallow writes:

    vol = modal.Volume.from_name("models")
    read_only_vol = vol.read_only()
    
    @app.function(volumes={"/models": read_only_vol})
    def f():
        with open("/models/weights.pt", "w") as fid:  # Raises an OSError
            ...
    
    @app.local_entrypoint()
    def main():
        with read_only_vol.batch_upload() as batch:  # Raises a modal.exceptions.InvalidError
            ...
    
        with vol.batch_upload() as batch:  # This instance is still writeable
            ...
    
  • Introduced a gradual fix for a bug where Function.map and Function.starmap leak an internal exception wrapping type (modal.exceptions.UserCodeException) when return_exceptions=True is set. To avoid breaking any user code that depends on the specific types in the return list, these functions will continue returning the wrapper type by default, but they now issue a deprecation warning. To opt into the future behavior and silence the warning, you can set wrap_returned_exceptions=False in the call to .map or .starmap.

  • When an @app.cls()-decorated class inherits from a class (or classes) with modal.parameter() annotations, the parent parameters will now be inherited and included in the parameter set for the modal Cls. …

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.0.4: Optionen, Secret-Shell und Sandbox-Verbesserungen

Zusammenführung von with_options-Overrides, neue --secret-Option für modal shell, verbose-Option für Sandboxes und verbesserte Fehlerbehandlung bei Sandbox.watch.

  • When modal.Cls.with_options is called multiple times on the same instance, the overrides will now be merged. For example, the following configuration will use an H100 GPU and request 16 CPU cores:
    Model.with_options(gpu="A100", cpu=16).with_options(gpu="H100")
    
  • Added a --secret option to modal shell for including environment variables defined by named Secret(s) in the shell session:
    modal shell --secret huggingface --secret wandb
    
  • Added a verbose: bool option to modal.Sandbox.create(). When this is set to True, execs and file system operations will appear in the Sandbox logs.
  • Updated modal.Sandbox.watch() so that exceptions are now raised in (and can be caught by) the calling task.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.0.3: Zeitzonen, H2-Ports und Stabilität

Zeitzonen-Unterstützung für Cron-Schedules, neue h2_ports-Parameter, Optionen für Secret-Erstellung, Verhalten von terminate geändert, verbesserte Performance und behobene Race-Conditions.

  • Added support for specifying a timezone on Cron schedules, which allows you to run a Function at a specific local time regardless of daylight savings:

    import modal
    app = modal.App()
    
    @app.function(schedule=modal.Cron("* 6 * * *"), timezone="America/New_York")  # Use tz database naming conventions
    def f():
        print("This function will run every day at 6am New York time.")
    
  • Added an h2_ports parameter to Sandbox.create, which exposes encrypted ports using HTTP/2. The following example will create an H2 port on 5002 and a port using HTTPS over HTTP/1.1 on 5003:

    sb = modal.Sandbox.create(app=app, h2_ports = [5002], encrypted_ports = [5003])
    
  • Added --from-dotenv and --from-json options to modal secret create, which will read from local files to populate Secret contents.

  • Sandbox.terminate no longer waits for container shutdown to complete before returning. It still ensures that a terminated container will shutdown imminently. To restore the previous behavior (i.e., to wait until the Sandbox is actually terminated), call sb.wait(raise_on_termination=False) after calling sb.terminate().

  • Improved performance and stability for modal volume get.

  • Fixed a rare race condition that could sometimes make Function.map and similar calls deadlock.

  • Fixed an issue where Function.map and similar methods would stall for 55 seconds when passed an empty iterator as input instead of completing immediately. …

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.0.2: Kompatibilität mit aiohttp 3.12.0

Behobene Inkompatibilität mit aiohttp 3.12.0, die Probleme bei Volume- und großen Input-Uploads verursachte.

  • Fixed an incompatibility with breaking changes in aiohttp v3.12.0, which caused issues with Volume and large input uploads. The issues typically manifest as Local data and remote data checksum mismatch or '_io.BufferedReader' object has no attribute 'getbuffer' errors.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.0.1: Timestamps und Sandbox-Fix

Neue --timestamps-Flag für modal app logs, korrigierter returncode für laufende Sandboxes und Bugfix für Systeme mit Unicode im Systemnamen.

  • Added a --timestamps flag to modal app logs that prepends a timestamp to each log line.
  • Fixed a bug where objects returned by Sandbox.list had returncode == 0 for running Sandboxes. Now the return code for running Sandboxes will be None.
  • Fixed a bug affecting systems where the sys.platform.node name includes unicode characters.

Originalquelle(öffnet in neuem Tab)Problem melden

Modal

Modal 1.0.0 mit Breaking Changes

Modal 1.0.0 setzt die angekündigten Deprecations durch und ändert das Automounting-Verhalten, sodass lokale Python-Pakete und die Automount-Konfiguration nicht mehr automatisch unterstützt werden.

With this release, we're beginning to enforce the deprecations discussed in the 1.0 migration guide. Going forward, we'll include breaking changes for outstanding deprecations in 1.Y.0 releases, so we recommend pinning Modal on a minor version (modal~=1.0.0) if you have not addressed the existing warnings. While we'll continue to make improvements to the Modal API, new deprecations will be introduced at a substantially reduced rate, and support windows for older client versions will lengthen.

⚠️ In this release, we've made some breaking changes to Modal's "automounting" behavior.️ If you've not already adapted your source code in response to warnings about automounting, Apps built with 1.0+ will have different files included and may not run as expected:

  • Previously, Modal containers would automatically include the source for local Python packages that were imported by your Modal App. Going forward, it will be necessary to explicitly include such packages in the Image (i.e., with modal.Image.add_local_python_source).
  • Support for the automount configuration (MODAL_AUTOMOUNT) has been removed; this environment variable will no longer have any effect. …

Originalquelle(öffnet in neuem Tab)Problem melden