generated from caicloud/golang-template-project
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
directoryStructure set to <artifact_name> and not prepended by model/ dir #200
Labels
question
Further information is requested
Comments
Interesting. I will dive into this issue. |
Do you have any clue about it now? |
I'm actually getting more confused now. I run the following: $ docker pull python:3.7-slim
$ docker run --rm -it --entrypoint /bin/bash python:3.7-slim
root@:/$ apt-get update
root@:/$ apt-get install vim-tiny -y
root@:/$ vi home/.env # populating my harbor credentials
root@:/$ mkdir home/test-model
root@:/$ mkdir home/test-model/model
root@:/$ touch home/test-model/model/test-model.joblib
root@:/$ echo "format: SKLearn" >> home/test-model/ormbfile.yaml
root@:/$ pip install python-dotenv ormb
root@:/$ python
Python 3.7.12 (default, Dec 21 2021, 11:35:10)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import ormb
>>> import dotenv
>>> dotenv.load_dotenv(dotenv_path="home/.env")
True
>>> username = os.getenv("HARBOR_USERNAME")
>>> password = os.getenv("HARBOR_PASSWORD")
>>> ormb.login(hostname="****", username=username, password=password, insecure_opt="true")
Using /root/.ormb as the root path
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login insecurely
WARN[0000] insecure registry **** should not contain 'https://' and 'https://' has been removed from the insecure registry config
Login succeeded
0
>>> ref = "****"
>>> ormb.save(src="home/test-model", ref=ref)
Using config file: /root/.ormb/config.json
Using /root/.ormb as the root path
ref: ****
digest: 705e6b425763259c7a743b9ea2abcb9228cc85374f72ecc6a96535f55aa2f781
size: 113 B
format: SKLearn
: saved
0
>>> ormb.push(ref=ref)
Using config file: /root/.ormb/config.json
Using /root/.ormb as the root path
The push refers to repository [****]
ref: ****
digest: 705e6b425763259c7a743b9ea2abcb9228cc85374f72ecc6a96535f55aa2f781
size: 113 B
format: SKLearn
: pushed to remote (1 layer, 113 B total)
0 which resulted in no |
I cannot reproduce it locally with ormb binary. I will try the python sdk. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed a strange behaviour when I save and push an artifact from the root level of my docker container (
python:3.7-slim
). ThedirectoryStructure
metadata field is set to my artifact name without theORMBModelDirectory
prepended to it, but if I run the save and push commands from the/home
directory of my container then I observe the "expected normal" behaviour and thedirectoryStructure
metadata field is set tomodel/<artifact_name>
😅I know I should not do that at the root level of my containers but I don't understand what is causing this result. I don't know go but I feel like this is related to it:
ormb/pkg/saver/saver.go
Lines 127 to 129 in 7907828
Any idea where this is coming from and if this is expected in that situation?
The text was updated successfully, but these errors were encountered: