Comments (8)
Just so I understand what is the downside of using Docker for this tutorial? The web of dependencies can be hard to manage with just requirements.txt
from code_search.
Like @hamelsmu suggests, using Docker is the best thing to do! However, this issue is just a floating point arithmetic issue. One can workaround it by editing the library file code_gen.py
Just change the line "import math" to "from mpmath import mp as math" @briandw
Refer: http://mpmath.org/
from code_search.
I changed the following line in function get_function_docstring_pairs, worked for me
#except (AssertionError, MemoryError, SyntaxError, UnicodeEncodeError):
to
except:
from code_search.
Are you using the docker container associated with this tutorial? Also make sure you use the exact copy of the fastai library in this repo
from code_search.
I wasn't using the docker. I prefer to have the ability to reproduce the environment that the code runs on myself. Thanks.
from code_search.
@briandw, I got the same error as you did, how did you resolve the issue?
from code_search.
I didn't get it resolved. I've moved on to making my own project to train sentence vectors. Check it out if you are interested. It should be easy to run in a condo environment with Fastai and pytorch 0.4.1
https://github.com/briandw/SiameseULMFiT
from code_search.
I also get same error :
RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\multiprocess\pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\multiprocess\pool.py", line 44, in mapstar
return list(map(*args))
File "E:\Mindtree_IDP\general_utils.py", line 184, in get_function_docstring_pairs_list
return [get_function_docstring_pairs(b) for b in blob_list]
File "E:\Mindtree_IDP\general_utils.py", line 184, in
return [get_function_docstring_pairs(b) for b in blob_list]
File "E:\Mindtree_IDP\general_utils.py", line 167, in get_function_docstring_pairs
source = astor.to_source(f)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 52, in to_source
generator.visit(node)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\node_util.py", line 143, in visit
return visitor(node)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 320, in visit_FunctionDef
self.body(node.body)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 218, in body
self.write(*statements)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 168, in write
visit(item)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\node_util.py", line 143, in visit
return visitor(node)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 356, in visit_If
self.body(node.body)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 218, in body
self.write(*statements)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 168, in write
visit(item)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\node_util.py", line 143, in visit
return visitor(node)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 472, in visit_Return
self.conditional_write(' ', node.value)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 206, in conditional_write
self.write(*stuff)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 168, in write
visit(item)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\node_util.py", line 143, in visit
return visitor(node)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 627, in visit_Num
real = part(x.real if isinstance(x, complex) else x, imaginary=False)
File "C:\Users\GK\AppData\Local\Continuum\anaconda3\envs\mindtree\lib\site-packages\astor\code_gen.py", line 619, in part
if math.isinf(p):
OverflowError: int too large to convert to float
"""
from code_search.
Related Issues (20)
- Preprocess Data: ModuleNotFoundError: No module named 'general_utils' HOT 2
- ModuleNotFoundError: No module named 'tensorflow' HOT 5
- Can't load index? HOT 1
- Part 3 - Training the language model HOT 5
- Questions on the existence of a file in Q3.ipynb HOT 2
- Q4.ipynb NotFound this file code_summary_seq2seq_model.h5 HOT 2
- Questions on how to use GAN in your article
- fastai backward compatibility issue HOT 1
- regarding issue in parameter HOT 1
- issue in fit method in fastai HOT 1
- In Part 4, vectorize all of the code without docstrings. HOT 1
- Why did you fitted several times the model? HOT 2
- NameError: name 'LanguageModelData' is not defined HOT 3
- Could not vectorize no docstring codes HOT 2
- Please Help
- Pre-Trained Model for Code Search HOT 1
- Facing error while executing -> from fastai.text import * HOT 1
- Getting error with apply_parallel in 1-Preprocessing
- Dataset Not found
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 code_search.