Skip to content

Commit

Permalink
rename command
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Jun 7, 2024
1 parent f988a7f commit a54b52f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
25 changes: 16 additions & 9 deletions src/anemoi/inference/checkpoint/metadata/version_0_2_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,24 +218,31 @@ class EnsembleRequest(MultiRequest):
pass


class GridRequest(MultiRequest):
class MultiGridRequest(MultiRequest):
@property
def grid(self):
raise NotImplementedError()
grids = [dataset.grid for dataset in self.datasets]
raise NotImplementedError(";".join(str(g) for g in grids))

@property
def area(self):
raise NotImplementedError()
areas = [dataset.area for dataset in self.datasets]
raise NotImplementedError(";".join(str(g) for g in areas))


class CutoutRequest(MultiRequest):
@property
def grid(self):
raise NotImplementedError()
class GridRequest(MultiGridRequest):
pass


class CutoutRequest(MultiGridRequest):
pass


class ThinningRequest(Forward):

@property
def area(self):
raise NotImplementedError()
def grid(self):
return f"thinning({self.forward.grid})"


class SelectRequest(Forward):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from . import Command


class CheckpointCmd(Command):
class InspectCmd(Command):

need_logging = False

Expand Down Expand Up @@ -65,4 +65,4 @@ def run(self, args):
print("variables:", c.variables)


command = CheckpointCmd
command = InspectCmd

0 comments on commit a54b52f

Please sign in to comment.