Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
6 changes: 3 additions & 3 deletions hiplot_mlflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ def fetch_by_uri(uri: str) -> hiplot.Experiment:


def _get_experiment_id_from_name(name: str) -> Any:
"""Get an MLflow experiment's ID from its name
"""
"""Get an MLflow experiment's ID from its name"""
client = tracking.MlflowClient()
experiment = client.get_experiment_by_name(name)
if experiment is None:
Expand Down Expand Up @@ -147,7 +146,8 @@ def _create_experiment_from_dataframe(
values[t] = row[t]

dp = hiplot.Datapoint(
uid=str(uuid.UUID(row["run_id"])), values=values,
uid=str(uuid.UUID(row["run_id"])),
values=values,
)
exp.datapoints.append(dp)
return exp
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[tool.black]
line-length = 79

[tool.setuptools_scm]
version_scheme = "post-release"

[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@
author_email="opensource@faculty.ai",
license="Apache Software License",
py_modules=["hiplot_mlflow"],
use_scm_version={"version_scheme": "post-release"},
setup_requires=["setuptools_scm"],
install_requires=["hiplot", "mlflow", "numpy"],
extras_require={
"dev": ["black", "flake8", "flake8-black", "mypy", "pytest", "tox"]
"dev": [
"black==22.3.0",
"flake8",
"flake8-black",
"mypy",
"pytest",
"tox",
]
},
)
8 changes: 3 additions & 5 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,15 @@


def test_wrong_schema():
"""Test passing unsupported schema.
"""
"""Test passing unsupported schema."""
with pytest.raises(hiplot.ExperimentFetcherDoesntApply):
hiplot_mlflow.fetch_by_uri("something://")


def test_unsupported_reference_type():
"""Test passing correct schema and unsupported reference type.
"""
"""Test passing correct schema and unsupported reference type."""
with pytest.raises(hiplot.ExperimentValidationError):
hiplot_mlflow.fetch_by_uri(f"mlflow://something/else")
hiplot_mlflow.fetch_by_uri("mlflow://something/else")


@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ commands =
[testenv:black]
skip_install = True
deps =
black
black==22.3.0
commands =
black {posargs:--check setup.py hiplot_mlflow.py tests}

Expand Down