Metaflow 2.3.5 Release Notes
The Metaflow 2.3.5 release is a patch release.
- Features
- Enable mounting host volumes in AWS Batch
- Bug Fixes
- Fix input values for Parameters of type
list
within a Metaflow Foreach task
- Fix input values for Parameters of type
Features
Enable mounting host volumes in AWS Batch
With this release, you can now mount and access instance host volumes within a Metaflow task running on AWS Batch. To access a host volume, you can add host-volumes
argument to your @batch
decorator -
@batch(host_volumes=['/home', '/var/log'])
Bug Fixes
Fix input values for Parameters of type list
within a Metaflow Foreach task
The following flow had a bug where the value for self.input
was being imputed to None
rather than the dictionary element. This release fixes this issue -
from metaflow import FlowSpec, Parameter, step, JSONType
class ForeachFlow(FlowSpec):
numbers_param = Parameter(
"numbers_param",
type=JSONType,
default='[1,2,3]'
)
@step
def start(self):
# This works, and passes each number to the run_number step:
#
# self.numbers = self.numbers_param
# self.next(self.run_number, foreach='numbers')
# But this doesn't:
self.next(self.run_number, foreach='numbers_param')
@step
def run_number(self):
print(f"number is {self.input}")
self.next(self.join)
@step
def join(self, inputs):
self.next(self.end)
@step
def end(self):
pass
if __name__ == '__main__':
ForeachFlow()