Comments (8)
I cannot reproduce the error. Did you run python QG_data_loader.py
?
from focusseq2seq.
yes.
I am working on Windows machine though. Will this repo work on windows machine ?
Thanks for you response mate !!
from focusseq2seq.
word2id
is defined here. Please check if your preprocess_single_example
function can access this instance.
I don't have a plan for Windows support, since I don't have any Windows machine.
Maybe your problem comes from the difference between Windows and Unix path ( '/' and '\'). Try remove './'
from these lines and run it again.
from focusseq2seq.
No, it cant access this instance.
Is it because "word2id" is defined in "main" and has not been passed as argument to the function "preprocess_single_example" ??
from focusseq2seq.
I defined word2id
under __main__
to avoid unnecessary pickling during multiprocessing.
And instance defined under __main__
is accessible in a function using it. Try run this script. It runs smooth.
def print_word2id():
print(word2id)
if __name__ == '__main__':
word2id = 3
print_word2id()
from focusseq2seq.
Yes you are right.
Therefore, "word2id" is accessible in function "preprocess_data" but not in function "preprocess_single_example"
Is it because function "preprocess_single_example" is not called directly called in "main"
from focusseq2seq.
It is still accessible. Run this script.
def preprocess_data():
preprocess_single_example()
def preprocess_single_example():
print(word2id)
if __name__ == '__main__':
word2id = 3
preprocess_data()
from focusseq2seq.
Its weird, as I could print "word2id" in function "preprocess_data" but not in function "preprocess_single_example" .....
I made a DIRTY fix though:
I added the following statement in function "preprocess_single_example":
word2id, id2word = vocab_read(data_dir.joinpath('vocab.txt'))
It generated all the required .pkl files.
from focusseq2seq.
Related Issues (10)
- How do I use --eval_only? HOT 1
- LinearBridge error
- 'chmod' is not recognized as an internal or external command !!! HOT 4
- RuntimeError: expected device cuda:0 and dtype Byte but got device cuda:0 and dtype Bool HOT 8
- AssertionError in Ubuntu 14.04.5 HOT 2
- hidden size doesn't match HOT 2
- CUDNN_STATUS_EXECUTION_FAILED HOT 1
- Performing inference
- Prediction HOT 1
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 focusseq2seq.