-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question regarding the coupling between problems and files #16
Comments
Combinatorial problems implemented (ρMNK-Landscapes, Knapsack and MUBQP) are using instance files. These files are generated with generators (noted in the documentation) by using specific parameters for each instance. I think it will be complicated to implement these generators in our framework to generate exactly the same instance file with the same seed (to compare the results for the same instance between two algorithms with another framework). Problem classes are strongly inspired by the example code of the generator's authors (for example: http://svn.code.sf.net/p/mocobench/code/trunk/rmnk/generator/java/) |
Since the implemented combinatorial problems are coupled with specific type of problems it should be instantiated using the specific file type and version. file_mapping = {
"rmnk_0_2_100_1_0": ...
}
class Rmnk:
def __init__(file="rmnk_0_2_100_1_0"):
if isinstance(file, str):
.... That way your avoiding the clutter and give the ability to the user to specify the verion of the problem or to pass the file itself is he/she wants to. |
Sorry but I am not sure to understand, you propose to replace the str attribute I don't understand the dict |
Maybe something like Pooch can be of help? Although that's more aimed at larger files. |
My point is that requiring external files (even for known problems) makes the things difficult. Take a look here. My proposal is to use instance files directly as a last resort. 1) provide the data directly (I know cumbersome), 2) Using a factory and 3)instance files. |
Even for the example in the readme a user is instructed to go somewhere and download a file. |
I added all the parameters in problems to allow the user to not use the instance file : |
Let's keep this issue out of the review |
Related: openjournals/joss-reviews#2974
Why the problem classes are coupled with files and not with other data structures?
The text was updated successfully, but these errors were encountered: