Reputation
Badges 1
40 × Eureka!Great! Thanks for the clarification AgitatedDove14 🙂
Understood, I'll look into it!
My use case is that, let's say I'm training with a file called train.py in which I have Task.init() , now after the training is finished, I generate some more graphs with a file called graphs.py and want to attach/upload to this training task which has finished. That's when I realised Task.get_task() is not working as intended, but it is when I have a Task.init() before it.
It says container name is optional in azure.storage , if I don't provide the container name, and remove it from the end of default_uri , would that work?
I tried it, and it is uploading it to Debug Samples ( Task.get_task() ) with task.get_logger().report_matplotlib_figure() , but with a Task.init() , it's uploading it to Plots.
Checking with the RC package now
Oh! With the sleep() function? Let me try it again
AgitatedDove14 , Let me clarify, I meant, let's say I have all the data like checkpoints, test and train logdirs, scripts that were used to train a model. So, how would I upload all of that to the ClearML server without retraining a model, so that the 'Scalars', 'Debug Samples', 'Hyperparameters', everything show up on ClearML server like they generally do?
` from trains import Task
import matplotlib.pyplot as plt
import numpy as np
import time
task = Task.get_task(task_id='task_id')
for i in range(0,10):
x_1 = np.random.rand(50)
y_1 = np.random.rand(50)
x_2 = np.random.rand(50)
y_2 = np.random.rand(50)
plt.figure()
plt.scatter(x_1, y_1, alpha=0.5)
plt.scatter(x_2, y_2, alpha=0.5)
# Plot will be reported automatically
# plt.show()
task.get_logger().report_matplotlib_figure(title="My Plot Title", serie...
So clearml-init can be skipped, and I provide the users with a template and ask them to append the credentials at the top, is that right? What about the "Credential verification" step in clearml-init command, that won't take place in this pipeline right, will that be a problem?
Oh it worked! I did the pip install multiple times earlier, but to no avail. I think it's because of the env variables? Let me try to unset those and provide it within the trains.conf
Are you doingÂ
plt.imshow
Nope
And yes, I set the report_image=False
Hey SuccessfulKoala55 , I'm new to Trains and want to setup an Azure Storage Container to store my model artifacts. I see that we can do this by providing an output_uri in Task.init() but is there another way to send all the artifacts to Azure instead of using the Task.init()? Like setting a variable somewhere, so that whenever I run my tasks I know the artifacts will get stored in Azure even if i dont provide an output_uri
It's going to Debug Samples with the RC too
` 2020-12-03 13:31:27,296 - trains.storage - ERROR - Azure blob storage driver not found. Please install driver using "pip install 'azure.storage.blob>=2.0.1'"
Traceback (most recent call last):
File "test.py", line 3, in <module>
task = Task.init(project_name="Test", task_name="debugging")
File "/home/sam/VirtualEnvs/test/lib/python3.8/site-packages/trains/task.py", line 461, in init
task.output_uri = cls.__default_output_uri
File "/home/sam/VirtualEnvs/test/lib/python3.8/site-...
No, those env variables aren't set.
What if I just copy a clearml.conf file and edit out the tokens? Could that work?
It is http btw, i don't know why it logged https://
2021-02-08 18:49:25,036 - clearml - WARNING - InsecureRequestWarning: Certificate verification is disabled! Adding certificate verification is strongly advised. See: Retrying (Retry(total=239, connect=240, read=239, redirect=240, status=240)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='X.Y.Z.W', port=8015): Read timed out. (read timeout=3.0)",)': /auth.loginGot this, times out after 5 tries
Yeah I noticed that too! Ports are configured properly in the conf file though
AgitatedDove14 , here's the code snippet you requested
AgitatedDove14 , I'll have a look at it and let you know. According to you the VPN shouldn't be a problem right?
Thanks 🙂
` * Trying X.Y.Z.W:8080...
- TCP_NODELAY set
- Connected to X.Y.Z.W (X.Y.Z.W) port 8008 (#0)
GET /debug.ping HTTP/1.1
Host: X.Y.Z.W:8080
User-Agent: curl/7.68.0
Accept: /
- Mark bundle as not supporting multiuse
< HTTP/1.1 302 Found
< Location:
< Connection: close
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< Content-Security-Policy: frame-ancestors
< - Closing connection 0 `
I tried it about 2-3 months ago with trains-init (same use-case as this one) and it failed that time too.
Could it be the credentials are actually incorrect?
Highly unlikely, like I said, I generated a new set of credentials from the Web-UI and it worked perfectly fine for an Azure VM (not under the VPN).
AgitatedDove14 , is there a way to set the default output URI flag so that if and when a new user creates a clearml.conf the URI is already in it? I was hoping that there's a universal flag somewhere. Asking this because I want all the Models and Artifacts to be stored in one place and the users shouldn't have to edit their configuration files.
This is the whole error dump:
`
2020-12-03 13:31:27,296 - trains.storage - ERROR - Azure blob storage driver not found. Please install driver using "pip install 'azure.storage.blob>=2.0.1'"
Traceback (most recent call last):
File "test.py", line 3, in <module>
task = Task.init(project_name="Test", task_name="debugging")
File "/home/sam/VirtualEnvs/test/lib/python3.8/site-packages/trains/task.py", line 461, in init
task.output_uri = cls.__default_output_uri
File "/home/sam/Virtu...
AgitatedDove14 , thanks a lot! I'll get back with a script in a day or two.
Ahh okay, commented out the whole thing and got the same error as earlier ( Could not get access credentials )
Indeed, sleep() did the trick but it's going into the Debug Samples tab and not the Plots, any reason why? Earlier (with Task.init() followed by Task.get_task() ) the same plt plots got reported to 'Plots'.