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

Trouble defining a Log Directory #13

Closed
Sean-Reilly opened this issue Aug 11, 2021 · 3 comments
Closed

Trouble defining a Log Directory #13

Sean-Reilly opened this issue Aug 11, 2021 · 3 comments

Comments

@Sean-Reilly
Copy link

Hi Brenden,

I am having trouble setting a log directory for it to save the results to. I’ve set it in my config.json Similarly to the config_common.json file you have in your repository. I have a directory named ./log but for some reason it keeps giving me the same error WARNING: logdir not provided results will not be saved to file. Could you specify exactly where the logdir needs to be set so I can check to see where the issue is? For reference I am running DSO from a python script (I.e. similarly to the scipy interface).

@brendenpetersen
Copy link
Collaborator

Hi @Sean-Reilly, if you are running with the Python interface, you are likely creating a DeepSymbolicOptimizer object, correct? You instantiate that object by passing it a path to a config file, e.g.

model = DeepSymbolicOptimizer("path/to/my_config.json")

Inside your config JSON file, in the "experiment" top-level key, you specify the path to your log directory via the "logdir" parameter, e.g.:

{
    "experiment" : {
        "logdir" : "/path/to/log/directory"
    }
}

It should then save to file when running model.train().

Relative paths are supported, but I've found absolute paths to be more stable so it doesn't depend on where you run your Python script from.

Another note is that the default value for "logdir" is "./log", so it could be that you overwrote the parameter at some point? If the above doesn't help, if you could write a minimum working example that would be helpful. Thanks!

@Sean-Reilly
Copy link
Author

I was using the DeepSymbolicRegressor function, which I’ve discovered seems to have it’s log output disabled in the __init__ file. I’ll use the DeepSymbolicOptimizer from now on to avoid this issue.

@brendenpetersen
Copy link
Collaborator

Ah I see. yes, for the DeepSymbolicRegressor we turned off file saving because that likely not expected behavior in an sklearn-like interface. We should add an option to turn that back on...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants