Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict resolution of upstream merge 2.5.1 #159

Closed
53 changes: 0 additions & 53 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ on:
pull_request:
branches:
- master
<<<<<<< HEAD
- feature/kfp
=======
workflow_call:

>>>>>>> master
jobs:
pre-commit:
runs-on: ubuntu-latest
Expand All @@ -28,73 +25,23 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
<<<<<<< HEAD
lang: [Python]
=======
ver: ['3.5', '3.6', '3.7', '3.8', '3.9','3.10',]
>>>>>>> master

steps:
- uses: actions/checkout@v2

<<<<<<< HEAD
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
=======
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.ver }}
>>>>>>> master

- name: Install Python ${{ matrix.ver }} dependencies
run: |
python3 -m pip install --upgrade pip
<<<<<<< HEAD
python3 -m pip install tox numpy black

- name: Python Code Format Check
run: black --target-version py39 --diff --check ./metaflow/plugins/kfp/*.py
=======
python3 -m pip install tox numpy

- name: Execute Python tests
run: tox

R:
name: core / R ${{ matrix.ver }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
ver: ['4.0', '4.1']

steps:
- uses: actions/checkout@v2
- name: Set up ${{ matrix.ver }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.ver }}

- name: Install R ${{ matrix.ver }} system dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update; sudo apt-get install -y libcurl4-openssl-dev qpdf libgit2-dev

- name: Install R ${{ matrix.ver }} Rlang dependencies
run: |
python3 -m pip install .
Rscript -e 'install.packages("devtools", repos="https://cloud.r-project.org", Ncpus=8)'
Rscript -e 'devtools::install_deps("R", dependencies=TRUE, repos="https://cloud.r-project.org", upgrade="default")'
R CMD INSTALL R
Rscript -e 'install.packages(c("data.table", "caret", "glmnet", "Matrix", "rjson"), repos="https://cloud.r-project.org", Ncpus=8)'

- name: Execute R tests
run: |
cd R/tests
Rscript run_tests.R
>>>>>>> master


39 changes: 5 additions & 34 deletions metaflow/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@

from .runtime import NativeRuntime
from .package import MetaflowPackage
<<<<<<< HEAD
from .plugins import ENVIRONMENTS, LOGGING_SIDECARS, METADATA_PROVIDERS, MONITOR_SIDECARS
from .metaflow_config import DEFAULT_DATASTORE, DEFAULT_ENVIRONMENT, DEFAULT_EVENT_LOGGER, \
DEFAULT_METADATA, DEFAULT_MONITOR, DEFAULT_PACKAGE_SUFFIXES, \
METAFLOW_COVERAGE_OMIT, METAFLOW_COVERAGE_SOURCE
=======
from .plugins import (
ENVIRONMENTS,
LOGGING_SIDECARS,
Expand All @@ -47,8 +41,9 @@
DEFAULT_METADATA,
DEFAULT_MONITOR,
DEFAULT_PACKAGE_SUFFIXES,
METAFLOW_COVERAGE_OMIT,
METAFLOW_COVERAGE_SOURCE
)
>>>>>>> master
from .metaflow_environment import MetaflowEnvironment
from .pylint_wrapper import PyLint
from .event_logger import EventLogger
Expand All @@ -58,16 +53,9 @@
from .unbounded_foreach import UBF_CONTROL, UBF_TASK


<<<<<<< HEAD

ERASE_TO_EOL = '\033[K'
HIGHLIGHT = 'red'
INDENT = ' ' * 4
=======
ERASE_TO_EOL = "\033[K"
HIGHLIGHT = "red"
INDENT = " " * 4
>>>>>>> master

LOGGER_TIMESTAMP = "magenta"
LOGGER_COLOR = "green"
Expand Down Expand Up @@ -534,14 +522,7 @@ def step(
raise CommandException("Step *%s* doesn't exist." % step_name)
if not func.is_step:
raise CommandException("Function *%s* is not a step." % step_name)
<<<<<<< HEAD
echo('Executing a step, *%s*' % step_name,
fg='magenta',
bold=False,
err=False)
=======
echo("Executing a step, *%s*" % step_name, fg="magenta", bold=False)
>>>>>>> master

if decospecs:
decorators._attach_decorators_to_step(func, decospecs)
Expand Down Expand Up @@ -584,12 +565,8 @@ def step(

echo("Success", fg="green", bold=True, indent=True)

<<<<<<< HEAD
echo('Success', fg='green', bold=True, indent=True, err=False)
if ctx.obj.coverage:
cov.stop()
=======
>>>>>>> master

@parameters.add_custom_parameters(deploy_mode=False)
@cli.command(help="Internal command to initialize a run.")
Expand Down Expand Up @@ -948,10 +925,9 @@ def start(
if use_r():
version = metaflow_r_version()

<<<<<<< HEAD
echo('Metaflow %s' % version, fg='magenta', bold=True, nl=False)
echo(" executing *%s*" % ctx.obj.flow.name, fg='magenta', nl=False)
echo(" for *%s*" % resolve_identity(), fg='magenta')
echo("Metaflow %s" % version, fg="magenta", bold=True, nl=False)
echo(" executing *%s*" % ctx.obj.flow.name, fg="magenta", nl=False)
echo(" for *%s*" % resolve_identity(), fg="magenta")

if coverage:
from coverage import Coverage
Expand All @@ -961,11 +937,6 @@ def start(
omit=METAFLOW_COVERAGE_OMIT.split(",") if METAFLOW_COVERAGE_OMIT else None,
branch=True)
cov.start()
=======
echo("Metaflow %s" % version, fg="magenta", bold=True, nl=False)
echo(" executing *%s*" % ctx.obj.flow.name, fg="magenta", nl=False)
echo(" for *%s*" % resolve_identity(), fg="magenta")
>>>>>>> master

cli_args._set_top_kwargs(ctx.params)
ctx.obj.coverage = coverage
Expand Down
26 changes: 0 additions & 26 deletions metaflow/current.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<<<<<<< HEAD
from metaflow import FlowSpec

=======
from collections import namedtuple
import os

Parallel = namedtuple("Parallel", ["main_ip", "num_nodes", "node_index"])
>>>>>>> master


class Current(object):
Expand All @@ -21,22 +16,6 @@ def __init__(self):
self._username = None
self._is_running = False

<<<<<<< HEAD
def _set_env(self,
flow=None,
flow_name=None,
run_id=None,
step_name=None,
task_id=None,
retry_count=None,
origin_run_id=None,
namespace=None,
username=None,
is_running=True):

self._flow = flow
self._flow_name = flow_name
=======
def _raise(ex):
raise ex

Expand All @@ -60,7 +39,6 @@ def _set_env(
self._flow_name = flow.name
self.__class__.graph = property(fget=lambda _, flow=flow: flow._graph_info)

>>>>>>> master
self._run_id = run_id
self._step_name = step_name
self._task_id = task_id
Expand All @@ -84,10 +62,6 @@ def get(self, key, default=None):
def is_running_flow(self):
return self._is_running

@property
def flow(self) -> FlowSpec:
return self._flow
cloudw marked this conversation as resolved.
Show resolved Hide resolved

@property
def flow_name(self):
return self._flow_name
Expand Down
35 changes: 0 additions & 35 deletions metaflow/metaflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@ def from_conf(name, default=None):
)
# Local datatools root location
DATATOOLS_LOCALROOT = from_conf(
<<<<<<< HEAD
'METAFLOW_DATATOOLS_LOCALROOT',
'%s/%s' % (from_conf('METAFLOW_DATASTORE_SYSROOT_LOCAL'), DATATOOLS_SUFFIX)
if from_conf('METAFLOW_DATASTORE_SYSROOT_LOCAL') else None)

# S3 endpoint url
S3_ENDPOINT_URL = from_conf('METAFLOW_S3_ENDPOINT_URL', None)
S3_VERIFY_CERTIFICATE = from_conf('METAFLOW_S3_VERIFY_CERTIFICATE', None)
=======
"METAFLOW_DATATOOLS_LOCALROOT",
os.path.join(from_conf("METAFLOW_DATASTORE_SYSROOT_LOCAL"), DATATOOLS_SUFFIX)
if from_conf("METAFLOW_DATASTORE_SYSROOT_LOCAL")
Expand All @@ -120,7 +111,6 @@ def from_conf(name, default=None):
# though as this may increase failures. Note that this is the number of *retries*
# so setting it to 0 means each operation will be tried once.
S3_RETRY_COUNT = int(from_conf("METAFLOW_S3_RETRY_COUNT", 7))
>>>>>>> master

###
# Datastore local cache
Expand Down Expand Up @@ -227,10 +217,6 @@ def from_conf(name, default=None):
###
# Conda package root location on S3
CONDA_PACKAGE_S3ROOT = from_conf(
<<<<<<< HEAD
'METAFLOW_CONDA_PACKAGE_S3ROOT',
'%s/conda' % from_conf('METAFLOW_DATASTORE_SYSROOT_S3'))
=======
"METAFLOW_CONDA_PACKAGE_S3ROOT",
"%s/conda" % from_conf("METAFLOW_DATASTORE_SYSROOT_S3"),
)
Expand All @@ -239,7 +225,6 @@ def from_conf(name, default=None):
# Mamba promises faster package dependency resolution times, which
# should result in an appreciable speedup in flow environment initialization.
CONDA_DEPENDENCY_RESOLVER = from_conf("METAFLOW_CONDA_DEPENDENCY_RESOLVER", "conda")
>>>>>>> master

###
# Debug configuration
Expand Down Expand Up @@ -312,25 +297,6 @@ def get_version(pkg):
# PINNED_CONDA_LIBS are the libraries that metaflow depends on for execution
# and are needed within a conda environment
def get_pinned_conda_libs(python_version):
<<<<<<< HEAD
if python_version.startswith("3.5"):
return {
'click': '7.1.2',
'requests': '2.24.0',
'boto3': '1.9.88',
'coverage': '4.5.1'
}
else:
return {
'click': '7.1.2',
'requests': '2.24.0',
'boto3': '1.14.47',
'coverage': '4.5.4'
}


# Check if there is a an extension to Metaflow to load and override everything
=======
return {
"requests": ">=2.21.0",
"boto3": ">=1.14.0",
Expand All @@ -340,7 +306,6 @@ def get_pinned_conda_libs(python_version):
METAFLOW_EXTENSIONS_ADDL_SUFFIXES = set([])

# Check if there are extensions to Metaflow to load and override everything
>>>>>>> master
try:
from metaflow.extension_support import get_modules

Expand Down
Loading