Skip to content

Commit

Permalink
Changes as of comments from 6 Mar 2024, from PR 14
Browse files Browse the repository at this point in the history
  • Loading branch information
fmalatino committed Mar 6, 2024
1 parent d15abe9 commit 9f0477a
Show file tree
Hide file tree
Showing 29 changed files with 714 additions and 737 deletions.
38 changes: 7 additions & 31 deletions ndsl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from .buffer import Buffer
from .comm.boundary import Boundary, SimpleBoundary
from .comm.communicator import CubedSphereCommunicator, TileCommunicator
from .comm.local_comm import AsyncResult, ConcurrencyError, LocalComm
from .comm.local_comm import LocalComm
from .comm.mpi import MPIComm
from .comm.null_comm import NullAsyncResult, NullComm
from .comm.null_comm import NullComm
from .comm.partitioner import CubedSpherePartitioner, TilePartitioner
from .constants import ConstantVersions
from .dsl.caches.codepath import FV3CodePath
Expand All @@ -16,46 +14,24 @@
StorageReport,
)
from .dsl.dace.wrapped_halo_exchange import WrappedHaloUpdater
from .dsl.stencil import (
CompareToNumpyStencil,
FrozenStencil,
GridIndexing,
StencilFactory,
TimingCollector,
)
from .dsl.stencil import FrozenStencil, GridIndexing, StencilFactory, TimingCollector
from .dsl.stencil_config import CompilationConfig, RunMode, StencilConfig
from .exceptions import OutOfBoundsError
from .halo.data_transformer import (
HaloDataTransformer,
HaloDataTransformerCPU,
HaloDataTransformerGPU,
HaloExchangeSpec,
)
from .halo.data_transformer import HaloExchangeSpec
from .halo.updater import HaloUpdater, HaloUpdateRequest, VectorInterfaceHaloUpdater
from .initialization.allocator import QuantityFactory, StorageNumpy
from .initialization.allocator import QuantityFactory
from .initialization.sizer import GridSizer, SubtileGridSizer
from .logging import ndsl_log
from .monitor.netcdf_monitor import NetCDFMonitor
from .monitor.protocol import Protocol
from .monitor.zarr_monitor import ZarrMonitor
from .namelist import Namelist
from .optional_imports import RaiseWhenAccessed
from .performance.collector import (
AbstractPerformanceCollector,
NullPerformanceCollector,
PerformanceCollector,
)
from .performance.collector import NullPerformanceCollector, PerformanceCollector
from .performance.config import PerformanceConfig
from .performance.profiler import NullProfiler, Profiler
from .performance.report import Experiment, Report, TimeReport
from .performance.timer import NullTimer, Timer
from .quantity import (
BoundaryArrayView,
BoundedArrayView,
Quantity,
QuantityHaloSpec,
QuantityMetadata,
)
from .quantity import Quantity
from .testing.dummy_comm import DummyComm
from .types import Allocator, AsyncRequest, NumpyModule
from .units import UnitsError
Expand Down
7 changes: 7 additions & 0 deletions ndsl/checkpointer/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import abc


class Checkpointer(abc.ABC):
@abc.abstractmethod
def __call__(self, savepoint_name, **kwargs):
...
2 changes: 1 addition & 1 deletion ndsl/checkpointer/null.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ndsl.typing import Checkpointer
from ndsl.checkpointer.base import Checkpointer


class NullCheckpointer(Checkpointer):
Expand Down
2 changes: 1 addition & 1 deletion ndsl/checkpointer/snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import numpy as np

from ndsl.checkpointer.base import Checkpointer
from ndsl.optional_imports import cupy as cp
from ndsl.optional_imports import xarray as xr
from ndsl.typing import Checkpointer


def make_dims(savepoint_dim, label, data_list):
Expand Down
2 changes: 1 addition & 1 deletion ndsl/checkpointer/thresholds.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import numpy as np

from ndsl.checkpointer.base import Checkpointer
from ndsl.quantity import Quantity
from ndsl.typing import Checkpointer


try:
Expand Down
2 changes: 1 addition & 1 deletion ndsl/checkpointer/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

import numpy as np

from ndsl.checkpointer.base import Checkpointer
from ndsl.checkpointer.thresholds import (
ArrayLike,
SavepointName,
SavepointThresholds,
cast_to_ndarray,
)
from ndsl.optional_imports import xarray as xr
from ndsl.typing import Checkpointer


def _clip_pace_array_to_target(
Expand Down
Loading

0 comments on commit 9f0477a

Please sign in to comment.