Skip to content

Conversation

davidLif
Copy link
Collaborator

Base code fro prePredicate with node allocation checks instead of domain sum

@davidLif davidLif force-pushed the DavidL/29136/topologyFiltering branch from 749d1cf to 12aafda Compare July 27, 2025 10:06
Comment on lines 52 to 66
t.calcTreeAlocationData(job, topologyTree)

// Get best domains for the job
jobAllocateableDomain, err := t.getBestjobAllocateableDomains(job, topologyTree)
if err != nil {
return err
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any case where these two are not called together? If not, just call calcTreeAlocationData from inside getBestjobAllocateableDomains

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it makes sense to separate them as 2 different steps in the proccess:
1- Get matching topology
2- See if we have the result in cache
3- Calculate allocation data for the given job on all tree nodes
4- Get the domains which satisfies all the requirments
5- Save to cache

@davidLif davidLif force-pushed the DavidL/29136/topologyFiltering branch 2 times, most recently from 30b5497 to 388fe85 Compare July 28, 2025 06:21
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/scores 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology 69.87% (-22.07%) 💀 💀

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/scores/scores.go 0.00% (ø) 0 0 0
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_plugin.go 92.59% (+0.93%) 54 (+6) 50 (+6) 4 👍
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_plugin_job_filtering.go 60.25% (+60.25%) 161 (+161) 97 (+97) 64 (+64) 🌟
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_structs.go 92.86% (ø) 14 13 1

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_plugin_job_filtering_test.go

Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/scores 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology 70.74% (-21.19%) 💀 💀

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/scores/scores.go 0.00% (ø) 0 0 0
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_plugin.go 92.59% (+0.93%) 54 (+6) 50 (+6) 4 👍
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_plugin_job_filtering.go 61.49% (+61.49%) 161 (+161) 99 (+99) 62 (+62) 🌟
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_structs.go 92.86% (ø) 14 13 1

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_plugin_job_filtering_test.go

@davidLif davidLif force-pushed the DavidL/29136/topologyFiltering branch from ed5440a to 4cd88c1 Compare July 31, 2025 09:28
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/scores 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology 67.77% (-24.16%) 💀 💀

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/scores/scores.go 0.00% (ø) 0 0 0
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_plugin.go 94.59% (+2.93%) 37 (-11) 35 (-9) 2 (-2) 👍
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_plugin_job_filtering.go 60.37% (+60.37%) 164 (+164) 99 (+99) 65 (+65) 🌟
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_structs.go 90.00% (-2.86%) 10 (-4) 9 (-4) 1 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_plugin_job_filtering_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/scheduler/plugins/topology/topology_plugin_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants