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

unable to import ImpactTracker from experiment_impact_tracker because of pandas error. #82

Open
roshnaeem opened this issue May 3, 2024 · 1 comment

Comments

@roshnaeem
Copy link

Importing ImpactTracker from experiment_impact_tracker is throwing error for json_normalize. It is outdated and needs to be modified in the code to match with the current version of pandas. This line needs to be changed to fix the error thrown by pandas.

{
	"name": "ImportError",
	"message": "cannot import name 'json_normalize' from 'pandas.io.json' (/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pandas/io/json/__init__.py)",
	"stack": "---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[6], line 1
----> 1 from experiment_impact_tracker.compute_tracker import ImpactTracker

File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/experiment_impact_tracker/compute_tracker.py:23
     21 import psutil
     22 from experiment_impact_tracker.cpu import rapl
---> 23 from experiment_impact_tracker.data_utils import *
     24 from experiment_impact_tracker.cpu.common import get_my_cpu_info
     25 from experiment_impact_tracker.cpu.intel import get_rapl_power

File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/experiment_impact_tracker/data_utils.py:3
      1 import pickle
      2 import ujson as json
----> 3 from pandas.io.json import json_normalize
      4 from datetime import datetime
      5 import os

ImportError: cannot import name 'json_normalize' from 'pandas.io.json' (/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pandas/io/json/__init__.py)"
}
@roshnaeem
Copy link
Author

i just checked prs, as this issue has been already addressed in #77.
@Breakend, can you please merge it.

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

1 participant