Skip to content
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

verbose parameter #68

Open
hadipourh opened this issue Nov 10, 2022 · 1 comment
Open

verbose parameter #68

hadipourh opened this issue Nov 10, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@hadipourh
Copy link

Hi all,

I create this issue to discuss the verbose parameter.
I am feeding the solve command with the following arguments:

cp_inst.solve(timeout=time_limit, 
                      processes=self.num_of_threads, 
                      verbose=True, 
                      debug_output=Path("./debug_output.txt", intermediate_solutions=True),
                      optimisation_level=2)

My purpose is to see the solver's progress report on-the-fly through the terminal. This feature is available when we use Minizinc through the terminal. However, I could not find a configuration for this purpose in the Python interface. For example, the above configuration outputs the progress report when the running process terminates.
Is there any configuration to represent the solver's progress report on-the-fly through the terminal?

@Dekker1
Copy link
Member

Dekker1 commented Nov 10, 2022

The verbose and debug_output arguments have been included mostly for finding problems when MiniZinc Python wasn't giving users the expected behaviour. It was not intended for polling the solver progress.

This might be possible (I would think that we can directly output the stderr stream into the log), but it would require some more engineering. The particular problem is that we could have to manage two streams at the same time, likely requiring the splitting of the solutions() function implementation.

This does not have a high priority for me, but I would be happy to accept pull request if the benefit can be clearly shown, and the implementation is of high quality.

@Dekker1 Dekker1 added enhancement New feature or request help wanted Extra attention is needed labels Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants