Giter Club home page Giter Club logo

fake-news-detection-pytorch's Introduction

  • 📋 Previously worked on Music Information Retrieval, Natural Language Processing, Speech Recognition
  • 🔭 Currently working on Graph Learning and Network Science with a touch of Theory
  • 🎸 Playing Guitar and MIDI Keyboard SoundCloud Badge

fake-news-detection-pytorch's People

Contributors

s-omranpour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fake-news-detection-pytorch's Issues

Training is not working, the packages are not compatible

Hello,
I decided to open a new issue since it's a different bug and error. While running the training code, I get the following error, would you please upload a requirement.txt for python packages that you have used? e.g., python version, PyTorch version, etc.

File "/tmp/ipykernel_2468582/2857088609.py", line 62, in experiment
 File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 821, in validate
   return self._call_and_handle_interrupt(self._validate_impl, model, dataloaders, ckpt_path, verbose, datamodule)
 File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 685, in _call_and_handle_interrupt
   return trainer_fn(*args, **kwargs)
 File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 864, in _validate_impl
   results = self._run(model, ckpt_path=self.validated_ckpt_path)
 File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1128, in _run
   verify_loop_configurations(self)
 File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/configuration_validator.py", line 40, in verify_loop_configurations
   __verify_eval_loop_configuration(trainer, model, "val")
 File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/configuration_validator.py", line 170, in __verify_eval_loop_configuration
   has_step = is_overridden(step_name, model)
 File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/utilities/model_helpers.py", line 47, in is_overridden
   raise ValueError("Expected a parent")
ValueError: Expected a parent

I have found this https://stackoverflow.com/questions/69526806/pytorch-model-heplers-py-in-is-overridden-raise-valueerror-expected-a-paren but in your code, I see class CSIModel(pl.LightningModule), so it should be fine but it's not!

The dataset is missing

Hi there,
Could you please provide the processed dataset so that I can run your code?
Many thanks.

Unable to run the code with insufficient dataset

0%| | 0/4232 [00:00<?, ?it/s]
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
 in 
 33 for event in tqdm(eid_train+eid_test):
 34 event_str = str(event)
---> 35 tweets = json.load(open(os.path.join(path,event_str+'.json'),"r",encoding='utf-8'))
 36 timestamps = []
 37 uid = []

FileNotFoundError: [Errno 2] No such file or directory: 'Data/Weibo/3566276356194468.json'

data preprocessing is has a bug

Hello,
I am trying to run your code but I get this error:
`

TypeError                                 Traceback (most recent call last)
Input In [44], in <cell line: 4>()
      2 os.makedirs(save_path, exist_ok=True)
      4 for eid in tqdm(events):
----> 5     xc, xs, y = get_event_features(eid)
      6     pickle.dump(
      7         {'x_capture': xc, 'x_score':xs, 'label': y}, 
      8         open(save_path + eid + '.pkl', 'wb')
      9     )

Input In [42], in get_event_features(eid)
     49         print(eid)
     50         print(doc)    
---> 51         X_text += [doc_vectorizer.infer_vector(
     52 #             jieba.lcut(doc)
     53             doc
     54         ).reshape(1,-1)]
     55     X_text = np.concatenate(X_text, axis=0)
     57     # stack all

File ~/Research_direction/Fake news mitigation multimodal/venv38/lib/python3.8/site-packages/gensim/models/doc2vec.py:620, in Doc2Vec.infer_vector(self, doc_words, alpha, min_alpha, epochs)
    592 """Infer a vector for given post-bulk training document.
    593 
    594 Notes
   (...)
    617 
    618 """
    619 if isinstance(doc_words, str):  # a common mistake; fail with a nicer error
--> 620     raise TypeError("Parameter doc_words of infer_vector() must be a list of strings (not a single string).")
    622 alpha = alpha or self.alpha
    623 min_alpha = min_alpha or self.min_alpha

TypeError: Parameter doc_words of infer_vector() must be a list of strings (not a single string).

`
What should I do?
Thanks!

Dataset Missing

Could you please provide the data set you used at that time, thank you very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.