Exception raised: cannot import name manual_seed from torch

2024/11/19 20:27:27

i'm trying to run the AutoClean project on my device (here's my code):

import random
from AutoClean import AutoClean
import pandas as pddef __init__(self, pipeline, resultat ):self.pipeline = pipelineself.resultat = resultatresultat = pd.read_csv(r"C:\Users\radia\Downloads\result-(11)-csv.csv", profileUrl = 'str', fullName = 'str', firstName = 'str', lastName = 'str', profileImage = 'str' , additionnalInfo = 'str' , connectionDegree = 'str', job = 'str', location = 'str', sharedConnections = 'str', commonConnection1 = 'str', url = 'str', name = 'str' , query = 'str', category = 'str', timestamp = 'NoneType', commonConnection = 'str', error = 'NoneType') pipeline = AutoClean(resultat, mode = 'manual', duplicates = 'True', missing_num = 'linreg', missing_categ = 'auto', encode_categ = 'False', extract_datetime = 'auto', outliers = 'delete', outlier_param = '1.5', logfile = 'True', verbose = 'True')for pipeline in self.pipeline:print(pipeline.head())

But i get this exception and can't understand why, especially because i'm testing this since 3 days ago and never got it, so i really dont understand

Une exception s'est produite : ImportError
cannot import name 'manual_seed' from 'torch' (unknown location)
Answer

In order to get the resulting data frame from AutoClean, you have to call the output parameter from the pipeline object:

df = pipeline.output

If you would want only the head() of the dataframe, you could do the following:

pipeline.output.head()

You can refer to the documentation in the official repo for more details: https://github.com/elisemercury/AutoClean.

Hope this helps!

https://en.xdnf.cn/q/119909.html

Related Q&A

Compile a C/C++ Program and store standard output in a File via Python

Lets say I have a C/C++ file named userfile.c. Using Python, how can I invoke the local gcc compiler so that the file is compiled and an executable is made? More specifically, I would like to provide …

How to swap maximums with the minimums? (python)

Is there a method to swap the maximum and the minimum of a list? The list will be as follows and the program has to be continued so that it will print the maximum swapped with the minimum, the second …

python object attributes and methods

In python all data is object and any object should have attributes and methods. Does somebody know python object without any attributes and methods?>>> len(dir(1)) 64

How to retrieve nested data with BeautifulSoup?

I have the below webpage source: </li><li class="cl-static-search-result" title="BELLO HONDA ACCORD &quot;95 MIL MILLAS&quot;. REALMENTE COMO NUEVO"><a href=&…

applying onehotencoder on numpy array

I am applying OneHotEncoder on numpy array.Heres the codeprint X.shape, test_data.shape #gives 4100, 15) (410, 15) onehotencoder_1 = OneHotEncoder(categorical_features = [0, 3, 4, 5, 6, 8, 9, 11, 12]) …

How to delete temp folder data using python script [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.Want to improve this question? Update the question so it focuses on one problem only by editing this post.Closed 6…

Save a list of objects on exit of pygame game [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.Want to improve this question? Add details and clarify the problem by editing this post.Closed 10 years ago.Improv…

Trying to make loop for a function that stops after the result is lower than a certain value

Im taking a beginner python class and part of an exercise we were given was this:The point x with the property x= sin(x)−ax+ 30 is called a fixed point of the function f(x) = sin(x)−ax+ 30. It can b…

python url extract from html

I need python regex to extract urls from html, example html code :<a href=""http://a0c5e.site.it/r"" target=_blank><font color=#808080>MailUp</font></a> <…

Regex match each character at least once [closed]

Its difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying thi…