bitter-planet-74915
09/20/2023, 10:00 AMfrom metaflow import FlowSpec, Parameter, step
import os
os.environ['METAFLOW_DEFAULT_DATASTORE'] = 's3' # or it should be 'local'?
# os.environ['METAFLOW_DATASTORE_SYSROOT_S3'] = 's3'
class ParameterFlow(FlowSpec):
alpha = Parameter('alpha',
help='Learning rate',
default=0.01)
@step
def start(self):
print('alpha is %f' % self.alpha)
self.next(self.end)
@step
def end(self):
print('alpha is still %f' % self.alpha)
if __name__ == '__main__':
ParameterFlow()
My CLI command from here (https://docs.metaflow.org/production/scheduling-metaflow-flows/scheduling-with-airflow#pushing-a-flow-to-production):
python parameter_flow.py --with retry airflow create parameter_dag.py
I got this error:
Airflow Exception:
Datastore type `local` is not supported with `airflow create`. Please choose from datastore of type `azure`or `s3`or `gs` when calling `airflow create`
I still don't quite understand what I need to change. Sorry guys! And thank you in advance!fast-vr-44972
09/20/2023, 10:45 AMmetaflow configure?bitter-planet-74915
09/20/2023, 10:47 AMfast-vr-44972
09/20/2023, 10:47 AMbitter-planet-74915
09/20/2023, 10:49 AMbitter-planet-74915
09/20/2023, 10:49 AMfast-vr-44972
09/20/2023, 10:50 AMfast-vr-44972
09/20/2023, 10:55 AMbitter-planet-74915
09/20/2023, 10:57 AMbitter-planet-74915
09/20/2023, 11:19 AMconfig.json
Try to launch this: https://docs.metaflow.org/production/scheduling-metaflow-flows/scheduling-with-aws-step-functions#pushing-a-flow-to-production
But I got botocore.exceptions.NoRegionError: You must specify a region.
I explicitly assigned:
(metaflow_v2) ubuntu@ml-ondevice-liveness-test-rollovd:~/end_to_end$ cat /home/ubuntu/.metaflowconfig/config.json
{
"AWS_DEFAULT_REGION": "eu-south-1"
}
But anyway got same error. What I missed?bitter-planet-74915
09/20/2023, 11:20 AMbitter-planet-74915
09/20/2023, 11:20 AMbulky-afternoon-92433
09/20/2023, 11:43 AMAWS_DEFAULT_REGION should not have any effect through the Metaflow config, as that is a value used by the botocore library. Either setting this as an environment variable before running the command, or configuring it as part of your AWS profile in ~/.aws/config should do the trick.bitter-planet-74915
09/20/2023, 12:34 PMearly-motorcycle-1160
09/20/2023, 3:44 PM