-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
class GetPrompts(): | ||
def __init__(self): | ||
self.prompt_task = "I need help designing a novel score function that scoring a set of bins to assign an item. \ | ||
In each step, the item will be assigned to the bin with the maximum score. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final goal is to minimize the number of used bins." | ||
self.prompt_func_name = "score" | ||
self.prompt_func_inputs = ['item', 'bins'] | ||
self.prompt_func_outputs = ['scores'] | ||
self.prompt_inout_inf = "'item' and 'bins' are the size of current item and the rest capacities of feasible bins, which are larger than the item size. \ | ||
The output named 'scores' is the scores for the bins for assignment. " | ||
self.prompt_other_inf = "Note that 'item' is of type int, while 'bins' and 'scores' are both Numpy arrays. The novel function should be sufficiently complex in order to achieve better performance. It is important to ensure self-consistency." | ||
#Include the following imports at the beginning of the code: 'import numpy as np', and 'from numba import jit'. Place '@jit(nopython=True)' just above the 'priority' function definition." | ||
|
||
def get_task(self): | ||
return self.prompt_task | ||
|
||
def get_func_name(self): | ||
return self.prompt_func_name | ||
|
||
def get_func_inputs(self): | ||
return self.prompt_func_inputs | ||
|
||
def get_func_outputs(self): | ||
return self.prompt_func_outputs | ||
|
||
def get_inout_inf(self): | ||
return self.prompt_inout_inf | ||
|
||
def get_other_inf(self): | ||
return self.prompt_other_inf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters