Comments (9)
- Can you share the command that you used to run the code?
- Are you using GPU or CPU?
By looking at the error msg, it seems to me that fp16 is on but GPU is not in used.
from ditto.
Hi, thank you for your reply.
- Here is the code I am running after installing all the requirements.
!CUDA_VISIBLE_DEVICES=0 python train_ditto.py \
--task Structured/Beer \
--batch_size 64 \
--max_len 64 \
--lr 3e-5 \
--n_epochs 40 \
--finetuning \
--lm distilbert \
--fp16 \
--da del \
--dk product \
--summarize
- I am running the notebook on Colab. The runtime type is set as None. So I don't think GPU is used.
Does it mean I must use the GPU setting instead?
I just tried the code again using GPU setting and the lines import nltk nltk.download('stopwords')
before the training part and it solved the issue.
Thank you @oi02lyl .
If needed I can share the
from ditto.
Now after the training part was done, I tried to run the matching code as follow:
!CUDA_VISIBLE_DEVICES=0 python matcher.py \
--task wdc_all_small \
--input_path input/input_small.jsonl \
--output_path output/output_small.jsonl \
--lm distilbert \
--use_gpu \
--fp16 \
--checkpoint_path checkpoints/
but It seems that the model can not be found:
2020-11-03 05:51:50.890227: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
Traceback (most recent call last):
File "matcher.py", line 212, in <module>
hp.lm, hp.use_gpu, hp.fp16)
File "matcher.py", line 170, in load_model
raise ModelNotFoundError(checkpoint)
ditto.exceptions.ModelNotFoundError: Model checkpoints/wdc_all_small.pt was not found
I also try the notebook mentioned in #9 here, but the same error appears.
Please, any help?
from ditto.
You can try the script at the bottom of the updated notebook: https://colab.research.google.com/drive/1zCg6BeCWVj62uYqoxR5rfyEG6dfGXu_2?usp=sharing&authuser=3#scrollTo=9qxLFPNvcGgH
from ditto.
Hi, thank you again for your reply.
I will try the updated notebook and come back to you ASAP.
Thanks.
from ditto.
You can try the script at the bottom of the updated notebook: https://colab.research.google.com/drive/1zCg6BeCWVj62uYqoxR5rfyEG6dfGXu_2?usp=sharing&authuser=3#scrollTo=9qxLFPNvcGgH
Hello,
I tried the given updated notebook but the warning below is shown when running the matcher.
Please, can you guide me in solving it?
Thank you.
Warning: multi_tensor_applier fused unscale kernel is unavailable, possibly because apex was installed without --cuda_ext --cpp_ext. Using Python fallback. Original ImportError was: ModuleNotFoundError("No module named 'amp_C'",)
0it [00:00, ?it/s]/usr/local/lib/python3.6/dist-packages/apex/amp/_initialize.py:25: UserWarning: An input tensor was not cuda.
warnings.warn("An input tensor was not cuda.")
4398it [00:07, 573.10it/s]
from ditto.
I see. This is because we install only the python version of apex. More details here: https://github.com/NVIDIA/apex#linux. I think the warning is safe to ignore in this case. You can also install the version with CUDA and C++ extensions following their instructions.
from ditto.
You can try the script at the bottom of the updated notebook: https://colab.research.google.com/drive/1zCg6BeCWVj62uYqoxR5rfyEG6dfGXu_2?usp=sharing&authuser=3#scrollTo=9qxLFPNvcGgH
@oi02lyl I am having similar issues with the checkpoint not being found. I tried to use the link you posted however it states I do not have the correct credentials to see the file. Do you mind trying to open the notebook to public viewing? Thanks.
from ditto.
this link don't works for me!
I get this:
There was an error loading this notebook. Ensure that the file is accessible and try again.
Invalid Credentials
https://drive.google.com/drive/?action=locate&id=1zCg6BeCWVj62uYqoxR5rfyEG6dfGXu_2&authuser=3
please help me.
from ditto.
Related Issues (20)
- ImportError: cannot import name 'LongformerModel' from 'transformers' (transformers=2.8)
- How is your F1 score calculated, whether you use weight or macro or micro HOT 1
- random result when inference 2 similar textual data HOT 3
- Add --save_model flag to the training example
- Error when using --summarize with matcher.py HOT 1
- Whether are special tokens like [COL] [VAL] and attribute names added into the vocabulary?
- [Question] Can I use this package in a notebook environment?
- Inferencing HOT 1
- How (code) to serialize the inputs ? HOT 1
- ModuleNotFoundError: No module named 'click._bashcomplete' HOT 1
- ValueError: not enough values to unpack (expected 2, got 1) - Textual/Company HOT 5
- drop_col gives error? HOT 5
- Which f1 should we report? HOT 1
- evaluation method seems to assign a new f1 value as a best score without computing f1 value by best_th=0.5 HOT 1
- Adding custom tokens
- F1 Score for Structured/Beer on paper can't be reproduced
- The link for the Company.zip file seems to be invalid. HOT 1
- Summarization sometimes removes attribute names between [COL] and [VAL]
- training HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ditto.