Skip to main content

Alexandra Institute Artificial Intelligence, a Python package for Danish data science.

Project description

AlexandraAI

A Python package for Danish data science


PyPI Status Documentation License LastCommit Code Coverage

Installation

To install the package simply write the following command in your favorite terminal:

pip install alexandra-ai

Quickstart

Benchmarking from the Command Line

The easiest way to benchmark pretrained models is via the command line interface. After having installed the package, you can benchmark your favorite model like so:

evaluate --model-id <model_id> --task <task>

Here model_id is the HuggingFace model ID, which can be found on the HuggingFace Hub, and task is the task you want to benchmark the model on, such as "ner" for named entity recognition. See all options by typing

evaluate --help

The specific model version to use can also be added after the suffix '@':

evaluate --model_id <model_id>@<commit>

It can be a branch name, a tag name, or a commit id. It defaults to 'main' for latest.

Multiple models and tasks can be specified by just attaching multiple arguments. Here is an example with two models:

evaluate --model_id <model_id1> --model_id <model_id2> --task ner

See all the arguments and options available for the evaluate command by typing

evaluate --help

Benchmarking from a Script

In a script, the syntax is similar to the command line interface. You simply initialise an object of the Evaluator class, and call this evaluate object with your favorite models and/or datasets:

>>> from alexandra_ai import Evaluator
>>> evaluator = Evaluator()
>>> evaluator('<model_id>', '<task>')

Contributors

If you feel like this package is missing a crucial feature, if you encounter a bug or if you just want to correct a typo in this readme file, then we urge you to join the community! Have a look at the CONTRIBUTING.md file, where you can check out all the ways you can contribute to this package. :sparkles:

  • Your name here? :tada:

Maintainers

The following are the core maintainers of the alexandra_ai package:

The AlexandraAI ecosystem

This package is a wrapper around other AlexandraAI packages, each of which is standalone:

Project structure

.
├── .flake8
├── .github
│   └── workflows
│       ├── ci.yaml
│       └── docs.yaml
├── .gitignore
├── .pre-commit-config.yaml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── gfx
├── makefile
├── notebooks
├── poetry.toml
├── pyproject.toml
├── src
│   ├── alexandra_ai
│   │   └── __init__.py
│   └── scripts
│       ├── fix_dot_env_file.py
│       └── versioning.py
└── tests
    └── __init__.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alexandra-ai-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

alexandra_ai-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file alexandra-ai-0.1.0.tar.gz.

File metadata

  • Download URL: alexandra-ai-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.10.10 Darwin/21.6.0

File hashes

Hashes for alexandra-ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5b8e51dd0ee7391c31ffc6f8f578d7bbe047192b51651c82369195f3eaf2bc00
MD5 d6faf63fcb7e327b46d017aba5bb2c5d
BLAKE2b-256 ffdbf688ad74091a1015fd643a502d4c569c94cf257e3560878f73693dd24072

See more details on using hashes here.

File details

Details for the file alexandra_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: alexandra_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.10.10 Darwin/21.6.0

File hashes

Hashes for alexandra_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1c1f2d2ed1a5bc35989ef6728eb12d5f5450aa8be98c647b91fca27e7507c98
MD5 e6ed7276e7f4cbc636530037d64561b0
BLAKE2b-256 7022acdc7240450ca167513de7995623858914318e61452f159a89603148198a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page