Skip to content

Conversation

@sergey-serebryakov
Copy link
Contributor

@sergey-serebryakov sergey-serebryakov commented Dec 3, 2022

This mechanism is based on callbacks. The Cmf init method accepts the list of callback instances that users can provide. Several callbacks include Neo4j (refactored existing implementation) and MLflow. These callbacks do not replace the core Cmf features. Instead, they allow to send Cmf data to someplace else.

Usage example:

```python
from cmflib.cmf import Cmf
from cmflib.integration.neo4j import Neo4JCallback
from cmflib.integration.mlflow import MLflowCallback
from cmflib.integration.determined import DeterminedCallback

cmf = Cmf(
    filename='mlmd',
    pipeline_name='mnist',
    callbacks=[
        Neo4JCallback(),
        MLflowCallback(),
        DeterminedCallback()
    ]
)
```

This opens up several opportunities, such as, for instance, making certain cmflib dependencies optional.

This mechanism is based on `callbacks`. The Cmf init method accepts the list of callback instances that users can provide. Several callbacks include Neo4j (refactored existing implementation) and MLflow. These callbacks do not replace the core Cmf features. Instead, they allow to send Cmf data to someplace else.

Usage example:

    ```python
    from cmflib.cmf import Cmf
    from cmflib.integration.neo4j import Neo4JCallback
    from cmflib.integration.mlflow import MLflowCallback

    cmf = Cmf(
        filename='mlmd',
        pipeline_name='mnist',
        callbacks=[
            Neo4JCallback(),
            MLflowCallback()
        ]
    )
    ```

This opens up several opportunities, such as, for instance, making certain `cmflib` dependencies optional.
Resolving conflicts (cmflib/cmf.py).
- This implementaiton is in its early stages. The goal is to collect feedback and see if such an integration useful.
- Supported artifacts - execution metrics. This is only supported when there's only one named group of metrics, e.g., respective callback `on_artifact_event` is called once for `ExecutionMetrics` class instance. If multiple metric groups exist, Determined will raise an exception - it requires epochs to be presented in strickly increasing order.
@sergey-serebryakov sergey-serebryakov marked this pull request as draft June 27, 2023 21:44
@sergey-serebryakov sergey-serebryakov changed the title Cmf integrations with external frameworks [WIP - need feedback and review] Cmf integrations with external frameworks [need feedback and review] Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant