Skip to content

Commit f73368a

Browse files
zaoliu-awsLiu
authored andcommitted
fix: integration test in anticipate of ProfilerConfig API changes
Co-authored-by: Liu <[email protected]>
1 parent 8348c7d commit f73368a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/integ/test_profiler.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def test_mxnet_with_default_profiler_config_and_profiler_rule(
9393
)
9494

9595
job_description = mx.latest_training_job.describe()
96+
if "DisableProfiler" in job_description["ProfilerConfig"]:
97+
job_description["ProfilerConfig"].pop("DisableProfiler")
9698
assert (
9799
job_description["ProfilerConfig"]
98100
== ProfilerConfig(
@@ -153,6 +155,8 @@ def test_mxnet_with_custom_profiler_config_then_update_rule_and_config(
153155
)
154156

155157
job_description = mx.latest_training_job.describe()
158+
if "DisableProfiler" in job_description["ProfilerConfig"]:
159+
job_description["ProfilerConfig"].pop("DisableProfiler")
156160
assert job_description.get("ProfilerConfig") == profiler_config._to_request_dict()
157161
assert job_description.get("ProfilingStatus") == "Enabled"
158162

@@ -221,6 +225,8 @@ def test_mxnet_with_built_in_profiler_rule_with_custom_parameters(
221225
)
222226

223227
job_description = mx.latest_training_job.describe()
228+
if "DisableProfiler" in job_description["ProfilerConfig"]:
229+
job_description["ProfilerConfig"].pop("DisableProfiler")
224230
assert job_description.get("ProfilingStatus") == "Enabled"
225231
assert (
226232
job_description.get("ProfilerConfig")
@@ -292,6 +298,8 @@ def test_mxnet_with_profiler_and_debugger_then_disable_framework_metrics(
292298
)
293299

294300
job_description = mx.latest_training_job.describe()
301+
if "DisableProfiler" in job_description["ProfilerConfig"]:
302+
job_description["ProfilerConfig"].pop("DisableProfiler")
295303
assert job_description["ProfilerConfig"] == profiler_config._to_request_dict()
296304
assert job_description["DebugHookConfig"] == debugger_hook_config._to_request_dict()
297305
assert job_description.get("ProfilingStatus") == "Enabled"

0 commit comments

Comments
 (0)