argiopetech / base

Bayesian Analysis for Stellar Evolution
http://webfac.db.erau.edu/~vonhippt/base9/
11 stars 4 forks source link

inappropriate yaml files should not cause crashes #54

Closed tedvh closed 7 years ago

tedvh commented 10 years ago

If the yaml file is missing some entries (or has extra unneeded entries) it seems to cause mpiMcmc to crash. With new features being added, the yaml file is in a state of flux. It would be better for code to prompt for parameters missing from the yaml file, or if that is too involved, tell the user which ones need to be added. It would also be good if the code could ignore parameters in the yaml files that were unfamiliar.

argiopetech commented 10 years ago

This wouldn't be too hard to do. The main downside I see is that it would encourage manual inputting rather than the automation effect we were initially going for with the YAML configurations.

Unknown parameters should be ignored currently. I will test this in the near future and ensure it is the case.

tedvh commented 10 years ago

thnaks!

On 1/2/14 7:58 PM, Elliot Robinson wrote:

This wouldn't be too hard to do. The main downside I see is that it would encourage manual inputting rather than the automation effect we were initially going for with the YAML configurations.

Unknown parameters should be ignored currently. I will test this in the near future and ensure it is the case.

— Reply to this email directly or view it on GitHub https://github.com/argiopetech/base/issues/54#issuecomment-31498530.

Ted von Hippel

Department of Physical Sciences Embry-Riddle Aeronautical University 600 S. Clyde Morris Boulevard Daytona Beach, FL 32114-3900 386-226-7751

maxvonhippel commented 7 years ago

I just partially fixed this. If there is an actual error with the YAML file, it still crashes, but if it's just missing information, it will ask you for the info via command prompt and then move on once you enter the necessary info. See my pull request for more: https://github.com/argiopetech/base/pull/60

maxvonhippel commented 7 years ago

This brings us to a design question. You get multiple opportunities to input information. First you do so on the command line. If you fail to do that, the code looks in the YAML. And if it doesn't find it there, it asks you via command prompt.

So the question is, let's say you put in bad information. Regardless of whether this happens on the command line, in the YAML, or via command line prompt, bad information causes an error message and a crash (I mean, a graceful exit, not some sort of nasty memory explosion or anything).

If someone enters bad information, do we want to give them another chance? In other words, instead of crashing, should we print an error message and then try again?

This would not be a hard feature to implement and I'd be happy to do it. It's just a question of what design we think is best. Let me know! (And if we do not want to provide another "chance" via command prompt, then I think we can go ahead and close this issue.)

tedvh commented 7 years ago

Hi Max -

good questions and thoughts. I'd prefer not to give someone another try via prompting if they entered bad information because a) it can be hard to define bad information in some variables, b) it would be better if the user fixed that information on the command line or in the yaml file because otherwise they are likely to do it again, and c) some users may just enter junk again, not knowing what they are supposed to do.

It would be better if the code trapped for obviously bad information (strings instead of numbers, for instance, or where numbers are known to be out of bounds) and then printed a useful error message.

thanks, -Ted

On 1/6/17 4:27 PM, Max von Hippel wrote:

This brings us to a design question. You get multiple opportunities to input information. First you do so on the command line. If you fail to do that, the code looks in the YAML. And if it doesn't find it there, it asks you via command prompt.

So the question is, let's say you put in bad information. Regardless of whether this happens on the command line, in the YAML, or via command line prompt, bad information causes an error message and a crash (I mean, a graceful exit, not some sort of nasty memory explosion or anything).

If someone enters bad information, do we want to give them another chance? In other words, instead of crashing, should we print an error message and then try again?

This would not be a hard feature to implement and I'd be happy to do it. It's just a question of what design we think is best. Let me know! (And if we do not want to provide another "chance" via command prompt, then I think we can go ahead and close this issue.)

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/argiopetech/base/issues/54#issuecomment-270941874, or mute the thread https://github.com/notifications/unsubscribe-auth/AEOeMpOHJz6X7J_hx5PIANzqROZw6wf4ks5rPmuMgaJpZM4BXHHV.

maxvonhippel commented 7 years ago

Ok sounds good. That and logging will be the purpose of my next pr.