Comments (8)
I have the same the problem.
Additional info:
- I converted the code to python3 as in #6.
- The model runs on CPUs because of its size.
from ctrl.
Thank you for the response. My primary concern is not about the warnings but is the out put in the expected format? I thought it would generate a full sentence or a paragraph of a certain length as in the examples instead of displaying every line with a new word prediction.
Aah. I see.
You can generate just once by indenting the print statements on https://github.com/salesforce/ctrl/blob/master/generation.py#L272 and https://github.com/salesforce/ctrl/blob/master/generation.py#L273 to be outside the generation for
loop
from ctrl.
Similar error for the unicorn example:
from ctrl.
This is usually symptomatic of not loading a model.
Are you sure that --model_dir
points to the right location and that there entire checkpoint is available there?
Also, which model version are you using?
from ctrl.
I have the same problem and I am using
python 2.7.16
tensorflow 1.14.0 gpu_py27h39f1c70_0
model seqlen256_v1.ckpt
Command $python generation.py --model_dir /home/tpradeep/ctrl/seqlen256_v1.ckpt
Quite a few warning messages and then the following
2019-09-13 08:03:27.284843: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
WARNING:tensorflow:From /home/tpradeep/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py:1066: get_checkpoint_mtimes (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file utilities to get mtimes.
Loading vocabulary from vocab ...
Read 6086453827 words (246531 unique) from vocabulary file.
Loading codes from codes ...
Read 200000 codes from the codes file.
ENTER PROMPT: Wikipedia Salesforce Inc. is
Wikipedia Salesforce Inc. is a
Wikipedia Salesforce Inc. is a software
Wikipedia Salesforce Inc. is a software company
Wikipedia Salesforce Inc. is a software company that
Wikipedia Salesforce Inc. is a software company that provides
Wikipedia Salesforce Inc. is a software company that provides cloud-based
^C^CContinuing
ENTER PROMPT: ^CTraceback (most recent call last):
File "generation.py", line 162, in
prompt = raw_input('ENTER PROMPT: ')
KeyboardInterrupt
^C
from ctrl.
@pradeepthiyyagura, your generation script seems to be fine? Is your concern about the warnings?
from ctrl.
Thank you for the response. My primary concern is not about the warnings but is the out put in the expected format? I thought it would generate a full sentence or a paragraph of a certain length as in the examples instead of displaying every line with a new word prediction.
from ctrl.
Seems like this has been fixed by specifying the right --model_dir
. Closing for now, reopen as necessary.
from ctrl.
Related Issues (20)
- Using ctrl for summarization HOT 2
- TPU configuration - fine tuning
- Is that a way to do "general" generation? HOT 1
- Source attribution - Cannot replicate results
- why set "seq_length = min(args.generate_num, 256)" HOT 1
- training curriculum used
- repeats the last word on AWS HOT 1
- License for pre-trained model
- Sampling method used for translation
- tips and scripts related to data collection HOT 1
- Are control codes required for finetuning?
- Altering the tone of the output
- Will BERT+transformer-decoder better than tensor2tensor for text-generation?
- control code not recognised HOT 2
- Issues with pytorch_generation.py when running the Colab exercise
- CTRL model can not work in huggingface transformers HOT 2
- 12 layer (huggingface gpt-2 equivalent) ctrl model?
- Cuda out of memory issue.
- A transformer decoer-based model or seq2seq model?
- control code
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 ctrl.