Skip to content

Commit

Permalink
feat: change name
Browse files Browse the repository at this point in the history
  • Loading branch information
AJDERS committed Feb 22, 2023
1 parent 24af26b commit 0577a8d
Show file tree
Hide file tree
Showing 10 changed files with 3,078 additions and 1,692 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Build documentation
run: |
poetry env use "3.10"
poetry run pdoc --docformat google src/aiai -o docs
poetry run pdoc --docformat google src/alexandra_ai -o docs
- name: Compress documentation
run: tar --directory docs/ -hcf artifact.tar .
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ target/
.pytest_cache/

# Documentation
docs/aiai_eval/
docs/aiai_eval.html
docs/alexandra_ai_eval/
docs/alexandra_ai_eval.html
docs/index.html
docs/search.json

# AIAI
.aiai_cache/
aiai_evaluation_results.json
# Alexandra AI
.alexandra_ai_cache/
alexandra_ai_evaluation_results.json

# Gradio logs
flagged/
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this
project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Support for evaluation of local Hugging Face models.
- Tests for the `question_answering`-task.
- The `automatic_speech_recognition`-task.
- Util functions, `leaderboard_utils`, for interacting with the associated REST-api which interacts with the leaderboard holding the evaluation results.
- A new function in the `evaluator` module, called `_send_results_to_leaderboard` which sends evaluation results to the leaderboard using the util functions from `leaderboard_utils`, and tests for this function and `leaderboard_utils`.
- The `discourse-coherence`-task.
- Support for integer labels.

## [v0.0.1] - 2022-08-29

### Added

- First release, which includes evaluation of sentiment models from the Hugging Face
Hub. This can be run with the CLI using the `evaluate` command, or via a script using
the `Evaluator` class.
15 changes: 8 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Welcome to AIAI contributing guide
# Welcome to Alexandra AI contributing guide

Thank you for investing your time in contributing to our project! :sparkles:.

Expand All @@ -8,7 +8,6 @@ respectable.
In this guide you will get an overview of the contribution workflow from opening an
issue, creating a PR, reviewing, and merging the PR.


## New contributor guide

To get an overview of the project, read the [README](README.md). Here are some
Expand All @@ -19,7 +18,6 @@ resources to help you get started with open source contributions:
- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow)
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)


## Getting started

### Issues
Expand All @@ -29,18 +27,19 @@ resources to help you get started with open source contributions:
If you spot a problem with the package, [search if an issue already
exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments).
If a related issue doesn't exist, you can open a new issue using a relevant [issue
form](https://github.com/alexandrainst/aiai/issues).
form](https://github.com/alexandrainst/AlexandraAI/issues).

#### Solve an issue

Scan through our [existing issues](https://github.com/alexandrainst/aiai/issues)
Scan through our [existing issues](https://github.com/alexandrainst/AlexandraAI/issues)
to find one that interests you. You can narrow down the search using `labels` as
filters. See [Labels](/contributing/how-to-use-labels.md) for more information. If you
find an issue to work on, you are welcome to open a PR with a fix.

### Make Changes

1. Fork the repository.

- Using GitHub Desktop:
- [Getting started with GitHub Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop) will guide you through setting up Desktop.
- Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)!
Expand All @@ -64,6 +63,7 @@ Once your changes are ready, don't forget to
### Pull Request

When you're finished with the changes, create a pull request, also known as a PR.

- Fill the "Ready for review" template so that we can review your PR. This template
helps reviewers understand your changes as well as the purpose of your pull request.
- Don't forget to [link PR to
Expand All @@ -75,6 +75,7 @@ When you're finished with the changes, create a pull request, also known as a PR

Once you submit your PR, a team member will review your proposal. We may ask
questions or request for additional information.

- We may ask for changes to be made before a PR can be merged, either using [suggested
changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request)
or pull request comments. You can apply suggested changes directly through the UI.
Expand All @@ -85,6 +86,6 @@ questions or request for additional information.
tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve
merge conflicts and other issues.

### Your PR is merged!
### Your PR is merged

Congratulations :tada::tada: The AIAI team thanks you :sparkles:.
Congratulations :tada::tada: The AlexandraAI team thanks you :sparkles:.
61 changes: 30 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,74 @@
<div align='center'>
<img src="https://raw.githubusercontent.com/alexandrainst/AIAI/main/gfx/aiai-logo.png" width="auto" height="224">
</div>
# AlexandraAI

### A Python package for Danish data science
##### _(pronounced as in "Aye aye captain")_

______________________________________________________________________
[![PyPI Status](https://badge.fury.io/py/aiai.svg)](https://pypi.org/project/aiai/)
[![Documentation](https://img.shields.io/badge/docs-passing-green)](https://alexandrainst.github.io/AIAI/aiai.html)
[![License](https://img.shields.io/github/license/alexandrainst/aiai)](https://github.com/alexandrainst/aiai/blob/main/LICENSE)
[![LastCommit](https://img.shields.io/github/last-commit/alexandrainst/aiai)](https://github.com/alexandrainst/aiai/commits/main)
[![Code Coverage](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg)](https://github.com/alexandrainst/aiai/tree/main/tests)

[![PyPI Status](https://badge.fury.io/py/alexandra_ai.svg)](https://pypi.org/project/alexandra_ai/)
[![Documentation](https://img.shields.io/badge/docs-passing-green)](https://alexandrainst.github.io/AlexandraAI/alexandra_ai.html)
[![License](https://img.shields.io/github/license/alexandrainst/AlexandraAI)](https://github.com/alexandrainst/AlexandraAI/blob/main/LICENSE)
[![LastCommit](https://img.shields.io/github/last-commit/alexandrainst/AlexandraAI)](https://github.com/alexandrainst/AlexandraAI/commits/main)
[![Code Coverage](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg)](https://github.com/alexandrainst/AlexandraAI/tree/main/tests)

## Installation

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

```
$ pip install aiai
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>
evaluate --model-id <model_id> --task <task>
```

Here `model_id` is the HuggingFace model ID, which can be found on the [HuggingFace
Hub](https://huggingface.co/models), 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
evaluate --help
```

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

```
$ evaluate --model_id <model_id>@<commit>
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
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
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 aiai import Evaluator
>>> 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
Expand All @@ -72,27 +78,21 @@ 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 `aiai` package:
The following are the core maintainers of the `alexandra_ai` package:

- [@saattrupdan](https://github.com/saattrupdan) (Dan Saattrup Nielsen; [email protected])
- [@AJDERS](https://github.com/AJDERS) (Anders Jess Pedersen; [email protected])

## The AlexandraAI ecosystem

## The AIAI ecosystem

This package is a wrapper around several AIAI packages, each of which is standalone:

- [AIAI-eval](https://github.com/alexandrainst/AIAI-eval): Evaluation of finetuned models.
- [AIAI-train](https://github.com/alexandrainst/AIAI-train): Finetuning machine learning models.
- [AIAI-deploy](https://github.com/alexandrainst/AIAI-deploy): Deployment and monitoring of machine learning models.
- [AIAI-data](https://github.com/alexandrainst/AIAI-data): Accessing external data sources.
- [AIAI-anon](https://github.com/alexandrainst/AIAI-anon): Anonymization and pseudonymization of texts.
This package is a wrapper around other AlexandraAI packages, each of which is standalone:

- [AlexandraAI-eval](https://github.com/alexandrainst/AlexandraAI-eval): Evaluation of finetuned models.

## Project structure

```
.
├── .flake8
Expand All @@ -108,13 +108,12 @@ This package is a wrapper around several AIAI packages, each of which is standal
├── LICENSE
├── README.md
├── gfx
│   └── aiai-logo.png
├── makefile
├── notebooks
├── poetry.toml
├── pyproject.toml
├── src
│   ├── aiai
│   ├── alexandra_ai
│   │   └── __init__.py
│   └── scripts
│   ├── fix_dot_env_file.py
Expand Down
8 changes: 4 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ setup-git:
@poetry run pre-commit install

docs:
@poetry run pdoc --docformat google src/aiai -o docs
@poetry run pdoc --docformat google src/alexandra_ai -o docs
@echo "Saved documentation."

view-docs:
Expand All @@ -65,7 +65,7 @@ view-docs:
(*CYGWIN*) openCmd='cygstart'; ;; \
(*) echo 'Error: Unsupported platform: $${uname}'; exit 2; ;; \
esac; \
"$${openCmd}" docs/aiai.html
"$${openCmd}" docs/alexandra_ai.html

bump-major:
@poetry run python -m src.scripts.versioning --major
Expand Down Expand Up @@ -117,7 +117,7 @@ tree:
-I *.txt \
-I checkpoint-* \
-I .coverage* \
-I .aiai_cache \
-I aiai_evaluation_results.json \
-I .alexandra_ai_cache \
-I alexandra_ai_evaluation_results.json \
-I __pycache__ \
-I flagged
Loading

0 comments on commit 0577a8d

Please sign in to comment.