-
Notifications
You must be signed in to change notification settings - Fork 899
Open
Description
What you would like to be added?
Instead of having individual tests to verify build objects, we might want to run EnforceMLPolicy() and Build() functions in TestFlux test akin to how MPI does it. See
trainer/pkg/runtime/framework/plugins/mpi/mpi_test.go
Lines 855 to 868 in bd4c3ae
| err = p.(framework.EnforceMLPolicyPlugin).EnforceMLPolicy(tc.info, tc.trainJob) | |
| if diff := gocmp.Diff(tc.wantMLPolicyError, err, cmpopts.EquateErrors()); len(diff) != 0 { | |
| t.Errorf("Unexpected error from EnforceMLPolicy (-want, +got): %s", diff) | |
| } | |
| if diff := gocmp.Diff(tc.wantInfo, tc.info, | |
| cmpopts.SortSlices(func(a, b string) bool { return a < b }), | |
| cmpopts.SortMaps(func(a, b int) bool { return a < b }), | |
| utiltesting.PodSetEndpointsCmpOpts, | |
| ); len(diff) != 0 { | |
| t.Errorf("Unexpected info from EnforceMLPolicy (-want, +got): %s", diff) | |
| } | |
| var objs []apiruntime.ApplyConfiguration | |
| objs, err = p.(framework.ComponentBuilderPlugin).Build(ctx, tc.info, tc.trainJob) | |
| if diff := gocmp.Diff(tc.wantBuildError, err, cmpopts.EquateErrors()); len(diff) != 0 { |
Why is this needed?
It mirrors the testing strategy of the MPI plugin.
Love this feature?
Give it a π We prioritize the features with most π
Reactions are currently unavailable