Skip to content

Commit

Permalink
inject static method on class level in enrich
Browse files Browse the repository at this point in the history
  • Loading branch information
madhur-ob committed Sep 29, 2024
1 parent 3e6e576 commit a014447
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 2 additions & 0 deletions metaflow/plugins/argo/argo_workflows_deployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,5 @@ def _enrich_deployed_flow(self, deployed_flow: DeployedFlow):
"delete": delete,
}
)

setattr(DeployedFlow, "from_deployment", staticmethod(from_deployment))
12 changes: 0 additions & 12 deletions metaflow/runner/deployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,18 +230,6 @@ def __init__(self, deployer: "DeployerImpl"):
self.flow_name = self.deployer.flow_name
self.metadata = self.deployer.metadata

@staticmethod
def from_deployment(
identifier: str,
metadata: str = None,
impl: str = "argo-workflows",
):
if impl == "argo-workflows": # TODO: use a metaflow config variable for `impl`
from metaflow.plugins.argo.argo_workflows_deployer import from_deployment

return from_deployment(identifier, metadata)
raise NotImplementedError("This method is not available for: %s" % impl)

def _enrich_object(self, env):
"""
Enrich the DeployedFlow object with additional properties and methods.
Expand Down

0 comments on commit a014447

Please sign in to comment.