@@ -199,22 +199,20 @@ def set_ctx(ctx):
199199
200200def _bucket_config ():
201201 return {
202- 'patch' : '''
203- diff --git a/patch.txt b/patch.txt
204- index 30d74d2..9a2c773 100644
205- --- a/patch.txt
206- +++ b/patch.txt
207- @@ -1 +1 @@
208- -test
209- \ No newline at end of file
210- +testing
211- \ No newline at end of file
212- ''' ,
213202 'commit' : 'HEAD' ,
214203 'github' : 'https://github.com/vanpelt' ,
215204 'config' : '{"foo":{"value":"bar"}}' ,
216205 'files' : {
217- 'edges' : [{'node' : {'directUrl' : request .url_root + "/storage?file=metadata.json" }}]
206+ 'edges' : [
207+ {'node' : {
208+ 'directUrl' : request .url_root + "/storage?file=wandb-metadata.json" ,
209+ 'name' : 'wandb-metadata.json'
210+ }},
211+ {'node' : {
212+ 'directUrl' : request .url_root + "/storage?file=diff.patch" ,
213+ 'name' : 'diff.patch'
214+ }}
215+ ]
218216 }
219217 }
220218
@@ -629,7 +627,7 @@ def storage():
629627 if request .method == "GET" and size :
630628 return os .urandom (size ), 200
631629 # make sure to read the data
632- data = request .get_data ()
630+ request .get_data ()
633631 if file == "wandb_manifest.json" :
634632 return {
635633 "version" : 1 ,
@@ -639,8 +637,27 @@ def storage():
639637 "digits.h5" : {"digest" : "TeSJ4xxXg0ohuL5xEdq2Ew==" , "size" : 81299 },
640638 },
641639 }
642- elif file == "metadata.json" :
643- return {"docker" : "test/docker" , "program" : "train.py" , "args" : ["--test" , "foo" ], "git" : ctx .get ("git" , {})}
640+ elif file == "wandb-metadata.json" :
641+ return {
642+ "docker" : "test/docker" ,
643+ "program" : "train.py" ,
644+ "args" : ["--test" , "foo" ],
645+ "git" : ctx .get ("git" , {})
646+ }
647+ elif file == "diff.patch" :
648+ # TODO: make sure the patch is valid for windows as well,
649+ # and un skip the test in test_cli.py
650+ return '''
651+ diff --git a/patch.txt b/patch.txt
652+ index 30d74d2..9a2c773 100644
653+ --- a/patch.txt
654+ +++ b/patch.txt
655+ @@ -1 +1 @@
656+ -test
657+ \ No newline at end of file
658+ +testing
659+ \ No newline at end of file
660+ '''
644661 return "" , 200
645662
646663 @app .route ("/artifacts/<entity>/<digest>" , methods = ["GET" , "POST" ])
0 commit comments