This pull request sets up a monorepo structure and separates packages into common and core components. The main changes include:
Restructuring the project layout:
Moving common functionality to libs/ape-common/ape/common/
Removing the main ape/ directory
Updating import statements to reflect the new structure
Refactoring and enhancing existing components:
Updating the BaseMetric, BaseGlobalMetric, and EvaluationConfig classes
Introducing new classes like BaseGenerate and Generate
Modifying the Evaluate class to work with the new structure
Improving the build and publish workflow:
Updating .github/workflows/publish.yml to support package-specific releases
Enhancing metric implementations:
Refactoring JsonMatchMetric, CosineSimilarityMetric, and SemanticF1Metric
Introducing a new ApeMetricPrompts class for managing metric-related prompts
These changes aim to improve the project's modularity, maintainability, and extensibility by separating concerns and providing a more organized structure for future development.
Changes that Break Backward Compatibility
Import statements: Due to the restructuring, all import statements referencing the ape package will need to be updated to use the new ape.common package structure.
Class and function signatures: Some classes and functions have been modified, which may require updates in code that uses them. For example:
BaseMetric.compute() method signature has changed
Evaluate class initialization and usage may need to be updated
Removal of ape/__init__.py: The main ape package no longer exists, which will break any code that imports directly from ape.
Configuration changes: The EvaluationConfig class has been modified, which may require updates to any code that uses it.
Description
This pull request sets up a monorepo structure and separates packages into common and core components. The main changes include:
Restructuring the project layout:
libs/ape-common/ape/common/
ape/
directoryRefactoring and enhancing existing components:
BaseMetric
,BaseGlobalMetric
, andEvaluationConfig
classesBaseGenerate
andGenerate
Evaluate
class to work with the new structureImproving the build and publish workflow:
.github/workflows/publish.yml
to support package-specific releasesEnhancing metric implementations:
JsonMatchMetric
,CosineSimilarityMetric
, andSemanticF1Metric
ApeMetricPrompts
class for managing metric-related promptsThese changes aim to improve the project's modularity, maintainability, and extensibility by separating concerns and providing a more organized structure for future development.
Changes that Break Backward Compatibility
Import statements: Due to the restructuring, all import statements referencing the
ape
package will need to be updated to use the newape.common
package structure.Class and function signatures: Some classes and functions have been modified, which may require updates in code that uses them. For example:
BaseMetric.compute()
method signature has changedEvaluate
class initialization and usage may need to be updatedRemoval of
ape/__init__.py
: The mainape
package no longer exists, which will break any code that imports directly fromape
.Configuration changes: The
EvaluationConfig
class has been modified, which may require updates to any code that uses it.Documentation
N/A
Created with Palmier