Skip to content

Commit

Permalink
Misc tweaks and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
dmjoy committed Nov 3, 2023
1 parent 6037076 commit 13c526e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
26 changes: 13 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
This changelog follows the specifications detailed in: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), although we have not yet reached a `1.0.0` release.

## Unreleased
## Version 0.2.3

### Added

* Added --loglevel CLI argument for `run_action_based_chat_baseline.py` script

### Changed
* Added LanguageModel, ChatLanguageModel classes for ADMs to inherit from

### Fixed
* Added AlignedDecisionMaker interface for ADMs to implement

* Fixed issue where TA3 training session flag wasn't being passed to the TA3 API
* Added template system for ADMs to use

* Removing training session data info from "action to take" passed to TA3 API
* Added evaluation library code to measure ADM performance

* Added ChatKDMAPredictingADM ADM

## Version 0.2.3
* Added a few tests for LanguageModel and ChatLanguageModel classes

#### Added
### Changed

* Added LanguageModel, ChatLanguageModel classes for ADMs to inherit from
* Added AlignedDecisionMaker interface for ADMs to implement
* Added template system for ADMs to use
* Added evaluation library code to measure ADM performance
* Added ChatKDMAPredictingADM ADM
* Added a few tests for LanguageModel and ChatLanguageModel classes
### Fixed

* Fixed issue where TA3 training session flag wasn't being passed to the TA3 API

* Removing training session data info from "action to take" passed to TA3 API


## Version 0.2.2
Expand Down
14 changes: 7 additions & 7 deletions align_system/cli/run_action_based_chat_baseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from align_system.utils import logging
from align_system.interfaces.cli_builder import build_interfaces
from align_system.algorithms.llm_chat_baseline import (
LLMChatBaseline,
from align_system.algorithms.llama_2_single_kdma_adm import (
Llama2SingleKDMAADM,
TREATMENT_MULTIPLE_CHOICE_JSON_FORMAT,
TAGGING_MULTIPLE_CHOICE_JSON_FORMAT)
from align_system.prompt_engineering.common import (
Expand Down Expand Up @@ -83,7 +83,7 @@ def run_action_based_chat_system(interface,
alignment_target_dict = scenario.get_alignment_target()

log.info('Creating algorithm')
algorithm = LLMChatBaseline(hf_model=model, precision=precision)
algorithm = Llama2SingleKDMAADM(hf_model=model, precision=precision)
algorithm.load_model()

current_state = scenario.get_state()
Expand Down Expand Up @@ -158,12 +158,12 @@ def run_action_based_chat_system(interface,

log.info("* ADM raw response: {}".format(raw_response))

parsed_output = LLMChatBaseline.attempt_generic_parse(
parsed_output = Llama2SingleKDMAADM.attempt_generic_parse(
raw_response, ['Reasoning', 'Answer'])

if parsed_output is None:
explanation, action_idx =\
LLMChatBaseline.parse_generated_output(
Llama2SingleKDMAADM.parse_generated_output(
raw_response)
else:
explanation = parsed_output['Reasoning']
Expand Down Expand Up @@ -221,7 +221,7 @@ def run_action_based_chat_system(interface,
log.info("** ADM raw treatment response: {}".format(
raw_treatment_response))

parsed_treatment_output = LLMChatBaseline.attempt_generic_parse( # noqa
parsed_treatment_output = Llama2SingleKDMAADM.attempt_generic_parse( # noqa
raw_treatment_response, ['Reasoning', 'Answer', 'Location']) # noqa

if parsed_treatment_output is not None:
Expand Down Expand Up @@ -267,7 +267,7 @@ def run_action_based_chat_system(interface,
log.info("** ADM raw tagging response: {}".format(
raw_tagging_response))

parsed_tagging_output = LLMChatBaseline.attempt_generic_parse( # noqa
parsed_tagging_output = Llama2SingleKDMAADM.attempt_generic_parse( # noqa
raw_tagging_response, ['Reasoning', 'Answer', 'Tag']) # noqa

if parsed_tagging_output is not None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "align-system"
version = "0.2.2"
version = "0.2.3"
description = ""
authors = ["David Joy <10147749+dmjoy@users.noreply.github.com>"]
readme = "README.md"
Expand Down

0 comments on commit 13c526e

Please sign in to comment.