
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Pytorch based library for robust prototyping, standardized benchmarking, and effortless experiment management
|
.. image:: https://github.com/asappresearch/flambe/workflows/Run%20fast%20tests/badge.svg :target: https://github.com/asappresearch/flambe/actions :alt: Fast tests
.. image:: https://github.com/asappresearch/flambe/workflows/Run%20slow%20tests/badge.svg :target: https://github.com/asappresearch/flambe/actions :alt: Slow tests
.. image:: https://readthedocs.org/projects/flambe/badge/?version=latest :target: https://flambe.ai/en/latest/?badge=latest :alt: Documentation Status
.. image:: https://badge.fury.io/py/flambe.svg :target: https://badge.fury.io/py/flambe :alt: PyPI version
|
Welcome to Flambé, a PyTorch <https://pytorch.org/>
_-based library that allows users to:
From PIP
:
.. code-block:: bash
pip install flambe
From source:
.. code-block:: bash
git clone git@github.com:asappresearch/flambe.git
cd flambe
pip install .
Define an Experiment
:
.. code-block:: yaml
!Experiment
name: sst-text-classification
pipeline:
# stage 0 - Load the Stanford Sentiment Treebank dataset and run preprocessing
dataset: !SSTDataset
transform:
text: !TextField
label: !LabelField
# Stage 1 - Define a model
model: !TextClassifier
embedder: !Embedder
embedding: !torch.Embedding # automatically use pytorch classes
num_embeddings: !@ dataset.text.vocab_size
embedding_dim: 300
embedding_dropout: 0.3
encoder: !PooledRNNEncoder
input_size: 300
n_layers: !g [2, 3, 4]
hidden_size: 128
rnn_type: sru
dropout: 0.3
output_layer: !SoftmaxLayer
input_size: !@ model[embedder][encoder].rnn.hidden_size
output_size: !@ dataset.label.vocab_size
# Stage 2 - Train the model on the dataset
train: !Trainer
dataset: !@ dataset
model: !@ model
train_sampler: !BaseSampler
val_sampler: !BaseSampler
loss_fn: !torch.NLLLoss
metric_fn: !Accuracy
optimizer: !torch.Adam
params: !@ train[model].trainable_params
max_steps: 10
iter_per_step: 100
# Stage 3 - Eval on the test set
eval: !Evaluator
dataset: !@ dataset
model: !@ train.model
metric_fn: !Accuracy
eval_sampler: !BaseSampler
# Define how to schedule variants
schedulers:
train: !ray.HyperBandScheduler
All objects in the pipeline
are subclasses of Component
, which
are automatically registered to be used with YAML. Custom Component
implementations must implement run
to add custom behavior when being executed.
Now just execute:
.. code-block:: bash
flambe example.yaml
Note that defining objects like model and dataset ahead of time is optional; it's useful if you want to reference the same model architecture multiple times later in the pipeline.
Progress can be monitored via the Report Site (with full integration with Tensorboard).
!g
in the example) users can define multi variant pipelines. More advanced search algorithms will be available in a coming release!Experiments
to Clusters
which will execute in a distributed way. Full AWS
integration is supported.Full documentation, tutorials and much more in https://flambe.ai
You can reach us at flambe@asapp.com
FAQs
Pytorch based library for robust prototyping, standardized benchmarking, and effortless experiment management
We found that flambe 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.