Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions 1-ttc.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Two main approaches exist for this task:
| Approach | How it works | Best when |
|---|---|---|
| **Supervised (this notebook)** | Train a neural network on labelled examples | Large labelled dataset available, low-latency inference needed |
| **RAG** (see notebook 2) | Retrieve similar examples, ask a LLM to decide | Few labelled examples, need for explainability via retrieved context |
| **RAG** (see notebook 2) | Retrieve similar examples, ask a LLM to decide | Few labelled examples |

In this notebook, we use the supervised approach: the model learns directly from thousands of labelled examples and can predict at inference time without calling an external API.

Expand All @@ -42,7 +42,7 @@ flowchart LR
## What you will learn

- How to prepare and split a labelled text dataset
- How to train a subword tokenizer (WordPiece) on domain-specific text
- How to train a subword tokenizer (WordPiece) on domain-specific text (tokenizers are introduced in @sec-tokenizer)
- How to configure and train a neural text classifier end-to-end
- How to load a pretrained model from MLflow and run inference
- How to interpret predictions using the [Captum](https://captum.ai/docs/introduction) package
Expand Down Expand Up @@ -100,7 +100,7 @@ The notebook loads this file automatically at startup with `load_dotenv()`, maki

# Load the data

The dataset consists of **synthetic labelled examples** generated for the NACE 2025 nomenclature.
The dataset consists of **synthetic labelled examples** generated for the NACE rev 2.1 nomenclature.
Each row contains a short text description (`label`) and the corresponding NACE code (`code`).

::: {.callout-tip collapse="false" icon=false}
Expand All @@ -122,7 +122,7 @@ load_dotenv(override=True)

## Question 2 — Load the dataset from s3

Use Polars to load the parquet file directly from this public URL:
Use [Polars](https://docs.pola.rs/api/python/stable/reference/index.html) to load the parquet file directly from this public URL:

```
https://minio.lab.sspcloud.fr/projet-formation/diffusion/funathon/2026/project2/generation_None_temp08.parquet
Expand Down Expand Up @@ -286,7 +286,7 @@ value_encoder = ValueEncoder(label_encoder=encoder)

:::

# Applying a tokenizer
# Applying a tokenizer {#sec-tokenizer}

## Why tokenization?

Expand Down
6 changes: 1 addition & 5 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Build a **retrieval-augmented generation** (RAG) system that combines a vector d

Before diving into either part, follow these steps to set up your environment. The same setup applies to both parts.

If you need more details for setups, do not hesitate to visite [project 1 introduction page](https://aiml4os.github.io/funathon-project1/).
If you need more details for setups, do not hesitate to visite [project 1 introduction page](https://aiml4os.github.io/funathon-project1/) and/or watch the 2026's Funathon [Onboarding replay](https://aiml4os.github.io/funathon-general-website/onboarding.html).

## Fork this repository

Expand Down Expand Up @@ -154,8 +154,4 @@ df["code"].value_counts().head(10).plot(kind="bar")

A small "Run Cell" lens appears above each `# %%` marker. Click it to execute that block. You can also use the shortcut <kbd>Shift</kbd> + <kbd>Enter</kbd>. This is convenient for iterating on small pieces of code or testing specific functions from the project.

::: {.callout-tip}
Files created at the root of the repository for your own exploration (such as `scratch.py` or `notes.md`) can be safely ignored from git by adding them to your local `.gitignore`, or to `.git/info/exclude` if you don't want to commit the ignore rule.
:::

You're now ready to start. Head to [Part 1](1-ttc.qmd) or [Part 2](2-rag-intro.qmd).
Loading