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

weird summary table formatting in .yaml configs #48

Open
mxndrwgrdnr opened this issue Sep 26, 2018 · 4 comments
Open

weird summary table formatting in .yaml configs #48

mxndrwgrdnr opened this issue Sep 26, 2018 · 4 comments
Assignees

Comments

@mxndrwgrdnr
Copy link
Member

Haven't dug tooo deep into this to see if its happening for other template types but this is the first time I've seen it. Estimating a LargeMultinomialLogitStep() produces a nice looking summary table in a Jupyter notebook (see the last cell here), but a poorly formatted summary table in the .yaml config file generated by registering the step (see here). Low priority for now but maybe you've seen this before @smmaurer?

@smmaurer
Copy link
Member

This is a problem with all the templates, unfortunately, I think. It would be great to fix. Seems to be caused by differences in string encoding between python and yaml.

I'll do some digging and see if there's an easy fix. @janowicz has brought this up as well..

@smmaurer smmaurer self-assigned this Sep 26, 2018
@mxndrwgrdnr
Copy link
Member Author

OK, good to know. Gonna label it low priority for now.

@mxndrwgrdnr
Copy link
Member Author

It seems to me that the summary table formatting in the .yaml configs look exactly the same as it does in the jupyter notebooks when calling model.summary_table instead of print(model.summary_table). So whatever Python does to strings when calling print is probably what needs to happen before sending the string off to the .yaml.

@cvanoli
Copy link
Contributor

cvanoli commented Sep 6, 2019

I don't think the problem with the format in the yaml file is caused by the print(model.summary_table) before saving it. It does relate to the multiple sources to fit the model and specifically in the urbansim_templates, is the way the self.summary_table is saved. In the MNL, self.summary_table = str(results) https://github.com/UDST/urbansim_templates/blob/master/urbansim_templates/models/large_multinomial_logit.py#L486

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

No branches or pull requests

3 participants