Beispiel #1
0
 def _get_affinity(self, affinity):
     return get_affinity(affinity=affinity,
                         default_affinity=conf.get(AFFINITIES_EXPERIMENTS))
Beispiel #2
0
 def _get_affinity(self, affinity):
     return get_affinity(affinity=affinity,
                         default_affinity=conf.get(AFFINITIES_TENSORBOARDS))
Beispiel #3
0
 def _get_affinity(self, affinity):
     return get_affinity(affinity=affinity,
                         default_affinity=conf.get(AFFINITIES_JOBS))
Beispiel #4
0
 def test_pod_affinity(self):
     assert get_affinity(None, None) is None
     assert get_affinity({'foo': 'bar'}, None) == {'foo': 'bar'}
     assert get_affinity(None, {"foo": "bar"}) == {'foo': 'bar'}
     assert get_affinity({'foo': 'bar'}, {"foo": "moo"}) == {'foo': 'bar'}