Azure / Azure-TDSP-Utilities

Utilities and scripts developed as part of Microsoft's Team Data Science Process for productive data science
Creative Commons Attribution 4.0 International
373 stars 275 forks source link

add_conf_code_to_report() got an unexpected keyword argument 'local_ns' #47

Closed iboulahna closed 4 years ago

iboulahna commented 4 years ago

Hello,

Thanks for sharing this tools.

I'm trying to generate IDEAR report using jupyter notebook but I have the beloz errors regarding the add_conf_code_to_report() function. I have never used the magic functions So could anyone please help get through this error.


TypeError Traceback (most recent call last)

in ----> 1 get_ipython().run_cell_magic('add_conf_code_to_report', '', "import os\nworkingDir = 'C:\\\\GitRepos\\\\DGADSCommon\\\\Utilities\\\\DataScienceUtilities\\\\DataReport-Utils\\\\Python'\nos.chdir(workingDir)\n\nconf_file = '.\\\\para-adult.yaml'\nSample_Size = 10000\n\nexport_dir = '.\\\\tmp\\\\'\n") ~/.local/lib/python3.6/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell) 2360 with self.builtin_trap: 2361 args = (magic_arg_s, cell) -> 2362 result = fn(*args, **kwargs) 2363 return result 2364 TypeError: add_conf_code_to_report() got an unexpected keyword argument 'local_ns'
LegalBIGuy commented 4 years ago

This happened to me because I was on a later version of Python. This project has not been updated in a year and a half. To get it working, make sure your conda environment conforms to the idear_env.yml. I had to make two changes in my YAML file. I updated Python to 3.5.4 and removed the versions for scipy and scikit-learn. I also needed to install pywin32.

Two other tweaks I also needed to remove -sys-prefix from the nbextension command: jupyter nbextension enable --py widgetsnbextension I have not researched this one so cannot provide a reason why -sys-prefix causes an issue

Finally, you need to manually install the kernel: python -m ipykernel install --user --name idear_env --display-name "Python (idear_env)"

After all of these changes, it works.

It would be nice to here if this project is being abandoned, or will be replaced or updated at some time

iboulahna commented 4 years ago

Thanks a lot for you response. It really helped solve the problem the add_conf_code_to_report() function. Unfortunately, there is an other issue with the widgets (i will open another issue).

Hope this is gonna work because i think it is a great tool.

Thanks again, Ismail