oneapi-src / oneapi-src/oneAPI-samples

profile_utils.py:164 causes warning message

オープン
#1,368 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

bug
主要言語
C++
スター
1.2k
フォーク
745
PR マージ指標
30日以内にマージされた PR はありません

説明

Summary

The profile_utils.py causes following annoying warning messages. Please figure out a way to eliminate it.

profile_utils.py:164: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  data['time'] = data['time'].astype(float)

Version

Python 3.10.6
Pandas 1.5.3

Environment

Ubuntu 22.04.1 LTS

Steps to reproduce

python3 profile_utils.py

Observed behavior

The annoying warning messages presented above

Expected behavior

No warning messages presented in the console output

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

報告されている Python 3.10.6 と Pandas 1.5.3 のバージョンで、まず python3 profile_utils.py <your onednn verbose log file> を実行します。profile_utils.py:164 を調査し、SettingWithCopyWarning を再現します。コマンドがコンソール出力にその警告を表示せずに完了すれば完了です。

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

評価

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

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

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