Reputation
Badges 1
42 × Eureka!SuccessfulKoala55 Getting an error with mounting on a read-only file system(Error response from daemon: error while creating mount source path '/opt/trains/logs': mkdir /opt/trains: read-only file system: RunContainerError), is there any workaround for this?
AgitatedDove14 Thanks! That resolved a lot of my questions.
Which would mean
trains
` will update the installed packages, no?
Can you explain what is meant by this?
I think what you're trying to say is that in the UI the installed packages will be determined through the code via the imports as usual and the users will have to manually clear the installed packages so that the requirements.txt
is used instead.
I didn't execute the code manually, I executed it from trains-agent to begin with. So to conclude: it has to be executed manually first, then with trains agent?
The notebook is contained within a git repo. I have the jupyter notebook pulled up and am running the cell for creating the task and executing it remotely. In the draft task, there is a git repo and uncommitted changes(which contains all of the cells of the notebook) and installed packages.
This line: “if task.running_locally():” makes sure that when the code is executed by the agent it will not reset it’s own requirements (the agent updates the requirements/installed_packages after it installs them from the requiremenst.txt, so that later you know exactly which packages/versions were used)
got it! Thanks for explaining
AgitatedDove14 thanks, I'm new to Allegro here so just trying to figure everything out. When you say trains agent, are you referring to the trains agent command(so in this case , would it be trains-agent execute
?). Is it sufficient to queue the experiments(using execute_remotely
) or do I need to clone them as well?
It was set to true earlier, I changed it to false to see if there would be any difference but doesn’t seem like it
AgitatedDove14 Yes, I understand that, but as I mentioned earlier, I don't want to have to edit installed_packages
manually, as others will also be running the same scripts from their own local development machines. This is why I was inquiring about the requirements.txt
file, so that this manual editing would not have to be done by each person running the same scripts.
Additionally, since I'm running a pipeline, would I have to execute each task in the pipeline locally(but still...
AgitatedDove14 I tried your code snippet, something like this:task = Task.init(...) if task.running_locally(): # wait for the repo detection and requirements update task._wait_for_repo_detection() # reset requirements task._update_requirements(None) task.execute_remotely(queue="default") ... rest of task here ...
It’s able to create a draft successfully with no items in the installed packages section, but it only installed Cython
and began the execution immediately....
Let me experiment with force_analyze_entire_repo
and I’ll get back to you! It was missing google-cloud-bigquery
, an import from a separate file in the repository. Hopefully that should resolve the problem. A flag would be really cool, just in case if theres any problem with the package analysis.
AgitatedDove14 So I ran a cell to create the task and execute it remotely. The cell (after execution) shows up with an error that says NameError: name 'exit' is not defined
. Trains does store the task as a draft, and when I try to execute the task via trains agent, it aborts in the middle of installing all of the dependencies.
Since I'm running a pipeline, does this mean I have to execute each task of the pipeline individually and manually? Then uncomment task.execute_remotely()
from each task and then run via trains-agent
?
If there a way to do this without manually editing installed packages? I'm trying to create a setup in which others can utilize the same repo and have their venvs be built similarly without having to do much work on their end (i.e. editing the installed packages). As for why it's failing to detect, I'm not sure.from google.cloud import bigquery ImportError: cannot import name 'bigquery' from 'google.cloud' (unknown location)
That's the error I get after the task makes use of the function ...
I was thinking more along the lines of a draft task that has yet to be enqueued(so it can still be edited). The installed packages grabs most packages except for a few, which is why I am resorting to clearing the packages so that requirements.txt
is used. I’ve been using the UI so far to do it, but would like to move the process to a script
TimelyPenguin76 thanks! Do you know when the next version will be released?
Let me look into that and I’ll let you know
I did see that, just wanted to confirm that there's no way of deleting artifacts without deleting the experiment as well
The default GKE OS is container optimized os so some directories(i.e. opt) are read only. I solved the problem by mounting it in var/libs. In the future, is allegro considering including deployment of trains-server on GKE?
The VM ip is 153.73.X.Y and the trains-server IP is 34.74.X.Y
Yeah, the command is executed and nothing is returned.
Since the package requirements vary from task to task, setting it up in trains.conf
might be a little tedious to go back and change. Most of the time, the package analysis has worked very well, but in this particular use case it failed to detect. I think task.init flag would be great!
just reran and got the same results with the flag for force_analyze_entire_repo
set to false 😞 still has the following import error:ImportError: cannot import name 'bigquery' from 'google.cloud' (unknown location)
AgitatedDove14 worked like a charm, thank you!
task = Task.init(...) if task.running_locally(): # wait for the repo detection and requirements update task._wait_for_repo_detection() # reset requirements task._update_requirements(None)
Regarding this, does this work if the task is not running locally and is being executed by the trains agent?
Yeah, I’m trying to connect to my own server, and I installed trains-agent
on a vm. How could I diagnose the issue?
If you have a few lines for resetting, I would love to have that as an option as well!