Comments (6)
Hi,
Sorry for the inconveniences.
@eladn - can you check what's wrong with these type annotations?
from code2vec.
Hi. What python version do you use?
from code2vec.
Thanks guys for looking into this!
tf-docker / > python --version
Python 3.5.2
tf-docker / > pip list
Package Version
-------------------- ----------------------
absl-py 0.7.0
astor 0.7.1
gast 0.2.2
google-pasta 0.1.4
grpcio 1.19.0
h5py 2.9.0
Keras-Applications 1.0.7
Keras-Preprocessing 1.0.9
Markdown 3.0.1
numpy 1.16.2
pip 19.0.3
protobuf 3.7.0
pycurl 7.43.0
pygobject 3.20.0
python-apt 1.1.0b1+ubuntu0.16.4.2
setuptools 40.8.0
six 1.12.0
tb-nightly 1.14.0a20190301
tensorflow-gpu 2.0.0a0
termcolor 1.1.0
tf-estimator-nightly 1.14.0.dev2019030115
Werkzeug 0.14.1
wheel 0.29.0
from code2vec.
Hi Jeroen,
I discussed it with @eladn -
As far as I know, type annotations were introduced in Python 3.6, so they won't work with 3.5.
-
If you can - upgrade to python 3.7, which is the latest version that @eladn had checked it with.
-
If you can't or don't want to update the python version, you can
checkout
commit9789cfa0d7ee74b8dca9e2b84c45228b86716d1c
which did not contain type annotations and is supposed to work with python3.5.
Please let us know how it goes
from code2vec.
Thanks!
I saw there was an updated tensorflow docker container (tensorflow/tensorflow:2.0.0b1-gpu-py3), which uses Python 3.6.8 and this indeed fixes the problem!
🥇
from code2vec.
Just to be complete, I tried checking out commit 9789cfa, and run it, but got:
File "code2vec.py", line 37, in <module>
model = Model(config)
File "/code/code2vec/model.py", line 16, in __init__
self.sess = tf.Session()
AttributeError: module 'tensorflow' has no attribute 'Session'
Anyway 3.6 works!
from code2vec.
Related Issues (20)
- Preprocessor step disposing numbers in (variable) names HOT 4
- How to release a model HOT 1
- Repeating metric values HOT 3
- Model for other task. HOT 2
- I run this "python3 code2vec.py --load models/dataset/saved_model_iter2 --test data/dataset/dataset.test.c2v" and I got this issue! is there any help? HOT 5
- I don't know how to apply the output files created by astminer. HOT 1
- Can I get the exact values for the context HOT 2
- Matrix size-incompatible during using sample model HOT 2
- bias-variance tradeoff HOT 1
- Application to real case study HOT 11
- Javascript Benchmark with Code2Vec HOT 3
- There is no entire model and model weights file to load HOT 4
- How to create code embeddings from Java codebase and store it in a vector database? HOT 4
- Issues encountered when processing big data HOT 1
- File Not found error HOT 2
- Queries regarding Java Extractor HOT 1
- Which version of JDK do I need to install before running this project? HOT 3
- How to create code2vec input HOT 8
- Queries on ...dict.c2v file HOT 1
- Is there any library or API available for generating embeddings of each line of a Java code file while preserving AST (Abstract Syntax Tree) structure information? I'm already familiar with fold2vec. Are there any other alternatives? 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 code2vec.