<div align="center">

**Experiments logging & visualization**

[](https://www.codefactor.io/repository/github/catalyst-team/alchemy)
[](https://pypi.org/project/alchemy-catalyst/)
[](https://catalyst-team.github.io/alchemy-catalyst/index.html)
[](https://pepy.tech/project/alchemy-catalyst)
[](https://twitter.com/catalyst_core)
[](https://t.me/catalyst_team)
[](https://opendatascience.slack.com/messages/CGK4KQBHD)
[](https://github.com/catalyst-team/alchemy/graphs/contributors)
</div>
Part of [Catalyst Ecosystem](https://docs.google.com/presentation/d/1D-yhVOg6OXzjo9K_-IS5vSHLPIUxp1PEkFGnpRcNCNU/edit?usp=sharing). Project [manifest](https://github.com/catalyst-team/catalyst/blob/master/MANIFEST.md).
---
## Installation
Common installation:
```bash
pip install -U alchemy-catalyst
```
## Getting started
1. Goto [Alchemy](https://alchemy.host/) and get your personal token.
2. Run following **example.py**:
```python
import random
from alchemy import Logger
# insert your personal token here
token = "..."
project = "default"
for gid in range(1):
group = f"group_{gid}"
for eid in range(2):
experiment = f"experiment_{eid}"
logger = Logger(
token=token,
experiment=experiment,
group=group,
project=project,
)
for mid in range(4):
metric = f"metric_{mid}"
# let's sample some random data
n = 300
x = random.randint(-10, 10)
for i in range(n):
logger.log_scalar(metric, x)
x += random.randint(-1, 1)
logger.close()
```
3. Now you should see your metrics on [Alchemy](https://alchemy.host/).
## Catalyst.Ecosystem
1. Goto [Alchemy](https://alchemy.host/) and get your personal token.
2. Log your Catalyst experiment with **AlchemyRunner**:
```python
from catalyst.dl import SupervisedAlchemyRunner
runner = SupervisedAlchemyRunner()
runner.train(
model=model,
criterion=criterion,
optimizer=optimizer,
loaders=loaders,
logdir=logdir,
num_epochs=num_epochs,
verbose=True,
monitoring_params={
"token": "...", # insert your personal token here
"project": "default",
"experiment": "your_experiment_name",
"group": "your_experiment_group_name",
}
)
```
3. Now you should see your metrics on [Alchemy](https://alchemy.host/).
## Examples
For mode detailed tutorials, please follow [Catalyst examples](https://github.com/catalyst-team/catalyst/tree/master/examples#tutorials).