
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
RDEToolKitは、RDE構造化プログラムのワークフローを作成するための基本的なPythonパッケージです。 RDEToolKitの各種モジュールを使うことで、RDEへの研究・実験データの登録処理を簡単に構築できます。 また、ユーザーが研究や実験データに対して使用されているPythonモジュールと組み合わせることで、データの登録から加工、グラフ化などより多様な処理を実現できます。
See documentation for more details.
変更を加える場合、以下のドキュメントを一読お願いします。
インストールは、下記コマンドを実行してください。
pip install rdetoolkit
RDE構造化プログラム構築の一例です。
まず、RDE構造化プログラムに必要なファイルを準備します。以下のコマンドをターミナルやシェル上で実行してください。
python3 -m rdetoolkit init
コマンドが正しく動作すると、下記で示したファイル・ディレクトリが生成されます。
この例では、container
というディレクトリを作成して、開発を進めます。
pip install
を実行してください。container
├── data
│ ├── inputdata
│ ├── invoice
│ │ └── invoice.json
│ └── tasksupport
│ ├── invoice.schema.json
│ └── metadata-def.json
├── main.py
├── modules
└── requirements.txt
入力データに対してデータ加工・グラフ化・機械学習用のcsvファイルの作成など処理を実行し、RDEへデータを登録できます。下記の書式に従っていただければ、独自の処理をRDEの構造化処理のフローに組み込み込むことが可能です。
dataset()
は、以下の2つの引数を渡してください。
def dataset(srcpaths: RdeInputDirPaths, resource_paths: RdeOutputResourcePath):
...
今回の例では、modules
以下に、def display_messsage()
というダミー処理を定義し、独自の構造化処理を定義したいと思います。modules/modules.py
というファイルを作成します。
# modules/modules.py
def display_messsage(path_list):
print(f"Test Message!: {path_list}")
def dataset(srcpaths, resource_paths):
display_messsage(srcpaths)
display_messsage(resource_paths)
続いて、rdetoolkit.workflow.run()
を使って、起動処理を定義します。起動処理で主に実行処理は、
import rdetoolkit
from modules.modules import datase #独自で定義した構造化処理関数
#独自で定義した構造化処理関数を引数として渡す
rdetoolkit.workflows.run(custom_dataset_function=dataset)
もし、独自の構造化処理を渡さない場合、以下のように定義してください。
import rdetoolkit
rdetoolkit.workflows.run()
各自のローカル環境で、デバッグやテスト的にRDEの構造化処理を実行したい場合、data
ディレクトリに必要な入力データを追加することで、ローカル環境でも実行可能です。ディレクトリ構造は、以下のように、main.pyと同じ階層にdataディレクトリを配置していただければ動作します。
container/
├── main.py
├── requirements.txt
├── modules/
│ └── modules.py
└── data/
├── inputdata/
│ └── <処理したい実験データ>
├── invoice/
│ └── invoice.json
└── tasksupport/
├── metadata-def.json
└── invoice.schema.json
FAQs
A module that supports the workflow of the RDE dataset construction program
We found that rdetoolkit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.