-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preprocess.sh error (division by Zero) #158
Comments
Hi @ShaliniR11 , Did you notice that you have a "space" token in line 21, right before the path? can you delete this space and see if it helps? Additionally, do you have subdirectories in the directory Best, |
Can you try running the java process directly, e.g.,:
? |
OK so the base java process is running fine, it looks like the problem is in some input/output redirection because of Windows. |
Hi @urialon I am facing the same issue. @ShaliniR11 could you solve it? |
Hi @zunairazaman2021 , Can you try running the java process directly, as instructed earlier in this thread? |
@urialon Yes I did |
Using #109 I get data stored in a tmp directory but still c2v and raw.txt files are empty. :( |
Nevermind, Solved it with #109 :) Thanks |
Great to hear :-)
…On Wed, Feb 8, 2023 at 07:35 zunaira zaman ***@***.***> wrote:
Nevermind, Solved it with #109
<#109> :) Thanks
—
Reply to this email directly, view it on GitHub
<#158 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADSOXMGIFB6ZK2EUUI4XUDTWWOHHVANCNFSM534W3PCQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks @Lufedi and @zunairazaman2021 , I merged that PR. |
Hi Dr.Alon,
I have my own Java dataset and I am trying to preprocess it with the given Script. I have changed the path directories in the script.I get the following output:
shali@DESKTOP-JNLA5ED MINGW64 ~/Documents/Git/code2vec (master)
$ sh preprocess.sh
preprocess.sh: line 21: C:/Users/shali/Documents/Git/code2vec/data/javadata/train/: Is a directory
Extracting paths from validation set...
Finished extracting paths from validation set
Extracting paths from test set...
Finished extracting paths from test set
Extracting paths from training set...
Finished extracting paths from training set
Creating histograms from the training data
File: my_dataset.test.raw.txt
Traceback (most recent call last):
File "C:\Users\shali\Documents\Git\code2vec\preprocess.py", line 133, in
num_examples = process_file(file_path=data_file_path, data_file_role=data_role, dataset_name=args.output_name,
File "C:\Users\shali\Documents\Git\code2vec\preprocess.py", line 69, in process_file
print('Average total contexts: ' + str(float(sum_total) / total))
ZeroDivisionError: float division by zero.
My System Requirements:
I am using GitBash on Visual studio code to run the script.
OS: Windows 11
Java : java --version
openjdk 17.0.3 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)
Python: python --version
Python 3.10.4
CUDA:
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_19:00:59_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0
below is my preprocess.sh in txt format
preprocess.txt
Please let me know how to proceed further.
The text was updated successfully, but these errors were encountered: