Skip to content

Commit

Permalink
Merge branch 'dev' into jcardonnet/yes_no_request
Browse files Browse the repository at this point in the history
  • Loading branch information
tcp authored Oct 11, 2023
2 parents 0b4f108 + 24740da commit 49d72fc
Show file tree
Hide file tree
Showing 14 changed files with 83 additions and 165 deletions.
84 changes: 0 additions & 84 deletions packages/grid/backend/JAX.MD

This file was deleted.

7 changes: 0 additions & 7 deletions packages/grid/backend/backend.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ RUN --mount=type=cache,target=/root/.cache \
RUN --mount=type=cache,target=/root/.cache \
pip install --user jupyterlab

# copy precompiled arm64 packages
COPY grid/backend/wheels /wheels
RUN --mount=type=cache,target=/root/.cache if [ $(uname -m) != "x86_64" ]; then \
pip install --user /wheels/jaxlib-0.4.16-cp311-cp311-manylinux2014_aarch64.whl; \
pip install --user jax==0.4.16; \
fi

WORKDIR /app

# Backend
Expand Down
20 changes: 0 additions & 20 deletions packages/grid/backend/build_jax.dockerfile

This file was deleted.

Binary file not shown.
6 changes: 0 additions & 6 deletions packages/grid/worker/worker.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ RUN --mount=type=cache,sharing=locked,target=/var/cache/apt \
RUN --mount=type=cache,target=/root/.cache \
pip install -U pip

# copy precompiled arm64 packages
COPY grid/backend/wheels /wheels
RUN --mount=type=cache,target=/root/.cache if [ $(uname -m) != "x86_64" ]; then \
pip install --user /wheels/jaxlib-0.4.16-cp311-cp311-manylinux2014_aarch64.whl; \
pip install --user jax==0.4.16; \
fi

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion packages/hagrid/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.76
current_version = 0.3.77
tag = False
tag_name = {new_version}
commit = True
Expand Down
69 changes: 55 additions & 14 deletions packages/hagrid/hagrid/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@ def get_compose_src_path(
**kwargs: TypeDict[str, Any],
) -> str:
grid_path = GRID_SRC_PATH()
tag = kwargs.get("tag", None)
if EDITABLE_MODE and template_location is None or tag == "0.7.0": # type: ignore
tag = kwargs["tag"]
# Use local compose files if in editable mode and
# template_location is None and (kwargs["dev"] is True or tag is local)
if EDITABLE_MODE and template_location is None and (kwargs["dev"] is True or tag == "local"): # type: ignore
path = grid_path
else:
path = deployment_dir(node_name)
Expand Down Expand Up @@ -1356,25 +1358,64 @@ def create_launch_cmd(
if (
parsed_kwargs["tag"] is not None
and parsed_kwargs["template"] is None
and parsed_kwargs["tag"] not in ["local", "0.7.0"]
and parsed_kwargs["tag"] not in ["local"]
):
# third party
from packaging import version

pattern = r"[0-9].[0-9].[0-9]"
input_tag = parsed_kwargs["tag"]
if (
not re.match(pattern, input_tag)
and input_tag != "latest"
and input_tag != "beta"
and "b" not in input_tag
):
raise Exception(
f"Not a valid tag: {parsed_kwargs['tag']}"
+ "\nValid tags: latest, beta, beta version(ex: 0.8.2b35),[0-9].[0-9].[0-9]"
)

# TODO: we need to redo this so that pypi and docker mappings are in a single
# file inside dev
if parsed_kwargs["tag"] == "latest":
parsed_kwargs["template"] = LATEST_STABLE_SYFT
parsed_kwargs["tag"] = LATEST_STABLE_SYFT
elif parsed_kwargs["tag"] == "beta":
parsed_kwargs["template"] = "dev"
parsed_kwargs["tag"] = LATEST_BETA_SYFT
elif parsed_kwargs["tag"] == "beta" or "b" in parsed_kwargs["tag"]:
tag = (
LATEST_BETA_SYFT
if parsed_kwargs["tag"] == "beta"
else parsed_kwargs["tag"]
)

# Currently, manifest_template.yml is only supported for beta versions >= 0.8.2b34
beta_version = version.parse(tag)
MINIMUM_BETA_VERSION = "0.8.2b34"
if beta_version < version.parse(MINIMUM_BETA_VERSION):
raise Exception(
f"Minimum beta version tag supported is {MINIMUM_BETA_VERSION}"
)

# Check if the beta version is available
template_url = f"https://github.com/OpenMined/PySyft/releases/download/v{str(beta_version)}/manifest_template.yml"
response = requests.get(template_url) # nosec
if response.status_code != 200:
raise Exception(
f"Tag {parsed_kwargs['tag']} is not available"
+ " \n for download. Please check the available tags at: "
+ "\n https://github.com/OpenMined/PySyft/releases"
)

parsed_kwargs["template"] = template_url
parsed_kwargs["tag"] = tag
else:
template = parsed_kwargs["tag"]
# 🟡 TODO: Revert to use tags once, we have tag branches with beta
# versions also.
if "b" in template:
template = "dev"
# if template == "beta":
# template = "dev"
parsed_kwargs["template"] = template
MINIMUM_TAG_VERSION = version.parse("0.8.0")
tag = version.parse(parsed_kwargs["tag"])
if tag < MINIMUM_TAG_VERSION:
raise Exception(
f"Minimum supported stable tag version is {MINIMUM_TAG_VERSION}"
)
parsed_kwargs["template"] = parsed_kwargs["tag"]

if host in ["docker"] and parsed_kwargs["template"] and host is not None:
# Setup the files from the manifest_template.yml
Expand Down
4 changes: 2 additions & 2 deletions packages/hagrid/hagrid/manifest_template.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
manifestVersion: 0.1
hagrid_version: 0.3.76
hagrid_version: 0.3.77
syft_version: 0.8.2-beta.35
dockerTag: 0.8.2-beta.35
baseUrl: https://raw.githubusercontent.com/OpenMined/PySyft/
hash: 816fedf28e3636e12a6093e6c4be39f4dc000b10
hash: 7cc9072e300872e02ae8bfcecf7bb000cdea6a17
target_dir: ~/.hagrid/PySyft/
files:
grid:
Expand Down
2 changes: 1 addition & 1 deletion packages/hagrid/hagrid/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# HAGrid Version
__version__ = "0.3.76"
__version__ = "0.3.77"

if __name__ == "__main__":
print(__version__)
2 changes: 1 addition & 1 deletion packages/hagrid/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from setuptools import find_packages
from setuptools import setup

__version__ = "0.3.76"
__version__ = "0.3.77"

DATA_FILES = {"img": ["hagrid/img/*.png"], "hagrid": ["*.yml"]}

Expand Down
4 changes: 2 additions & 2 deletions packages/syft/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ syft =
forbiddenfruit==0.1.4
gevent==22.10.2
gipc==1.5.0
jaxlib==0.4.16
jax==0.4.16
jaxlib==0.4.18
jax==0.4.18
loguru==0.7.0
networkx==2.8
numpy>=1.22.4,<=1.24.3
Expand Down
28 changes: 11 additions & 17 deletions packages/syft/src/syft/util/notebook_ui/notebook_addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@

CSS_CODE = """
<style>
:root {
--primary-color: #ffffff;
--secondary-color: #f5f5f5;
--tertiary-color: #000000de;
--button-color: #d1d5db;
}
.dark-theme {
body[data-jp-theme-light='false'] {
--primary-color: #111111;
--secondary-color: #212121;
--tertiary-color: #CFCDD6;
--button-color: #111111;
}
}
body {
--primary-color: #ffffff;
--secondary-color: #f5f5f5;
--tertiary-color: #000000de;
--button-color: #d1d5db;
}
.header-1 {
font-style: normal;
font-weight: 600;
Expand Down Expand Up @@ -556,18 +558,11 @@
resetById${uid}('table${uid}');
resetById${uid}('pag${uid}');
result = paginate${uid}(result, page_size${uid})
paginatedElements${uid} = result
buildGrid${uid}(result,pageIndex${uid});
buildPaginationContainer${uid}(result);
}
function setTheme${uid}(){
const theme = document.body.getAttribute('data-jp-theme-light') === 'true' ? 'light' : 'dark';
if (theme === 'dark') document.body.classList.add('dark-theme');
else document.body.classList.remove('dark-theme');
}
function resetById${uid}(id){
let element = document.getElementById(id);
while (element.firstChild) {
Expand All @@ -582,7 +577,6 @@
let div = document.createElement("div");
div.classList.add('grid-header', 'grid-index-cells');
grid.appendChild(div);
setTheme${uid}();
headers.forEach((title) =>{
let div = document.createElement("div");
div.classList.add('grid-header', 'grid-std-cells');
Expand Down
Loading

0 comments on commit 49d72fc

Please sign in to comment.