Skip to content

Commit

Permalink
Update to MLFlow 2.3.0 and ae5-tools 0.6.1 (#8)
Browse files Browse the repository at this point in the history
* Update to MLFlow 2.3.0 and ae5-tools 0.6.1

* address linting offenses

---------

Co-authored-by: Josh Burt <[email protected]>
  • Loading branch information
joshburt and joshburt authored Apr 24, 2023
1 parent 99ad18c commit 3a0a379
Show file tree
Hide file tree
Showing 26 changed files with 316 additions and 273 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/main-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install dependencies
# https://github.com/conda-incubator/setup-miniconda
uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3 # v2
uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
with:
channels: default,conda-forge,joshburt
channels: default,conda-forge,joshburt,ae5-admin
auto-activate-base: true
activate-environment: github.action
environment-file: environment.github.yml
Expand All @@ -37,9 +37,6 @@ jobs:
- name: Anaconda Project Setup
run: |
anaconda-project prepare --env-spec development
- name: Activate Anaconda Project Environment
run: |
conda activate envs/development
- name: Unit Tests
run: |
anaconda-project run test:unit
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install dependencies
# https://github.com/conda-incubator/setup-miniconda
uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3 # v2
uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
with:
channels: default,conda-forge,joshburt
channels: default,conda-forge,joshburt,ae5-admin
auto-activate-base: true
activate-environment: github.action
environment-file: environment.github.yml
Expand Down
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# MLFlow Tracking Server Pruning Service

[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=shapeandshare_anaconda.mlflow.tracking.prune&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=shapeandshare_anaconda.mlflow.tracking.prune)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=shapeandshare_anaconda.mlflow.tracking.prune&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=shapeandshare_anaconda.mlflow.tracking.prune)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=shapeandshare_anaconda.mlflow.tracking.prune&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=shapeandshare_anaconda.mlflow.tracking.prune)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=shapeandshare_anaconda.mlflow.tracking.prune&metric=coverage)](https://sonarcloud.io/summary/new_code?id=shapeandshare_anaconda.mlflow.tracking.prune)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=shapeandshare_anaconda.mlflow.tracking.prune&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=shapeandshare_anaconda.mlflow.tracking.prune)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=shapeandshare_anaconda.mlflow.tracking.prune&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=shapeandshare_anaconda.mlflow.tracking.prune)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=shapeandshare_anaconda.mlflow.tracking.prune&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=shapeandshare_anaconda.mlflow.tracking.prune)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=shapeandshare_anaconda.mlflow.tracking.prune&metric=bugs)](https://sonarcloud.io/summary/new_code?id=shapeandshare_anaconda.mlflow.tracking.prune)

Overview
--------
What is resource pruning?
Expand Down
13 changes: 7 additions & 6 deletions anaconda-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ commands:
channels:
- https://conda.anaconda.org/conda-forge/
- https://conda.anaconda.org/ae5-admin/
- https://conda.anaconda.org/joshburt/

platforms:
Expand All @@ -83,17 +84,17 @@ env_specs:
description: Runtime Environment
packages:
- python=3.10.8
- mlflow=2.0.1
- mlflow=2.3.0
- ipykernel
- anaconda.enterprise.server.contracts>=0.8.3
- anaconda.enterprise.server.common.sdk>=0.4.8
- anaconda.mlflow.tracking.sdk>=0.10.3
- ae5-tools>=0.6.1
- anaconda.mlflow.tracking.sdk>=0.11.0

development:
description: Development Environment
packages:
- python=3.10.8
- mlflow=2.0.1
- mlflow=2.3.0
- ipykernel
- isort
- black
Expand All @@ -105,5 +106,5 @@ env_specs:
- sphinx-rtd-theme
- myst-parser
- anaconda.enterprise.server.contracts>=0.8.3
- anaconda.enterprise.server.common.sdk>=0.4.8
- anaconda.mlflow.tracking.sdk>=0.10.3
- ae5-tools>=0.6.1
- anaconda.mlflow.tracking.sdk>=0.11.0
2 changes: 1 addition & 1 deletion docs/build/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 1cd490713dfae121b9a5024f0bc13de6
config: 322481acb8c5b1775d33a5e81a663c91
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/build/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/build/.doctrees/install_guide.doctree
Binary file not shown.
47 changes: 11 additions & 36 deletions docs/build/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -236,16 +236,6 @@ div.body p, div.body dd, div.body li, div.body blockquote {
a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
}

a.brackets:after,
span.brackets > a:after {
content: "]";
}


h1:hover > a.headerlink,
h2:hover > a.headerlink,
Expand Down Expand Up @@ -334,11 +324,17 @@ aside.sidebar {
p.sidebar-title {
font-weight: bold;
}

nav.contents,
aside.topic,
div.admonition, div.topic, blockquote {
clear: left;
}

/* -- topics ---------------------------------------------------------------- */

nav.contents,
aside.topic,
div.topic {
border: 1px solid #ccc;
padding: 7px;
Expand Down Expand Up @@ -377,13 +373,17 @@ div.body p.centered {

div.sidebar > :last-child,
aside.sidebar > :last-child,
nav.contents > :last-child,
aside.topic > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}

div.sidebar::after,
aside.sidebar::after,
nav.contents::after,
aside.topic::after,
div.topic::after,
div.admonition::after,
blockquote::after {
Expand Down Expand Up @@ -609,25 +609,6 @@ ul.simple p {
margin-bottom: 0;
}

/* Docutils 0.17 and older (footnotes & citations) */
dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}

dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}

dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}

/* Docutils 0.18+ (footnotes & citations) */
aside.footnote > span,
div.citation > span {
float: left;
Expand All @@ -652,8 +633,6 @@ div.citation > p:last-of-type:after {
clear: both;
}

/* Footnotes & citations ends */

dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
Expand All @@ -666,10 +645,6 @@ dl.field-list > dt {
padding-right: 5px;
}

dl.field-list > dt:after {
content: ":";
}

dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
Expand Down
2 changes: 1 addition & 1 deletion docs/build/_static/css/theme.css

Large diffs are not rendered by default.

132 changes: 12 additions & 120 deletions docs/build/_static/doctools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";

const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
"TEXTAREA",
"INPUT",
"SELECT",
"BUTTON",
]);

const _ready = (callback) => {
if (document.readyState !== "loading") {
callback();
Expand All @@ -18,73 +25,11 @@ const _ready = (callback) => {
}
};

/**
* highlight a given string on a node by wrapping it in
* span elements with the given class name.
*/
const _highlight = (node, addItems, text, className) => {
if (node.nodeType === Node.TEXT_NODE) {
const val = node.nodeValue;
const parent = node.parentNode;
const pos = val.toLowerCase().indexOf(text);
if (
pos >= 0 &&
!parent.classList.contains(className) &&
!parent.classList.contains("nohighlight")
) {
let span;

const closestNode = parent.closest("body, svg, foreignObject");
const isInSVG = closestNode && closestNode.matches("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.classList.add(className);
}

span.appendChild(document.createTextNode(val.substr(pos, text.length)));
parent.insertBefore(
span,
parent.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);

if (isInSVG) {
const rect = document.createElementNS(
"http://www.w3.org/2000/svg",
"rect"
);
const bbox = parent.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute("class", className);
addItems.push({ parent: parent, target: rect });
}
}
} else if (node.matches && !node.matches("button, select, textarea")) {
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
}
};
const _highlightText = (thisNode, text, className) => {
let addItems = [];
_highlight(thisNode, addItems, text, className);
addItems.forEach((obj) =>
obj.parent.insertAdjacentElement("beforebegin", obj.target)
);
};

/**
* Small JavaScript module for the documentation.
*/
const Documentation = {
init: () => {
Documentation.highlightSearchWords();
Documentation.initDomainIndexTable();
Documentation.initOnKeyListeners();
},
Expand Down Expand Up @@ -126,51 +71,6 @@ const Documentation = {
Documentation.LOCALE = catalog.locale;
},

/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords: () => {
const highlight =
new URLSearchParams(window.location.search).get("highlight") || "";
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
if (terms.length === 0) return; // nothing to do

// There should never be more than one element matching "div.body"
const divBody = document.querySelectorAll("div.body");
const body = divBody.length ? divBody[0] : document.querySelector("body");
window.setTimeout(() => {
terms.forEach((term) => _highlightText(body, term, "highlighted"));
}, 10);

const searchBox = document.getElementById("searchbox");
if (searchBox === null) return;
searchBox.appendChild(
document
.createRange()
.createContextualFragment(
'<p class="highlight-link">' +
'<a href="javascript:Documentation.hideSearchWords()">' +
Documentation.gettext("Hide Search Matches") +
"</a></p>"
)
);
},

/**
* helper function to hide the search marks again
*/
hideSearchWords: () => {
document
.querySelectorAll("#searchbox .highlight-link")
.forEach((el) => el.remove());
document
.querySelectorAll("span.highlighted")
.forEach((el) => el.classList.remove("highlighted"));
const url = new URL(window.location);
url.searchParams.delete("highlight");
window.history.replaceState({}, "", url);
},

/**
* helper function to focus on search bar
*/
Expand Down Expand Up @@ -210,15 +110,11 @@ const Documentation = {
)
return;

const blacklistedElements = new Set([
"TEXTAREA",
"INPUT",
"SELECT",
"BUTTON",
]);
document.addEventListener("keydown", (event) => {
if (blacklistedElements.has(document.activeElement.tagName)) return; // bail for input elements
if (event.altKey || event.ctrlKey || event.metaKey) return; // bail with special keys
// bail for input elements
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
// bail with special keys
if (event.altKey || event.ctrlKey || event.metaKey) return;

if (!event.shiftKey) {
switch (event.key) {
Expand All @@ -240,10 +136,6 @@ const Documentation = {
event.preventDefault();
}
break;
case "Escape":
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
Documentation.hideSearchWords();
event.preventDefault();
}
}

Expand Down
Loading

0 comments on commit 3a0a379

Please sign in to comment.