Skip to content

Commit

Permalink
dont import ElasticConfig at toplevel
Browse files Browse the repository at this point in the history
Signed-off-by: Niels Bantilan <[email protected]>
  • Loading branch information
cosmicBboy committed May 12, 2023
1 parent afacfc7 commit 064dd9a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Any, Callable, Dict, Optional, Union

import cloudpickle
from flyteidl.plugins.pytorch_pb2 import DistributedPyTorchTrainingTask, ElasticConfig
from flyteidl.plugins.pytorch_pb2 import DistributedPyTorchTrainingTask
from google.protobuf.json_format import MessageToDict

import flytekit
Expand Down Expand Up @@ -227,6 +227,8 @@ def get_custom(self, settings: SerializationSettings) -> Optional[Dict[str, Any]
"""
return super().get_custom(settings)
else:
from flyteidl.plugins.pytorch_pb2 import ElasticConfig

elastic_config = ElasticConfig(
rdzv_backend=self.rdzv_backend,
min_replicas=self.min_nodes,
Expand Down

0 comments on commit 064dd9a

Please sign in to comment.