zhihan1996 / tradetheevent Goto Github PK
View Code? Open in Web Editor NEWImplementation of "Trade the Event: Corporate Events Detection for News-Based Event-Driven Trading." In Findings of ACL2021
Implementation of "Trade the Event: Corporate Events Detection for News-Based Event-Driven Trading." In Findings of ACL2021
Traceback (most recent call last): File "run_domainadapt.py", line 300, in <module> main() File "run_domainadapt.py", line 229, in main get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_train else None File "run_domainadapt.py", line 125, in get_dataset return TextDataset( File "/Users/test/Downloads/TradeTheEvent-main/venv/lib/python3.8/site-packages/transformers/data/datasets/language_modeling.py", line 30, in __init__ assert os.path.isfile(file_path), f"Input file path {file_path} not found" AssertionError: Input file path DIR_TO_EDT_DATASET/Domain_adaptation/train.txt not found
Do i have to download additional files for this project from somewhere or why do I get this error
Hi, @Zhihan1996 , thanks for providing the dataset, any chance to add license (e.g., MIT, or Apache 2.0) to the dataset so that more ppl could use it?
Thank you.
Line 81 in d346d38
你好,我理解的logits的shape = [BS, L, N],pad_mask的shape = [BS, L],所以计算是不是会报错?
如果我理解的不对,能否举个例子?
非常感谢 @Zhihan1996
Hello 🙋🏻♂️,
I saw you are hosting your dataset through Gdrive. Would you be interested in hosting it through hf.co/datasets?
It is free and could then be directly loaded through the datasets
library.
Docs: https://huggingface.co/docs/datasets/upload_dataset.html
I use the command exactly like in the documentation.
The error I get I the following:
zsh: illegal hardware instruction python run_domainadapt.py --output_dir=ADA_MODEL_DIR --model_type=bert
What can I do
Traceback (most recent call last):
File "run_event.py", line 489, in
main()
File "run_event.py", line 463, in main
outputs = model(input_ids, attention_mask=attention_mask, seq_labels=seq_labels, ner_labels=ner_labels)
File "/data1/lht/anaconda3/envs/tte/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/data1/lht/anaconda3/envs/tte/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 167, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/data1/lht/anaconda3/envs/tte/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 177, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/data1/lht/anaconda3/envs/tte/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 86, in parallel_apply
output.reraise()
File "/data1/lht/anaconda3/envs/tte/lib/python3.7/site-packages/torch/_utils.py", line 429, in reraise
raise self.exc_type(msg)
RuntimeError: Caught RuntimeError in replica 0 on device 0.
Original Traceback (most recent call last):
File "/data1/lht/anaconda3/envs/tte/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker
output = module(*input, **kwargs)
File "/data1/lht/anaconda3/envs/tte/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/data1/lht/TradeTheEvent/utils/model.py", line 170, in forward
seq_logits = self.final_classifier1(seq_logits)
File "/data1/lht/anaconda3/envs/tte/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/data1/lht/anaconda3/envs/tte/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 94, in forward
return F.linear(input, self.weight, self.bias)
File "/data1/lht/anaconda3/envs/tte/lib/python3.7/site-packages/torch/nn/functional.py", line 1753, in linear
return torch._C._nn.linear(input, weight, bias)
RuntimeError: mat1 dim 1 must match mat2 dim 0
Is the error caused by networks, or the version of torch is not valid?
My name is Luis, I'm a big-data machine-learning developer, I'm a fan of your work, and I usually check your updates.
I was afraid that my savings would be eaten by inflation. I have created a powerful tool that based on past technical patterns (volatility, moving averages, statistics, trends, candlesticks, support and resistance, stock index indicators).
All the ones you know (RSI, MACD, STOCH, Bolinger Bands, SMA, DEMARK, Japanese candlesticks, ichimoku, fibonacci, williansR, balance of power, murrey math, etc) and more than 200 others.
The tool creates prediction models of correct trading points (buy signal and sell signal, every stock is good traded in time and direction).
For this I have used big data tools like pandas python, stock market libraries like: tablib, TAcharts ,pandas_ta... For data collection and calculation.
And powerful machine-learning libraries such as: Sklearn.RandomForest , Sklearn.GradientBoosting, XGBoost, Google TensorFlow and Google TensorFlow LSTM.
With the models trained with the selection of the best technical indicators, the tool is able to predict trading points (where to buy, where to sell) and send real-time alerts to Telegram or Mail. The points are calculated based on the learning of the correct trading points of the last 2 years (including the change to bear market after the rate hike).
I think it could be useful to you, to improve, I would like to share it with you, and if you are interested in improving and collaborating I am also willing, and if not file it in the box.
I run your backtest, and there was ave return result. I would like to ask how can I get his result, could you upload the full code for this part? Thanks~
thank you for such great work!!
I ran
python run_event.py --TASK bilevel --data_dir ./data/Event_detection --epoch 5 --model_type models/bert_bc_adapted --output_dir models/bilevel --bert_lr 5e-5 --per_gpu_batch_size 8 --gradient_accumulation_steps 1 --max_seq_length 256
I got the following error
'BertConfig' object has no attribute 'max_seq_length'
Adding the "model_max_length": 256
attribute in the config file models/bert_bc_adapted
can be a solution.
Would you please make a modification to the code and commit?
Thank you very much!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.