Commit 267bb13f authored by Diana Jlailaty's avatar Diana Jlailaty
Browse files

fixing FileNotFound error

parent 43f8ebe4
Pipeline #17651 passed with stage
in 1 minute and 29 seconds
......@@ -2,8 +2,7 @@
sudo docker rmi -f $(sudo docker images)
# Build the image from dockerfile and clone the latest version of my code
sudo docker build . -t gitlab.ow2.org:4567/melodic/morphemic-preprocessor/gluonmachines:morphemic-rc1.5
docker build -t gitlab.ow2.org:4567/melodic/morphemic-preprocessor/gluonmachines:morphemic-rc1.5 -f ./forecasting_gluonts/docker_image/Dockerfile .
# Test the image
#sudo docker run -it --env-file variables.env gitlab.ow2.org:4567/melodic/morphemic-preprocessor/gluonmachines:morphemic-rc1.5
......
......@@ -39,7 +39,11 @@ directory_path = "/morphemic_project/"
def train(metric):
data_file_path = os.path.join(os.environ.get("DATA_PATH", "./"), f'{os.environ.get("APP_NAME", "demo")}.csv')
#while (not os.path.isfile(data_file_path)):
#sleep(30)
#logging.debug("Waiting for dataset to be loaded")
dataset = pd.read_csv(data_file_path)
gluonts_dataset = pd.DataFrame(columns=['ds', 'y'])
......
......@@ -40,6 +40,10 @@ def worker(self,body,metric):
epoch_start= body["epoch_start"]
predictionTimes[metric] = epoch_start
while (not os.path.isfile(directory_path+'models/gluonts_'+metric+".pkl")):
sleep(30)
logging.debug("Waiting for the trained model for metric: " + metric)
while(True):
#if flags[metric] == 0:
#epoch_start = predictionTimes[metric]
......@@ -134,6 +138,10 @@ class Gluonts(morphemic.handler.ModelHandler,messaging.listener.MorphemicListene
def on_metrics_to_predict(self, body):
dataset_preprocessor = CSVData(APP_NAME)
dataset_preprocessor.prepare_csv()
data_file_path = os.path.join(os.environ.get("DATA_PATH", "./"), f'{os.environ.get("APP_NAME", "demo")}.csv')
while (not os.path.isfile(data_file_path)):
sleep(30)
logging.debug("Waiting for dataset to be loaded")
logging.debug("DATASET DOWNLOADED")
for r in body:
......
......@@ -2,7 +2,8 @@
sudo docker rmi -f $(sudo docker images)
# Build the image from dockerfile and clone the latest version of my code
sudo docker build . -t gitlab.ow2.org:4567/melodic/morphemic-preprocessor/prophet:morphemic-rc1.5
docker build -t gitlab.ow2.org:4567/melodic/morphemic-preprocessor/prophet:morphemic-rc1.5 -f ./forecasting_prophet/docker_image/Dockerfile .
# Test the image
#sudo docker run -it --env-file variables.env gitlab.ow2.org:4567/melodic/morphemic-preprocessor/prophet:morphemic-rc1.5
......@@ -12,4 +13,3 @@ sudo docker login gitlab.ow2.org:4567
sudo docker push gitlab.ow2.org:4567/melodic/morphemic-preprocessor/prophet:morphemic-rc1.5
......@@ -45,8 +45,9 @@ def worker(self,body,metric):
predictionTimes[metric] = epoch_start
messages=list()
f=0
if os.path.isfile(directory_path+'models/prophet_'+metric+".pkl"):
logging.debug("Loading the trained model for metric: " + metric)
while (not os.path.isfile(directory_path+'models/prophet_'+metric+".pkl")):
sleep(30)
logging.debug("Waiting for the trained model for metric: " + metric)
while(True):
#if flags[metric] == 0:
......@@ -136,6 +137,10 @@ class Prophet(morphemic.handler.ModelHandler,messaging.listener.MorphemicListene
#getting data from datasetmaker
dataset_preprocessor = CSVData(APP_NAME)
dataset_preprocessor.prepare_csv()
data_file_path = os.path.join(os.environ.get("DATA_PATH", "./"), f'{os.environ.get("APP_NAME", "demo")}.csv')
while (not os.path.isfile(data_file_path)):
sleep(30)
logging.debug("Waiting for dataset to be loaded")
logging.debug("DATASET DOWNLOADED")
for r in body:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment