Git Product home page Git Product logo

Comments (4)

quantylab avatar quantylab commented on August 27, 2024

@sdmadmin 안녕하세요 우선 저희 프로젝트에 관심 가져 주셔서 감사드립니다.

  1. GPU가 활성화 되었으면 별도로 설정이 필요하진 않은 것으로 알고 있는데... GPU 어떤 모델 사용하고 계신가요?
  2. keras 라이브러리가 아닌 tf.keras 모듈로 변경하면될 것 같습니다. (현재 tf.keras로 변경하여 개정판 준비 중입니다.)

from rltrader.

sdmadmin avatar sdmadmin commented on August 27, 2024

안녕하세요,
답변에 감사드립니다.

  1. 우선 구글 Colab의 GPU모델 정보는 아래와 같이 나타납니다.
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 440.33.01 Driver Version: 418.67 CUDA Version: 10.1 |
    |-------------------------------+----------------------+----------------------+
    | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
    | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
    |===============================+=================
    | 0 Tesla P100-PCIE... Off | 00000000:00:04.0 Off | 0 |
    | N/A 29C P0 26W / 250W | 0MiB / 16280MiB | 0% Default |
    +-------------------------------+----------------------+----------------------+

  2. 개정판 출간은 언제쯤인지 알 수 있을까요 ?
    많이 기다려 지네요.

from rltrader.

quantylab avatar quantylab commented on August 27, 2024

@sdmadmin 좋은 GPU를 가지고 계시네요^^ 그런데 메모리 사용을 전혀 안하고 있는데 RL을 돌리 때도 저런지 한번 보면 좋을 것 같구요, RL 시작할 때 tensorflow가 출력해주는 내용도 봐보면 좋을 것 같습니다.

개정판은 내년 1분기가 되지 않을까 생각합니다...만 정확하진 않습니다;;

from rltrader.

gandol2 avatar gandol2 commented on August 27, 2024

@quantylab 안녕하세요. 저도 동일한 문제를 가지고 있습니다.
기존의 코드를 사용해서 실행을 하면 GPU를 사용하고 있는것으로 추정은 되나 속도에서 이점을 전혀 못느끼고 있습니다..
실행 시점의 로그는 다음과 같습니다. 한번 검토 부탁드립니다.

그리고

keras 라이브러리가 아닌 tf.keras 모듈로 변경하면될 것 같습니다.

이부분에 대해서 조금만더 자세히 설명 해주시면 좋을것 같습니다 ^^;;

> python g:/00_Git_Repo/pbtrader/main.py
Using TensorFlow backend.
NumExpr defaulting to 4 threads.
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:74: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.

From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:74: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.

WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.

From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.

WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:133: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.

From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:133: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.

WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\keras\optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.

From C:\ProgramData\Anaconda3\lib\site-packages\keras\optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.

LR: 0.001, DF: 0, TU: [1, 2], DRT: 0.2
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:2741: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:2741: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2019-12-19 18:27:14.301239: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX
2019-12-19 18:27:14.308133: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library nvcuda.dll
2019-12-19 18:27:14.388985: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2019-12-19 18:27:14.425687: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: DESKTOP-92HTCUE
2019-12-19 18:27:14.492528: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: DESKTOP-92HTCUE
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\math_grad.py:1250: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\math_grad.py:1250: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py:211: RuntimeWarning: Glyph 50640 missing from current font.
  font.set_text(s, 0.0, flags=flags)
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py:211: RuntimeWarning: Glyph 54252 missing from current font.
  font.set_text(s, 0.0, flags=flags)
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py:211: RuntimeWarning: Glyph 53356 missing from current font.
  font.set_text(s, 0.0, flags=flags)
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py:180: RuntimeWarning: Glyph 50640 missing from current font.
  font.set_text(s, 0, flags=flags)
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py:180: RuntimeWarning: Glyph 54252 missing from current font.
  font.set_text(s, 0, flags=flags)
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py:180: RuntimeWarning: Glyph 53356 missing from current font.
  font.set_text(s, 0, flags=flags)
[Epoch 001/100] Epsilon:0.5000  #Expl.:115/243  #Buy:80 #Sell:72        #Hold:91        #Stocks:8       PV:₩21,811,000  POS:3   NEG:1   Loss:  0.190686
[Epoch 002/100] Epsilon:0.4949  #Expl.:134/243  #Buy:89 #Sell:81        #Hold:73        #Stocks:8       PV:₩21,791,000  POS:3   NEG:1   Loss:  0.208577
[Epoch 003/100] Epsilon:0.4899  #Expl.:122/243  #Buy:75 #Sell:66        #Hold:102       #Stocks:9       PV:₩23,207,000  POS:3   NEG:1   Loss:  0.196267
[Epoch 004/100] Epsilon:0.4848  #Expl.:107/243  #Buy:75 #Sell:67        #Hold:101       #Stocks:8       PV:₩25,976,000  POS:3   NEG:1   Loss:  0.200985
[Epoch 005/100] Epsilon:0.4798  #Expl.:120/243  #Buy:94 #Sell:85        #Hold:64        #Stocks:9       PV:₩23,774,000  POS:3   NEG:1   Loss:  0.184779
[Epoch 006/100] Epsilon:0.4747  #Expl.:124/243  #Buy:88 #Sell:86        #Hold:69        #Stocks:2       PV:₩23,792,000  POS:4   NEG:0   Loss:  0.182385
[Epoch 007/100] Epsilon:0.4697  #Expl.:101/243  #Buy:71 #Sell:62        #Hold:110       #Stocks:9       PV:₩23,030,000  POS:3   NEG:1   Loss:  0.193525
Traceback (most recent call last):
  File "g:/00_Git_Repo/pbtrader/main.py", line 63, in <module>
    discount_factor=0, start_epsilon=.5)
  File "g:\00_Git_Repo\pbtrader\policy_learner.py", line 189, in fit
    initial_balance=self.agent.initial_balance, pvs=memory_pv
  File "g:\00_Git_Repo\pbtrader\visualizer.py", line 141, in plot
    self.axes[2].axvline(idx, color=color, alpha=0.1)
  File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes\_axes.py", line 935, in axvline
    self.add_line(l)
  File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 1898, in add_line
    self._set_artist_props(line)
  File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 921, in _set_artist_props
    a.axes = self
  File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\lines.py", line 643, in axes
    self.recache_always)
  File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\cbook\__init__.py", line 168, in connect
    proxy = WeakMethod(func, self._remove_proxy)
  File "C:\ProgramData\Anaconda3\lib\weakref.py", line 61, in __new__
    self._meth_type = type(meth)
KeyboardInterrupt

 >

from rltrader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.