enarjord / passivbot

Trading bot running on Bybit, Bitget, OKX, GateIO, Binance and Hyperliquid
https://www.passivbot.com
Other
1.15k stars 424 forks source link

[error] When running optimize, FileNotFoundError: [Errno 2] and WARNING 540 7 411 #180

Open PARLTOR opened 3 years ago

PARLTOR commented 3 years ago

simple sliding window optimization

2021-07-05 10:27:00,924 WARNING function_runner.py:540 -- Function checkpointing is disabled. This may result in unexpected behavior when using checkpointing features or certain schedulers. To enable, set the train function arguments to be func(config, checkpoint_dir=None). 2021-07-05 10:27:01,095 WARNING tune.py:411 -- Tune detects GPUs, but no trials are using GPUs. To enable trials to use GPUs, set tune.run(resources_per_trial={'gpu': 1}...) which allows Tune to expose 1 GPU to each trial. You can also override Trainable.default_resource_request if using the Trainable API. Traceback (most recent call last): File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorboardX\record_writer.py", line 58, in open_file factory = REGISTERED_FACTORIES[prefix] KeyError: 'C'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "optimize.py", line 326, in asyncio.run(main()) File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete return future.result() File "optimize.py", line 318, in main analysis = backtest_tune(data, config, start_candidate) File "optimize.py", line 253, in backtest_tune analysis = tune.run( File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\ray\tune\tune.py", line 421, in run runner.step() File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\ray\tune\trial_runner.py", line 389, in step if _start_trial(next_trial): File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\ray\tune\trial_runner.py", line 380, in _start_trial self._callbacks.on_trial_start( File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\ray\tune\callback.py", line 180, in on_trial_start callback.on_trial_start(**info) File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\ray\tune\logger.py", line 397, in on_trial_start self.log_trial_start(trial) File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\ray\tune\logger.py", line 605, in log_trial_start self._trial_writer[trial] = self._summary_writer_cls( File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorboardX\writer.py", line 299, in init self._get_file_writer() File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorboardX\writer.py", line 350, in _get_file_writer self.file_writer = FileWriter(logdir=self.logdir, File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorboardX\writer.py", line 105, in init self.event_writer = EventFileWriter( File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorboardX\event_file_writer.py", line 106, in init self._ev_writer = EventsWriter(os.path.join( File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorboardX\event_file_writer.py", line 43, in init self._py_recordio_writer = RecordWriter(self._file_name) File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorboardX\record_writer.py", line 176, in init self._writer = open_file(path) File "C:\Users\P-A\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorboardX\record_writer.py", line 61, in open_file return open(path, 'wb') FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\P-A\BinBot\passivbot\backtests\binance\ETHUSDT\optimize\2021-07-05T102648\search\_inner_270da77e_1_break_early_factor=0.5,c_mult=1.0,caches_dirpath=backtests\binance\ETHUSDT\caches\,config_name=name,do_long=True_2021-07-05_10-27-01\events.out.tfevents.1625477221'

bbabbajo commented 3 years ago

i also got the same error

ChunHsinWang commented 3 years ago

same error for me too

ChunHsinWang commented 3 years ago

The problem is due to path length limitations on windows. You can enable long path by following instructions on this page: https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/

credit by Kacha in passivbot Discord community.