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

[windows] Anaconda showing negative memory usage when using a higher memory #1621

Open
ping543f opened this issue Nov 13, 2019 · 4 comments
Open

Comments

@ping543f
Copy link

Platform

  • { windows 10 64 bit } (also add appropriate OS issue label (linux, windows, ...))
  • { 5.6.1} (use "pip show psutil")

Bug description
{ a clear and concise description of what the bug is }

traceback message (if any)
import pandas as pd
from apyori import apriori
import os
import time
import psutil

def get_process_memory():
    process = psutil.Process(os.getpid())
    return process.memory_info().rss

init_mem = get_process_memory()
init_time = time.perf_counter()

mushroom_data = pd.read_csv('mushroom.csv', header = None)

num_records = len(mushroom_data)
print (num_records)

records = []

for i in range(0,num_records):
    records.append([str(mushroom_data.values[i,j]) for j in range (0,23)])
    print(i,": record appended")
   
    


association_rules = apriori(records,min_support=0.2,min_confidence=0.20,min_lift=3,min_length=5)
association_results = list(association_rules)

print (len(association_results))

print (association_results[0])

for item in association_results:
    pair = item[0]
    items = [x for x in pair]
    print("Rule: " + items[0] + "-->" + items[1])
    print("Support: " + str(item[1]))
    print("Confidence: " + str(item[2][0][2]))
    print("Lift: " + str(item[2][0][3]))
    print ("======================================================")
    


fin_mem = get_process_memory()
fin_time = time.perf_counter()

exec_time = fin_time - init_time
mem_used = fin_mem - init_mem

print ("Execution Time (Seconds): ", exec_time)
print ("Memory Used (Bytes): ", mem_used)

Test results

output of `python -c psutil.tests
[mushroom.zip](https://github.com/giampaolo/psutil/files/3842008/mushroom.zip)

` (failures only, not full result)

{ you may want to do this in order to discover other issues affecting your platform }
{ if failures look unrelated with the issue at hand open another ticket }

@ping543f ping543f added the bug label Nov 13, 2019
@ping543f
Copy link
Author

mushroom.zip
the dataset is attached here

@giampaolo
Copy link
Owner

Please paste the output of these:

import psutil
print(psutil.Process().memory_full_info())
print(psutil.virtual_memory())

@giampaolo
Copy link
Owner

Bump

@ping543f
Copy link
Author

Sorry for being late. the output is pasted below:
pfullmem(rss=44335104, vms=268292096, num_page_faults=1074086, peak_wset=174977024, wset=44335104, peak_paged_pool=843128, paged_pool=835568, peak_nonpaged_pool=8627336, nonpaged_pool=234680, pagefile=268292096, peak_pagefile=356388864, private=268292096, uss=33792000)
svmem(total=16860880896, available=6037708800, percent=64.2, used=10823172096, free=6037708800)

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

2 participants