-
-
Notifications
You must be signed in to change notification settings - Fork 538
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
Google colab Segmentation Fault Error after -!python cli.py optimize - command cell #129
Comments
My Colab install was successful: .... then I used the following command to launch "optimize": !python ./cli.py optimize the following was the last bit of the error print-out: ..... | approxkl | 1.2992781e-15 |
|
This is exactly same error, I hope someone can explain the reason behind it. |
Hi Zhouti29,
Thank you for your suggested change. I just add your change
AFTER the !pip install -r requirements.txt and it start to run. However,
I still get a segment fault error after running for a while with losses
shown:
........
........
…------------------------------------ | approxkl | 0.082762145 | | clipfrac
| 0.25561348 | | explained_variance | 0.00134 | | fps | 10 | | n_updates |
15 | | policy_entropy | 2.2614372 | | policy_loss | 0.010807981 | |
serial_timesteps | 5160 | | time_elapsed | 428 | | total_timesteps | 5160 |
| value_loss | 268293.97 | ------------------------------------
----------------------------------- | approxkl | 0.13534357 | | clipfrac |
0.34583 | | explained_variance | 0.00263 | | fps | 10 | | n_updates | 16 |
| policy_entropy | 2.0661743 | | policy_loss | 0.06681823 | |
serial_timesteps | 5504 | | time_elapsed | 460 | | total_timesteps | 5504 |
| value_loss | 506792.7 | ----------------------------------- [I 2019-08-08
17:40:13,937] Finished trial#553 resulted in value: -3022.860003117472.
Current best value is -3022.860003117472 with parameters: {'cliprange':
0.34998638936790727, 'ent_coef': 2.7406115907349536e-08, 'gamma':
0.9662285172094842, 'lam': 0.8814985022852209, 'learning_rate':
0.007102979083909665, 'n_steps': 319.69330758702245, 'noptepochs':
27.575389394851317}. 2019-08-08 17:40:14,192 - __main__ - optimize - INFO -
Finished trials: 554 2019-08-08 17:40:14,433 - __main__ - optimize - INFO -
Best trial: -3022.860003117472 2019-08-08 17:40:14,433 - __main__ -
optimize - INFO - Params: 2019-08-08 17:40:14,671 - __main__ - optimize -
INFO - cliprange: 0.34998638936790727 2019-08-08 17:40:14,671 - __main__ -
optimize - INFO - ent_coef: 2.7406115907349536e-08 2019-08-08 17:40:14,671
- __main__ - optimize - INFO - gamma: 0.9662285172094842 2019-08-08
17:40:14,672 - __main__ - optimize - INFO - lam: 0.8814985022852209 2019-08-08
17:40:14,672 - __main__ - optimize - INFO - learning_rate:
0.007102979083909665 2019-08-08 17:40:14,672 - __main__ - optimize - INFO -
n_steps: 319.69330758702245 2019-08-08 17:40:14,672 - __main__ - optimize -
INFO - noptepochs: 27.575389394851317 [254fc6a56445:00370] *** Process
received signal *** [254fc6a56445:00370] Signal: Segmentation fault (11)
[254fc6a56445:00370] Signal code: Address not mapped (1)
[254fc6a56445:00370] Failing at address: 0x7fcad534920d
[254fc6a56445:00370] [ 0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7fcad7ff2890]
[254fc6a56445:00370] [ 1]
/lib/x86_64-linux-gnu/libc.so.6(getenv+0xa5)[0x7fcad7c31785]
[254fc6a56445:00370] [ 2]
/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(_ZN13TCMallocGuardD1Ev+0x34)[0x7fcad849ce44]
[254fc6a56445:00370] [ 3]
/lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0xf5)[0x7fcad7c32615]
[254fc6a56445:00370] [ 4]
/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(+0x13cb3)[0x7fcad849acb3]
[254fc6a56445:00370] *** End of error message *** [I 2019-08-08
17:41:01,830] Setting status of trial#552 as TrialState.PRUNED. 2019-08-08
17:41:05,205 - __main__ - optimize - INFO - Finished trials: 554 2019-08-08
17:41:05,360 - __main__ - optimize - INFO - Best trial:
-3022.860003117472 2019-08-08
17:41:05,360 - __main__ - optimize - INFO - Params: 2019-08-08 17:41:05,523
- __main__ - optimize - INFO - cliprange: 0.34998638936790727 2019-08-08
17:41:05,523 - __main__ - optimize - INFO - ent_coef:
2.7406115907349536e-08 2019-08-08
17:41:05,523 - __main__ - optimize - INFO - gamma: 0.9662285172094842
2019-08-08
17:41:05,523 - __main__ - optimize - INFO - lam: 0.8814985022852209 2019-08-08
17:41:05,523 - __main__ - optimize - INFO - learning_rate:
0.007102979083909665 2019-08-08 17:41:05,523 - __main__ - optimize - INFO -
n_steps: 319.69330758702245 2019-08-08 17:41:05,523 - __main__ - optimize -
INFO - noptepochs: 27.575389394851317 [254fc6a56445:00371] *** Process
received signal *** [254fc6a56445:00371] Signal: Segmentation fault (11)
[254fc6a56445:00371] Signal code: Address not mapped (1)
[254fc6a56445:00371] Failing at address: 0x7f881f12c20d
[254fc6a56445:00371] [ 0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f8821dd5890]
[254fc6a56445:00371] [ 1]
/lib/x86_64-linux-gnu/libc.so.6(getenv+0xa5)[0x7f8821a14785]
[254fc6a56445:00371] [ 2]
/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(_ZN13TCMallocGuardD1Ev+0x34)[0x7f882227fe44]
[254fc6a56445:00371] [ 3]
/lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0xf5)[0x7f8821a15615]
[254fc6a56445:00371] [ 4]
/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(+0x13cb3)[0x7f882227dcb3]
[254fc6a56445:00371] *** End of error message *** WARNING: Logging before
flag parsing goes to stderr. 2019-08-08 17:41:09,040 - __main__ -
initialize_data - DEBUG - Initialized Features: ['Date', 'Open', 'High',
'Low', 'Close', 'Volume'] [I 2019-08-08 17:41:41,923] Using an existing
study with name 'PPO2__MlpLnLstmPolicy__IncrementalProfit' instead of
creating a new one. 2019-08-08 17:41:41,926 - __main__ - initialize_optuna
- DEBUG - Initialized Optuna: 2019-08-08 17:41:42,810 - __main__ -
initialize_optuna - DEBUG - Best reward in (554) trials:
-3022.860003117472 2019-08-08
17:41:42,929 - __main__ - __init__ - DEBUG - Initialize RLTrader:
PPO2__MlpLnLstmPolicy__IncrementalProfit [254fc6a56445:00604] *** Process
received signal *** [254fc6a56445:00604] Signal: Segmentation fault (11)
[254fc6a56445:00604] Signal code: Address not mapped (1)
[254fc6a56445:00604] Failing at address: 0x7ff30febe20d
[254fc6a56445:00604] [ 0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7ff312b67890]
[254fc6a56445:00604] [ 1]
/lib/x86_64-linux-gnu/libc.so.6(getenv+0xa5)[0x7ff3127a6785]
[254fc6a56445:00604] [ 2]
/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(_ZN13TCMallocGuardD1Ev+0x34)[0x7ff313011e44]
[254fc6a56445:00604] [ 3]
/lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0xf5)[0x7ff3127a7615]
[254fc6a56445:00604] [ 4]
/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(+0x13cb3)[0x7ff31300fcb3]
[254fc6a56445:00604] *** End of error message ***
What should I do to correct this?
Cheers,
Samuel
On Sun, Aug 4, 2019 at 4:15 PM zhouti29 ***@***.***> wrote:
!pip install stable-baselines --upgrade
should solve the issue
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#129?email_source=notifications&email_token=ACGVJNWWLFDYFYMZOIAFM43QC5PHPA5CNFSM4IG7J5VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3QLTFQ#issuecomment-518044054>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACGVJNW2THEXI345R3KK7YDQC5PHPANCNFSM4IG7J5VA>
.
|
Hi Samuel, I have the same segmentation fault error after running the script for a while. That's why I deleted my solution posted earlier. Now I am running the RL on my local machine. Sorry to give you the misleading information. |
No problem my friend. Did you have better success when you use your local PC instead of Colab?Do you know that AdamKing started a new project at Githib called Tensortrade.... I am just running it on Colab - it's rehash of RLtrader.. SamuelSent from my Samsung Galaxy smartphone.
-------- Original message --------From: zhouti29 <[email protected]> Date: 2019-08-08 11:04 a.m. (GMT-08:00) To: notadamking/RLTrader <[email protected]> Cc: cyberslam <[email protected]>, Comment <[email protected]> Subject: Re: [notadamking/RLTrader] Google colab Segmentation Fault Error after -!python cli.py optimize - command cell (#129) Hi Samuel, I have the same segmentation fault error after running the script for a while. That's why I deleted my solution posted earlier. Now I am running the RL on my local machine. Sorry to give you the misleading information.
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "#129?email_source=notifications\u0026email_token=ACGVJNVGG5YQQPCCAVO3X7DQDRNZJA5CNFSM4IG7J5VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD34N7AQ#issuecomment-519626626",
"url": "#129?email_source=notifications\u0026email_token=ACGVJNVGG5YQQPCCAVO3X7DQDRNZJA5CNFSM4IG7J5VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD34N7AQ#issuecomment-519626626",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
Success on Tensortrade: no error!!!Sent from my Samsung Galaxy smartphone.
-------- Original message --------From: zhouti29 <[email protected]> Date: 2019-08-08 11:04 a.m. (GMT-08:00) To: notadamking/RLTrader <[email protected]> Cc: cyberslam <[email protected]>, Comment <[email protected]> Subject: Re: [notadamking/RLTrader] Google colab Segmentation Fault Error after -!python cli.py optimize - command cell (#129) Hi Samuel, I have the same segmentation fault error after running the script for a while. That's why I deleted my solution posted earlier. Now I am running the RL on my local machine. Sorry to give you the misleading information.
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "#129?email_source=notifications\u0026email_token=ACGVJNVGG5YQQPCCAVO3X7DQDRNZJA5CNFSM4IG7J5VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD34N7AQ#issuecomment-519626626",
"url": "#129?email_source=notifications\u0026email_token=ACGVJNVGG5YQQPCCAVO3X7DQDRNZJA5CNFSM4IG7J5VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD34N7AQ#issuecomment-519626626",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
I am newbie. I'm trying to use colab to execute your code.
I'm getting this result after:
!python cli.py optimize
command.Thanks for help.
WARNING: Logging before flag parsing goes to stderr. 2019-07-25 22:41:31,271 - __main__ - initialize_data - DEBUG - Initialized Features: ['Date', 'Open', 'High', 'Low', 'Close', 'Volume'] WARNING: Logging before flag parsing goes to stderr. 2019-07-25 22:41:31,273 - __main__ - initialize_data - DEBUG - Initialized Features: ['Date', 'Open', 'High', 'Low', 'Close', 'Volume'] [I 2019-07-25 22:42:23,556] Using an existing study with name 'PPO2__MlpLnLstmPolicy__IncrementalProfit' instead of creating a new one. [I 2019-07-25 22:42:23,558] Using an existing study with name 'PPO2__MlpLnLstmPolicy__IncrementalProfit' instead of creating a new one. 2019-07-25 22:42:23,567 - __main__ - initialize_optuna - DEBUG - Initialized Optuna: 2019-07-25 22:42:23,569 - __main__ - initialize_optuna - DEBUG - Initialized Optuna: 2019-07-25 22:42:25,040 - __main__ - initialize_optuna - DEBUG - Best reward in (556) trials: -599.3695253077894 2019-07-25 22:42:25,040 - __main__ - __init__ - DEBUG - Initialize RLTrader: PPO2__MlpLnLstmPolicy__IncrementalProfit 2019-07-25 22:42:25,094 - __main__ - initialize_optuna - DEBUG - Best reward in (556) trials: -599.3695253077894 2019-07-25 22:42:25,094 - __main__ - __init__ - DEBUG - Initialize RLTrader: PPO2__MlpLnLstmPolicy__IncrementalProfit [W 2019-07-25 23:01:28,946] Setting status of trial#557 as TrialState.FAIL because of the following error: ValueError('The provided tag was already used for this event type',) Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/optuna/study.py", line 468, in _run_trial result = func(trial) File "/content/drive/My Drive/python/BTC1/lib/RLTrader.py", line 153, in optimize_params model.learn(n_steps_per_eval) File "/usr/local/lib/python3.6/dist-packages/stable_baselines/ppo2/ppo2.py", line 307, in learn writer=writer, states=mb_states)) File "/usr/local/lib/python3.6/dist-packages/stable_baselines/ppo2/ppo2.py", line 245, in _train_step writer.add_run_metadata(run_metadata, 'step%d' % (update * update_fac)) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/summary/writer/writer.py", line 264, in add_run_metadata raise ValueError("The provided tag was already used for this event type") ValueError: The provided tag was already used for this event type 2019-07-25 23:01:38,359 - __main__ - optimize - INFO - Finished trials: 558 2019-07-25 23:01:38,633 - __main__ - optimize - INFO - Best trial: -599.3695253077894 2019-07-25 23:01:38,633 - __main__ - optimize - INFO - Params: 2019-07-25 23:01:38,895 - __main__ - optimize - INFO - cliprange: 0.13144434574199731 2019-07-25 23:01:38,895 - __main__ - optimize - INFO - ent_coef: 6.845011861174882e-05 2019-07-25 23:01:38,895 - __main__ - optimize - INFO - gamma: 0.9686739342197893 2019-07-25 23:01:38,895 - __main__ - optimize - INFO - lam: 0.8772703435238995 2019-07-25 23:01:38,895 - __main__ - optimize - INFO - learning_rate: 0.005528318256310889 2019-07-25 23:01:38,895 - __main__ - optimize - INFO - n_steps: 311.0406063281854 2019-07-25 23:01:38,896 - __main__ - optimize - INFO - noptepochs: 1.0591429310422293 **[b6a85346cae0:00495] *** Process received signal *** **[b6a85346cae0:00495] Signal: Segmentation fault (11) [b6a85346cae0:00495] Signal code: Address not mapped (1) [b6a85346cae0:00495] Failing at address: 0x7fe8fd4a220d [b6a85346cae0:00495] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7fe900757890] [b6a85346cae0:00495] [ 1] /lib/x86_64-linux-gnu/libc.so.6(getenv+0xa5)[0x7fe900396785] [b6a85346cae0:00495] [ 2] /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(_ZN13TCMallocGuardD1Ev+0x34)[0x7fe900c01e44] [b6a85346cae0:00495] [ 3] /lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0xf5)[0x7fe900397615] [b6a85346cae0:00495] [ 4] /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(+0x13cb3)[0x7fe900bffcb3] [b6a85346cae0:00495] *** End of error message ******* WARNING: Logging before flag parsing goes to stderr. 2019-07-25 23:01:49,494 - __main__ - initialize_data - DEBUG - Initialized Features: ['Date', 'Open', 'High', 'Low', 'Close', 'Volume'] [I 2019-07-25 23:02:28,755] Using an existing study with name 'PPO2__MlpLnLstmPolicy__IncrementalProfit' instead of creating a new one. 2019-07-25 23:02:28,763 - __main__ - initialize_optuna - DEBUG - Initialized Optuna: 2019-07-25 23:02:30,123 - __main__ - initialize_optuna - DEBUG - Best reward in (558) trials: -599.3695253077894 2019-07-25 23:02:30,255 - __main__ - __init__ - DEBUG - Initialize RLTrader: PPO2__MlpLnLstmPolicy__IncrementalProfit [b6a85346cae0:00956] *** Process received signal *** [b6a85346cae0:00956] Signal: Segmentation fault (11) [b6a85346cae0:00956] Signal code: Address not mapped (1) [b6a85346cae0:00956] Failing at address: 0x7f316882a20d [b6a85346cae0:00956] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f316badf890] [b6a85346cae0:00956] [ 1] /lib/x86_64-linux-gnu/libc.so.6(getenv+0xa5)[0x7f316b71e785] [b6a85346cae0:00956] [ 2] /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(_ZN13TCMallocGuardD1Ev+0x34)[0x7f316bf89e44] [b6a85346cae0:00956] [ 3] /lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0xf5)[0x7f316b71f615] [b6a85346cae0:00956] [ 4] /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(+0x13cb3)[0x7f316bf87cb3] [b6a85346cae0:00956] *** End of error message ***
The text was updated successfully, but these errors were encountered: