Skip to content

Commit

Permalink
#2 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed May 6, 2024
1 parent a87b4dd commit a9b4ab3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## THOR: Three-hop Reasoning for Emotion Cause Analysis in Context • [![twitter](https://img.shields.io/twitter/url/https/shields.io.svg?style=social)](https://twitter.com/nicolayr_/status/1777005686611751415)

![](https://img.shields.io/badge/Python-3.8-lightgreen.svg)
![](https://img.shields.io/badge/Python-3.10-lightgreen.svg)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/nicolay-r/THOR-ECAC/blob/master/THoR_Finetuning_SemEval2023_t3_1_public.ipynb)
[![arXiv](https://img.shields.io/badge/arXiv-2404.03361-b31b1b.svg)](https://arxiv.org/abs/2404.03361)

Expand All @@ -11,9 +11,9 @@ enhanced
and adapted for SemEval-2024 paper
[nicolay-r at SemEval-2024 Task 3: Using Flan-T5 for Reasoning Emotion Cause in Conversations with Chain-of-Thought on Emotion States](https://arxiv.org/abs/2404.03361)**

> **Update 05 March 2024**: The quick [arXiv paper](https://arxiv.org/abs/2404.03361) breakdowns 🔨 are @ [Twitter/X post](https://twitter.com/nicolayr_/status/1777005686611751415)
> **Update 06 March 2024**: 🔓 `attrdict` represents the main limitation for code launching in `Python 3.10` and hence been switched to `addict` (see [Issue#2](https://github.com/nicolay-r/THOR-ECAC/issues/2)).
> **Update 03 March 2024**: `attrdict` represents the main limitation for code launching in `Python > 3.8`.
> **Update 05 March 2024**: The quick [arXiv paper](https://arxiv.org/abs/2404.03361) breakdowns 🔨 are @ [Twitter/X post](https://twitter.com/nicolayr_/status/1777005686611751415)
> **Update 17 February 2024**: We support `--bf16` mode for launching Flan-T5 with `torch.bfloat16` type;
> this feature allows launching `xl`-sized model training with just a single NVidia-A100 (40GB)
Expand Down Expand Up @@ -67,9 +67,9 @@ To form the Codalab Submission, please [follow this section](#submitting-results
## Usage<a name="code" />

### Requirement<a name="requirement" />
![](https://img.shields.io/badge/Python-3.8-lightgreen.svg)
![](https://img.shields.io/badge/Python-3.10-lightgreen.svg)

This project has been tested under **Python-3.8**.
This project has been tested under **Python-3.8** and [adapted](https://github.com/nicolay-r/THOR-ECAC/issues/2) for the **Python-3.10**.

Using `pip`, you can install the necessary dependencies as follows:
``` bash
Expand Down
4 changes: 2 additions & 2 deletions download_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from os.path import dirname, join, realpath

import yaml
from attrdict import AttrDict
from addict import Dict

from src.service import CsvService, THoRFrameworkService, download

Expand Down Expand Up @@ -66,7 +66,7 @@ def se24_states(src, target):
args = parser.parse_args()

# Reading configuration.
config = AttrDict(yaml.load(open(args.config, 'r', encoding='utf-8'), Loader=yaml.FullLoader))
config = Dict(yaml.load(open(args.config, 'r', encoding='utf-8'), Loader=yaml.FullLoader))
names = []
for k, v in vars(args).items():
setattr(config, k, v)
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import yaml
import torch
from attrdict import AttrDict
from addict import Dict
import pandas as pd
from transformers import GenerationConfig

Expand All @@ -19,7 +19,7 @@

class Template:
def __init__(self, args):
config = AttrDict(yaml.load(open(args.config, 'r', encoding='utf-8'), Loader=yaml.FullLoader))
config = Dict(yaml.load(open(args.config, 'r', encoding='utf-8'), Loader=yaml.FullLoader))
names = []
for k, v in vars(args).items():
setattr(config, k, v)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
attrdict==2.0.1
addict
PyYAML==6.0
transformers==4.38.0
numpy
Expand Down

0 comments on commit a9b4ab3

Please sign in to comment.