Skip to content

Commit

Permalink
cached_property for backend in Icon4pyRunConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
OngChia committed Jan 17, 2025
1 parent 12261ff commit 027f770
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@
#
# Please, refer to the LICENSE file in the root directory.
# SPDX-License-Identifier: BSD-3-Clause

import dataclasses
import datetime
import functools
import logging

from icon4py.model.atmosphere.diffusion import diffusion
@@ -50,7 +50,7 @@ def __post_init__(self):
f"Available backends are {', '.join([f'{k}' for k in model_backends.BACKENDS.keys()])}"
)

@property
@functools.cached_property
def backend(self):
return model_backends.BACKENDS[self.backend_name]

0 comments on commit 027f770

Please sign in to comment.