No project description provided
Project description
DEADBEATS
An easy to use Slack messaging library for research.
Usage
from deadbeats import DEADBEATS
# use environment variables implicitly
# SLACK_ACCESS_TOKEN=xxxx-xxxxxxxxxxxxx-xxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx (Get your own Slack API access token)
# SLACK_CHANNEL_ID=deadbeats (set slack channel id whatever you like!)
# or you can set configurations manually.
DEADBEATS.set_access_token("SLACK_ACCESS_TOKEN")
DEADBEATS.set_channel_id("SLACK_CHANNEL_ID")
# `DEADBEATS.wrap` sends a message at the beginning and end of the function.
# `DEADBEATS.wrap` catch every errors and raise it after sending a error message.
@DEADBEATS.wrap
def main():
# A simple "heartbeating" message.
DEADBEATS.ping()
# You can add extra information like below.
params = {"loss": 0.5, "val_loss": 1.6, "acc": 100.0}
DEADBEATS.ping(text="message whatever you like", params=params, additional="info", huga="huga")
# Start threading!
# All subsequent messages will be sent to the thread.
DEADBEATS.start_thread()
# If you want to stop threading, you can use this method.
# This method reset "thread_ts" of a instance variable, which is a id of thread.
DEADBEATS.reset_thread()
Research Usage with PyTorch Lightning
class MyModel(pl.LightningModule):
def validation_epoch_end()
The library is named after the wonderful work of Mori Calliope, DEAD BEATS.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
deadbeats-0.2.0.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file deadbeats-0.2.0.tar.gz
.
File metadata
- Download URL: deadbeats-0.2.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2b56776595bd4f2bd8661d3f49275d90006a9188e95e675ffd012467a114af7 |
|
MD5 | f4ca1ea47db397e4fef972e1cc8430f7 |
|
BLAKE2b-256 | f9700c2b1b53f653bdc689782a4cbb4494c79279e040e10034e0ab133c80231c |
File details
Details for the file deadbeats-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: deadbeats-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b05ed446747a99817bf838b1b376380dc7345cb1537083b9868a08edc5481ee |
|
MD5 | 3d26dcb849a6dad612c7a8013d0775fe |
|
BLAKE2b-256 | 0abd0c05dba111a886f12616cc9d1e05d493e2c9dd9c5bdb245d235c6ad1fae5 |