Skip to content

Commit

Permalink
Use explicit imports from megatronllm_deployable.py to avoid depedenc…
Browse files Browse the repository at this point in the history
…y chain

Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
  • Loading branch information
janekl committed Dec 23, 2024
1 parent 17e7101 commit d7414a5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion nemo/deploy/nlp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from nemo.deploy.nlp.megatronllm_deployable import MegatronLLMDeploy, MegatronLLMDeployable
from nemo.deploy.nlp.query_llm import NemoQueryLLM, NemoQueryLLMPyTorch
2 changes: 1 addition & 1 deletion scripts/deploy/nlp/deploy_inframework_triton.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

megatron_llm_supported = True
try:
from nemo.deploy.nlp import MegatronLLMDeploy
from nemo.deploy.nlp.megatronllm_deployable import MegatronLLMDeploy
except Exception as e:
LOGGER.warning(f"Cannot import MegatronLLMDeployable, it will not be available. {type(e).__name__}: {e}")
megatron_llm_supported = False
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/nlp/deploy_triton.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class UsageError(Exception):

megatron_llm_supported = True
try:
from nemo.deploy.nlp import MegatronLLMDeployable
from nemo.deploy.nlp.megatronllm_deployable import MegatronLLMDeployable
except Exception as e:
LOGGER.warning(f"Cannot import MegatronLLMDeployable, it will not be available. {type(e).__name__}: {e}")
megatron_llm_supported = False
Expand Down
2 changes: 1 addition & 1 deletion tests/deploy/nemo_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import torch

from nemo.deploy.nlp import MegatronLLMDeployable
from nemo.deploy.nlp.megatronllm_deployable import MegatronLLMDeployable
from tests.infer_data_path import get_infer_test_data

run_export_tests = True
Expand Down
3 changes: 2 additions & 1 deletion tests/export/nemo_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@

in_framework_supported = True
try:
from nemo.deploy.nlp import MegatronLLMDeployable, NemoQueryLLMPyTorch
from nemo.deploy.nlp import NemoQueryLLMPyTorch
from nemo.deploy.nlp.megatronllm_deployable import MegatronLLMDeployable
except Exception as e:
LOGGER.warning(
"Cannot import MegatronLLMDeployable or NemoQueryLLMPyTorch,"
Expand Down

0 comments on commit d7414a5

Please sign in to comment.