Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

fitness calculators | oring properties #123

Open
emaxerrno opened this issue Feb 15, 2017 · 3 comments
Open

fitness calculators | oring properties #123

emaxerrno opened this issue Feb 15, 2017 · 3 comments

Comments

@emaxerrno
Copy link

hi @spodila just testing out fenzo

Seeing the binpackingfitnescalculators.* it's effectively


sum ( fitness_i( request ).... + fitness_n( request) ) /  total_fitness_fns 

# or | fitness |   

Wondering if it'd be worth it to make it OR objects... so that one can do


builder.
           .....
           .withFitnessCalculator ( Fitness1 | Fitness2 | Fitness3 )
           .build()

Interested in a patch?

I guess two things:

  1. You can use constraints to do what I want - effectively further filtering of machines to offers
  2. Since there are fairly small set of resources on mesos (cpu, mem, gpu, bandwidth)... it's not really too bad to have 4 or even 10 (in the future) that are hard coded since for most workloads you'll need CPU + mem so the permutations are not that many ... w/ or w/out network, w/ or w/out gpu.. etc.
@spodila
Copy link
Contributor

spodila commented Feb 15, 2017

Hello @senior7515 thank you, hope you find it useful.

Could you elaborate on what you mean by the OR operation here?
Fitness functions are expected to return a double value between 0.0 to 1.0. So, does your expression translate to, for example,

.withFitnessCalculator ( 0.1 | 0.4 | 0.67 )

Sounds like I may have misinterpreted your suggestion?

@emaxerrno
Copy link
Author

emaxerrno commented Feb 16, 2017

ah sorry, I mean to say combiner operation.

Say you have binpacking.cpu as well as binpacking.mem

you would then be able to say:

.withFitnessCalculator (binpacking.cpu | binpacking.mem)

The result, internally would be: ;

double result = (binpacking.cpu ( request ) + binpacking.mem( request ) )/ 2.0

which is exactly what happens right now internally.

@spodila
Copy link
Contributor

spodila commented Feb 16, 2017

OK, this sounds good. Looking forward to your PR.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants