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

I am facing an error while running demo on local 'NoneType' object has no attribute 'loc #29

Open
sainiudit opened this issue May 6, 2022 · 3 comments

Comments

@sainiudit
Copy link

Table topic exception: dtype('float32')

AttributeError Traceback (most recent call last)
in ()
----> 1 res = evaluate(df.head(10))

1 frames
/content/drive/MyDrive/columns_classification/sato/demo/predict.py in evaluate(df)
83 def evaluate(df):
84
---> 85 feature_dic, labels, mask = extract(df)
86
87 emissions = classifier(feature_dic).view(1, MAX_COL_COUNT, -1)

/content/drive/MyDrive/columns_classification/sato/demo/predict.py in extract(df)
64 # topic vectors
65 topic_features = extract_topic_features(df_dic)
---> 66 topic_vec = pad_vec(topic_features.loc[0,'table_topic'])
67 feature_dic['topic'] = torch.FloatTensor(np.vstack((np.tile(topic_vec,(n,1)), np.zeros((MAX_COL_COUNT - n, topic_dim)))))
68

AttributeError: 'NoneType' object has no attribute 'loc'

@sainiudit sainiudit changed the title 'NoneType' object has no attribute 'loc I am facing an error while running demo on local 'NoneType' object has no attribute 'loc May 6, 2022
@Face1essboy
Copy link

I also met the same problem,is it solved now?

@varlen
Copy link

varlen commented May 30, 2023

In case anyone is trying to run it, I've successfully ran it using an older version of Python within a docker container. I've created a Dockerfile to make it reproducible. Since my use case includes calling the model through a HTTP endpoint, the server.py invocation is hardcoded in the CMD from the Dockerfile but it is simple to adapt for other purposes.

https://github.com/varlen/sato-env

Invoke the ./build.sh script then ./run.sh <sato-repo>

@taziksh
Copy link

taziksh commented Jan 15, 2024

@varlen many thanks

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

4 participants