Skip to content
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 .gitlab/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ python3 test/python/prep_xfer_perf.py array
echo "==== Running python examples ===="
cd examples/python
python3 nixl_api_example.py
python3 partial_md_example.py
python3 partial_md_example.py --init-port "$(get_next_tcp_port)" --target-port "$(get_next_tcp_port)"
python3 partial_md_example.py --etcd
python3 query_mem_example.py

Expand Down
16 changes: 14 additions & 2 deletions examples/python/partial_md_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ def invalidate_target_metadata(
action="store_true",
help="Use ETCD for metadata exchange. Must set NIXL_ETCD_ENDPOINTS environment variable.",
)
parser.add_argument(
"--init-port",
type=int,
default=7777,
help="Port for initiator used in socket exchange (disabled when using ETCD)",
)
parser.add_argument(
"--target-port",
type=int,
default=5555,
help="Port for target used in socket exchange (disabled when using ETCD)",
)
args = parser.parse_args()

logger.info(
Expand All @@ -101,8 +113,8 @@ def invalidate_target_metadata(

# Needed for socket exchange
ip_addr = "127.0.0.1"
target_port = 5555
init_port = 7777
target_port = args.target_port
init_port = args.init_port
# Example using nixl_agent_config
agent_config1 = nixl_agent_config(True, True, target_port)

Expand Down
Loading