Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

entities don't handle being set to np.inf

オープン
#133 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
numpy, python
領域
backend

調査の方向性

control script に示されている Python cmd_interface.set 呼び出しから開始し、entity の値が service によってどのように処理されるかを追跡してください。np.inf のケースを再現し、その後、service がハングするのではなくエラーを報告するか意図的にクラッシュすることを確認してください。issue では特定のソースファイルやテストは指定されていません。

索引モデルが issue の本文から書いたものです。

説明

My data taking scripts ran into an edge case where it tried to set an entity to np.inf. The script just hung. I didn't even see an error in the service logs. I think the dripline should catch this case and try to intentionally crash or throw an error.

To go into more detail, here is the relevant portion of my control script.

                popt_reflection, pcov_reflection = data_lorentzian_fit(s11_pow, freq, 'reflection')
                perr_reflection = np.sqrt(np.diag(pcov_reflection))

                print('Reflection lorentzian fitted parameters')
                print(popt_reflection)
                self.cmd_interface.set('f_reflection', popt_reflection[0])
                self.cmd_interface.set('sig_f_reflection', perr_reflection[0])
                self.cmd_interface.set('Q_reflection', popt_reflection[1])
                self.cmd_interface.set('sig_Q_reflection', perr_reflection[1])
                self.cmd_interface.set('dy_reflection', popt_reflection[2])
                self.cmd_interface.set('sig_dy_reflection', perr_reflection[2])
                self.cmd_interface.set('C_reflection', popt_reflection[3])
                self.cmd_interface.set('sig_C_reflection', perr_reflection[3])

My script couldn't perform the fit on the VNA trace.

 Setting na_measurement_status to start_measurement
Logging list of endpoints
Switching to transmission path
Switching to reflection path
Switching to transmission path
VNA reflection measurement
Setting na_measurement_status to start_measurement
Logging list of endpoints
Switching to transmission path
Transmission lorentzian fitted parameters
[1.61968618e+10 1.59075036e+04 2.62957230e-01 3.45835612e-03]
Switching to reflection path
/usr/local/lib/python3.7/site-packages/scipy/optimize/minpack.py:829: OptimizeWarning: Covariance of the parameters could not be estimated
  category=OptimizeWarning)
Reflection lorentzian fitted parameters
[1.61903696e+10 4.84379319e+00 2.84176343e+02 2.84231409e+02]

I think when I get an OptimizeWarning error, the values of my pcov are np.inf, so it tried to set sig_f_reflection to np.inf and just hung without making any sort of progress.

➜  ~ kubectl logs -f double-precision-logger-dripline-python-deployment-6b7fbf8d4b7h --tail 20 
{'timestamp': '2021-03-22T16:32:18.386845Z', 'sensor_name': 'Q_transmission', 'value_cal': 15907.503649437182, 'value_raw': 15907.503649437182}
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(49) -> finished processing data
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(46) -> insert data are:
{'timestamp': '2021-03-22T16:32:18.399052Z', 'sensor_name': 'sig_Q_transmission', 'value_cal': 570.3355496234211, 'value_raw': 570.3355496234211}
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(49) -> finished processing data
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(46) -> insert data are:
{'timestamp': '2021-03-22T16:32:18.411096Z', 'sensor_name': 'dy_transmission', 'value_cal': 0.26295723019139855, 'value_raw': 0.26295723019139855}
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(49) -> finished processing data
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(46) -> insert data are:
{'timestamp': '2021-03-22T16:32:18.423272Z', 'sensor_name': 'sig_dy_transmission', 'value_cal': 0.010107652156098478, 'value_raw': 0.010107652156098478}
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(49) -> finished processing data
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(46) -> insert data are:
{'timestamp': '2021-03-22T16:32:18.436062Z', 'sensor_name': 'C_transmission', 'value_cal': 0.003458356118361542, 'value_raw': 0.003458356118361542}
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(49) -> finished processing data
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(46) -> insert data are:
{'timestamp': '2021-03-22T16:32:18.449049Z', 'sensor_name': 'sig_C_transmission', 'value_cal': 0.00015618094767875254, 'value_raw': 0.00015618094767875254}
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(49) -> finished processing data
2021-03-22T16:32:26[INFO    ] dripline.implementations.postgres_sensor_logger(46) -> insert data are:
{'timestamp': '2021-03-22T16:32:26.161902Z', 'sensor_name': 'f_reflection', 'value_cal': 16190369623.81609, 'value_raw': 16190369623.81609}
2021-03-22T16:32:26[INFO    ] dripline.implementations.postgres_sensor_logger(49) -> finished processing data
2021-03-22T16:32:18[INFO    ] dripline.implementations.postgres_sensor_logger(49) -> finished processing data
2021-03-22T16:32:26[INFO    ] dripline.implementations.postgres_sensor_logger(46) -> insert data are:
{'timestamp': '2021-03-22T16:32:26.161902Z', 'sensor_name': 'f_reflection', 'value_cal': 16190369623.81609, 'value_raw': 16190369623.81609}
主要言語
Python
スター
3
フォーク
6
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

driplineorg/dripline-python のほかの issue

driplineorg/dripline-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。