[ARVADOS] updated: 1.3.0-167-g8c593d84f
Git user
git at public.curoverse.com
Fri Jan 18 11:08:26 EST 2019
Summary of changes:
sdk/cwl/arvados_cwl/executor.py | 3 +--
sdk/cwl/arvados_cwl/http.py | 11 +++++------
sdk/cwl/tests/wf/check_mem.py | 3 +--
3 files changed, 7 insertions(+), 10 deletions(-)
via 8c593d84f88aa5cd87de0acedffdf867deca51f7 (commit)
from 57b450aee36a60b2ad0be0a073250e2badbbda8d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 8c593d84f88aa5cd87de0acedffdf867deca51f7
Author: Eric Biagiotti <ebiagiotti at veritasgenetcs.com>
Date: Fri Jan 18 11:08:13 2019 -0500
13306: Removing old_div to simplify division operations
Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
diff --git a/sdk/cwl/arvados_cwl/executor.py b/sdk/cwl/arvados_cwl/executor.py
index c6c2c8713..eab12efaa 100644
--- a/sdk/cwl/arvados_cwl/executor.py
+++ b/sdk/cwl/arvados_cwl/executor.py
@@ -6,7 +6,6 @@ from __future__ import division
from builtins import next
from builtins import object
from future.utils import viewvalues
-from past.utils import old_div
import argparse
import logging
@@ -620,7 +619,7 @@ http://doc.arvados.org/install/install-api-server.html#disable_api_methods
visited.add(m.group(1))
estimated_size[0] += int(m.group(2))
visit_class(job_order, ("File", "Directory"), estimate_collection_cache)
- runtimeContext.collection_cache_size = max((old_div((estimated_size[0]*192), (1024*1024)))+1, 256)
+ runtimeContext.collection_cache_size = max(((estimated_size[0]*192) // (1024*1024))+1, 256)
self.collection_cache.set_cap(runtimeContext.collection_cache_size*1024*1024)
logger.info("Using collection cache size %s MiB", runtimeContext.collection_cache_size)
diff --git a/sdk/cwl/arvados_cwl/http.py b/sdk/cwl/arvados_cwl/http.py
index 59c646ccd..ccc2e793b 100644
--- a/sdk/cwl/arvados_cwl/http.py
+++ b/sdk/cwl/arvados_cwl/http.py
@@ -5,7 +5,6 @@
from __future__ import division
from future import standard_library
standard_library.install_aliases()
-from past.utils import old_div
import requests
import email.utils
@@ -139,14 +138,14 @@ def http_to_keep(api, project_uuid, url, utcnow=datetime.datetime.utcnow):
f.write(chunk)
loopnow = time.time()
if (loopnow - checkpoint) > 20:
- bps = (old_div(float(count),float(loopnow - start)))
+ bps = count / (loopnow - start)
if cl is not None:
logger.info("%2.1f%% complete, %3.2f MiB/s, %1.0f seconds left",
- old_div(float(count * 100), float(cl)),
- old_div(bps,(1024*1024)),
- old_div((cl-count),bps))
+ ((count * 100) / cl),
+ (bps // (1024*1024)),
+ ((cl-count) // bps))
else:
- logger.info("%d downloaded, %3.2f MiB/s", count, old_div(bps,(1024*1024)))
+ logger.info("%d downloaded, %3.2f MiB/s", count, (bps / (1024*1024)))
checkpoint = loopnow
c.save_new(name="Downloaded from %s" % url, owner_uuid=project_uuid, ensure_unique_name=True)
diff --git a/sdk/cwl/tests/wf/check_mem.py b/sdk/cwl/tests/wf/check_mem.py
index 818cfb778..b4322a809 100644
--- a/sdk/cwl/tests/wf/check_mem.py
+++ b/sdk/cwl/tests/wf/check_mem.py
@@ -4,7 +4,6 @@
from __future__ import print_function
from __future__ import division
-from past.utils import old_div
import arvados
import sys
@@ -13,7 +12,7 @@ import os
if "JOB_UUID" in os.environ:
requested = arvados.api().jobs().get(uuid=os.environ["JOB_UUID"]).execute()["runtime_constraints"]["min_ram_mb_per_node"]
else:
- requested = old_div(arvados.api().containers().current().execute()["runtime_constraints"]["ram"],(1024*1024))
+ requested = arvados.api().containers().current().execute()["runtime_constraints"]["ram"] // (1024*1024)
print("Requested %d expected %d" % (requested, int(sys.argv[1])))
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list