Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'http_port' parameter name in DeployPyTriton usages and update .qnemo compress=True path #11747

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/llm/sft/hf_vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
triton_model_name=args.triton_model_name,
triton_model_version=1,
max_batch_size=64,
port=8000,
http_port=8000,
address="0.0.0.0",
)

Expand Down
2 changes: 1 addition & 1 deletion nemo/deploy/deploy_pytriton.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DeployPyTriton(DeployBase):
tensor_parallelism_size=1,
)

nm = DeployPyTriton(model=trt_llm_exporter, triton_model_name="model_name", port=8000)
nm = DeployPyTriton(model=trt_llm_exporter, triton_model_name="model_name", http_port=8000)
nm.deploy()
nm.run()
nq = NemoQueryLLM(url="localhost", model_name="model_name")
Expand Down
4 changes: 3 additions & 1 deletion nemo/export/quantize/quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import tarfile
from contextlib import nullcontext
from typing import Callable, Optional
Expand Down Expand Up @@ -250,5 +251,6 @@ def export(self, model: MegatronGPTModel):
if dist.get_rank() == 0:
save_artifacts(model, export_dir)
if compress:
with tarfile.open(self.export_config.save_path, "w:gz") as tar:
os.makedirs(os.path.dirname(self.export_config.save_path), exist_ok=True)
with tarfile.open(self.export_config.save_path, "w") as tar:
tar.add(export_dir, arcname="./")
2 changes: 1 addition & 1 deletion scripts/deploy/multimodal/deploy_triton.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def nemo_deploy(argv):
triton_model_name=args.triton_model_name,
triton_model_version=args.triton_model_version,
max_batch_size=args.max_batch_size,
port=args.triton_port,
http_port=args.triton_port,
address=args.triton_http_address,
)

Expand Down
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 @@ -91,7 +91,7 @@ def nemo_deploy(argv):
triton_model_name=args.triton_model_name,
triton_model_version=args.triton_model_version,
max_batch_size=args.max_batch_size,
port=args.triton_port,
http_port=args.triton_port,
address=args.triton_http_address,
)

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 @@ -411,7 +411,7 @@ def nemo_deploy(argv):
triton_model_name=args.triton_model_name,
triton_model_version=args.triton_model_version,
max_batch_size=args.max_batch_size,
port=args.triton_port,
http_port=args.triton_port,
address=args.triton_http_address,
streaming=args.enable_streaming,
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/nlp/deploy_vllm_triton.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def nemo_deploy(argv):
triton_model_name=args.triton_model_name,
triton_model_version=args.triton_model_version,
max_batch_size=args.max_batch_size,
port=args.triton_port,
http_port=args.triton_port,
address=args.triton_http_address,
streaming=args.enable_streaming,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/deploy/nemo_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def run_in_framework_inference(
nm = DeployPyTriton(
model=model,
triton_model_name=model_name,
port=8000,
http_port=8000,
)
nm.deploy()
nm.run()
Expand Down Expand Up @@ -286,7 +286,7 @@ def run_trt_llm_inference(
nm = DeployPyTriton(
model=trt_llm_exporter,
triton_model_name=model_name,
port=8000,
http_port=8000,
)
nm.deploy()
nm.run()
Expand Down
4 changes: 2 additions & 2 deletions tests/export/nemo_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def run_inference(
nm = DeployPyTriton(
model=exporter,
triton_model_name=model_name,
port=8000,
http_port=8000,
)
nm.deploy()
nm.run()
Expand Down Expand Up @@ -579,7 +579,7 @@ def run_in_framework_inference(
nm = DeployPyTriton(
model=deployed_model,
triton_model_name=model_name,
port=8000,
http_port=8000,
)
nm.deploy()
nm.run()
Expand Down
Loading