add placement policy for NAP workload
Description
Support creating new workload policies in xpk workload create. This enables scheduling of different topologies within the same GKE cluster through NAP which is very important for sharing capacity easily across multiple test users.
Issue
https://b.corp.google.com/issues/455642310 NAP previously did not support creating workload policies during workload create and only during cluster create so only just one topology would be supported for that cluster limited NAP to just one topology per cluster AKA making NAP not useful! In that scenario we would just use static clusters.
Testing
Created a tpu7x nap cluster and created workloads of different sizes and saw nodepools created and workloads running.
🤖 Hi @zxhe-sean, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.
@scaliby can you help get https://github.com/AI-Hypercomputer/xpk/pull/828 over the finish line? It was relatively easy to support creating workload policies in xpk workload create but we hacked it by copying some code to avoid a circular dependency in the file imports?
Maybe pull that PR and modify it? We also didn't change scheduler_test.py. Thank you!
@Obliviour we're just behind the corner with subsliicing support, so let's hold on on merging this. This will be supported through sub-slicing and should be possible to be used by you tomorrow.
Closing as this was addressed in https://github.com/AI-Hypercomputer/xpk/pull/847